2.4 KiB
argocd
GitOps for the homelab k3s cluster (k3s-design.md). Argo CD watches this repo
on Forgejo and deploys whatever is on main.
Layout
bootstrap/root.yaml the only thing applied by hand: the "root" Application -> cluster/
cluster/ cluster-level Argo objects (app-of-apps)
argocd.yaml Argo CD manages its own install from argocd/
apps.yaml ApplicationSet: one Application per folder in apps/
argocd/ Argo CD install (upstream install.yaml pinned + small patches)
apps/<name>/ one app per folder, deployed to namespace <name>
Argo reads the repo at http://10.0.0.14:3000/un-oeil/argocd.git (Forgejo's
internal address): pods can't reach forgejo.un-oeil.fr because the host has no
hairpin NAT. The repo is public, so no credentials are needed.
Bootstrap (once)
Over WireGuard, with KUBECONFIG=~/.kube/k3s-homelab.yaml. Push this repo first:
Argo pulls from Forgejo, not from your laptop.
kubectl apply --server-side -k argocd/
kubectl -n argocd rollout status deploy/argocd-server
kubectl apply -f bootstrap/root.yaml
Admin password (user admin), then change it in the UI and delete the secret:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d; echo
UI: either kubectl -n argocd port-forward svc/argocd-server 8080:80 →
http://localhost:8080, or add 10.0.0.141 argocd.un-oeil.fr to /etc/hosts →
http://argocd.un-oeil.fr. Argo CD is admin-only: don't add it to Caddy.
Launching an app
- Create
apps/<name>/(copyapps/whoami/). Its contents can be:- plain manifests, or
- a
kustomization.yaml(Helm charts work too viahelmCharts:), or - a
Chart.yaml(umbrella chart with the real chart as a dependency +values.yaml).
- Commit and push. Argo picks it up within ~3 min (or hit Refresh in the UI)
and creates namespace
<name>. - To make it public: add an Ingress with host
<name>.un-oeil.fr, then a Caddy vhost (LXC 100) pointing at Traefik on10.0.0.141-143:80.
Removing a folder deletes the app and its resources, PVCs included.
Not there yet
- Storage: only k3s
local-path(data stuck on one node). Longhorn is the next app. - Secrets: nothing yet. Don't commit plain Secrets; add Sealed Secrets or SOPS first.
- Forgejo webhook → Argo for instant syncs instead of 3 min polling.