45dfbfcfbb
- Deploy ArgoCD with Helm for GitOps continuous delivery * Configure LoadBalancer and Ingress access on LAN * Enable ArgoCD Image Updater for automatic "latest" tag updates * Simplified RBAC for single-user homelab environment - Deploy Gitea as self-hosted Git server for local repositories * PostgreSQL backend with NFS persistent storage * SSH and HTTP access via MetalLB LoadBalancer * Integration guides for ArgoCD GitOps workflows - Add example ArgoCD Application with auto-image updates - Include comprehensive migration guides from Helm to GitOps - Maintain compatibility with existing Helm-based deployments 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
4.3 KiB
4.3 KiB
Gitea + ArgoCD Setup Guide
Gitea Access Information
Web UI Access:
- LoadBalancer URL: http://192.168.222.27:3000
- Ingress URL: http://gitea.turing.lan (add to your hosts file:
192.168.222.27 gitea.turing.lan) - SSH Clone URL:
git@192.168.222.26:username/repo.git
Admin Credentials:
- Username:
admin - Password:
gitea-admin-pass - Email:
admin@turing.lan
Initial Gitea Setup
- Access Gitea: Visit http://192.168.222.27:3000
- Login: Use admin credentials above
- Create Organization: Create an org for your homelab projects (e.g., "turingpi")
- Create Repository: Create your first repo for ArgoCD manifests
Setting Up Your First Repository
Create a Repository for ArgoCD Applications
- Create new repo:
turingpi-argocd-apps - Clone locally:
git clone http://192.168.222.27:3000/admin/turingpi-argocd-apps.git
cd turingpi-argocd-apps
- Copy your existing values files:
# Copy your existing values files to the repo
cp /home/gilgamezh/code/turingpi/*_values.yaml ./helm-values/
mkdir -p apps/
- Create directory structure:
turingpi-argocd-apps/
├── apps/ # ArgoCD Application manifests
├── helm-values/ # Your existing *_values.yaml files
├── manifests/ # Raw Kubernetes manifests
└── README.md
Migrating Plex to GitOps
Step 1: Create ArgoCD Application
Create apps/plex.yaml:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: plex
namespace: argocd
annotations:
# Enable automatic image updates
argocd-image-updater.argoproj.io/image-list: plex=ghcr.io/k8s-at-home/plex:latest
argocd-image-updater.argoproj.io/plex.update-strategy: newest-build
argocd-image-updater.argoproj.io/write-back-method: git
spec:
project: default
source:
repoURL: http://gitea-http.gitea.svc.cluster.local:3000/admin/turingpi-argocd-apps.git
path: helm-values
targetRevision: HEAD
helm:
valueFiles:
- plex_values.yml
destination:
server: https://kubernetes.default.svc
namespace: plex
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
Step 2: Configure ArgoCD to Access Gitea
Add Gitea as a repository in ArgoCD:
-
Via ArgoCD UI:
- Go to Settings → Repositories → Connect Repo
- URL:
http://gitea-http.gitea.svc.cluster.local:3000/admin/turingpi-argocd-apps.git - Username:
admin - Password:
gitea-admin-pass
-
Via CLI:
argocd repo add http://gitea-http.gitea.svc.cluster.local:3000/admin/turingpi-argocd-apps.git \
--username admin --password gitea-admin-pass
Benefits of This Setup
✅ Version Control: All your configurations are in Git
✅ Automatic Updates: Images update when "latest" tags change
✅ Audit Trail: See what changed and when
✅ Easy Rollbacks: Git history = deployment history
✅ Local Control: No external dependencies
✅ Team Collaboration: Others can contribute via Git
Migration Strategy
- Start Small: Migrate 1-2 applications first
- Test Process: Verify auto-updates work as expected
- Bulk Migration: Move remaining applications
- Cleanup: Remove manual Helm commands once confident
Git Workflow Examples
Adding a New Application
# Create new app manifest
cat > apps/new-app.yaml << EOF
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: new-app
namespace: argocd
spec:
# ... configuration
EOF
# Commit and push
git add apps/new-app.yaml
git commit -m "Add new application: new-app"
git push origin main
Updating Values
# Edit your values file
vim helm-values/plex_values.yml
# Commit changes
git add helm-values/plex_values.yml
git commit -m "Update Plex CPU limits"
git push origin main
# ArgoCD will auto-sync the changes
Your homelab now has enterprise-grade GitOps capabilities while staying completely self-hosted! 🏠✨
Next Steps
- Access Gitea and create your first repository
- Copy your values files to the new repo
- Create your first ArgoCD application pointing to Gitea
- Test the workflow with a simple change
- Migrate more applications gradually