GitOps repo for CUGrader, deployed with Argo CD (app-of-apps).
bootstrap/root.yaml– root Application; apply once by hand.argocd/– Argo CD config managed by the root app:envs-auto.yaml– SIT and UAT, auto-sync.envs-production.yaml– production, manual sync.pr-previews.yaml– one env per service-repo PR labelledpreview.
apps/<svc>/– one directory per service (gateway= APISIX,user= Go Gin). Seeapps/README.md.
- PR in a service repo with label
preview→ CI pushesghcr.io/cu-devclub/cugrader-<svc>:<sha>→ Argo CD deploys<svc>-pr-<n>. Gateway previews are served athttps://pr-<number>-gateway-grader-sit.sittha.net. - Merge to
main→ CI pushes image and bumpsnewTaginapps/<svc>/overlays/sit/→ SIT auto-syncs. - PR here copying the tag into
overlays/uat/→ UAT auto-syncs. - PR here copying the tag into
overlays/production/→ click Sync in Argo CD.
kubectl create namespace argocd
kubectl apply -n argocd --server-side -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl apply -n argocd -f bootstrap/root.yamlIf the repo is private, register it first:
argocd repo add https://github.com/cu-devclub/CUGrader-infrastructure --username <user> --password <token>
Copy apps/user/ to apps/<svc>/, rename, push to main. For PR envs, add the repo to the list in argocd/pr-previews.yaml.
PR envs need a GitHub token secret:
kubectl -n argocd create secret generic github-token --from-literal=token=<PAT>
*.sittha.net reaches the cluster through a Cloudflare Tunnel:
- DNS: CNAME
*→<tunnel-id>.cfargotunnel.com(proxied). - Tunnel public hostname:
*.sittha.net→ the ingress controller's HTTP service.
A service gets a URL only if its preview/ has an Ingress. Today only gateway has one. Backend services stay private so their /private endpoints are never exposed.