- Read README.md immediately upon reading this, it sketches the directory structure of this repo
- Work on the branch you find unless instructed otherwise
- If the current branch is
main, you do not need to use a PR - Deployment is by ArgoCD, canonically at https://argocd.k8s.code.org
- Promotion between codeai deployments is done by Kargo, canonically at https://kargo.k8s.code.org
- This is the gitops repo for https://github.com/code-dot-org/code-dot-org
- code-dot-org is often checked out next to this one, you can modify both to do projects
- Relevant subdirs here are:
- bootstrap/: cluster bootstrap, dex, argocd, oidc, aws load balancer controller, ESO, etc
- bootstrap/apptrees/: non-production Argo tree fixtures and stress trees
- Relevant subdirs in code-dot-org are:
- k8s/helm: helm chart for the codeai app
- k8s/kustomize: kustomize base/ for the codeai app
- If you modify an app Helm chart under
apps/, always bump that chart package version in itsChart.yamltop-levelversion:field so Argo sees the chart change. - If you push changes in this repo, then for Argo-managed changes immediately trigger a normal refresh on the affected Application, and if it still has not moved to the new Git revision, trigger a sync to save time.
- If you change the structure of
apps/app-of-apps/*, make a parallel edit underbootstrap/apptrees/mimic/apps/app-of-apps/*when relevant, so the test tree does not bitrot.
- When users says to create or destroy app-of-apps, the do not mean OpenTofu. they mean:
- create:
kubectl apply -f apps/app-of-apps/bootstrap.yaml - destroy:
kubectl delete -f apps/app-of-apps/bootstrap.yaml - both can take upwards of 30 minutes, the user may or may not want you to monitor. If they do, default to polling every minute, and focusing particularly on argo-trace output. Default to waiting until the destroy/create is done and either argo-trace says no apps or its healthy.
- create:
- When starting an apply or destroy, whether via
tofu apply,tofu destroy, or by manually adding or removing app-of-apps from Argo and watching, runbootstrap/codeai-k8s/cluster-infra-argocd/bin/log-cluster-events startbefore you begin. - No matter what happens, when the watched run is done, run
bootstrap/codeai-k8s/cluster-infra-argocd/bin/log-cluster-events stop. bootstrap/codeai-k8s/cluster-infra-argocd/bin/log-cluster-events startaccepts an optional label. If omitted, it usessession. Use "bootstrap-app-of-apps" for creation and "destroy-app-of-apps" for deletion.bootstrap/codeai-k8s/cluster-infra-argocd/bin/log-cluster-eventsrunsbootstrap/codeai-k8s/cluster-infra-argocd/bin/argo-traceas a sidecar logger and writesbootstrap/codeai-k8s/cluster-infra-argocd/logs/argo-trace-<label>-<timestamp>.log.md. That tracer is not an implementation detail; treat that md log as a primary debugging tool and mirror its output raw in chat when it emits updates.bootstrap/codeai-k8s/cluster-infra-argocd/bin/log-cluster-eventsnow writes three first-class logs per session:bootstrap/codeai-k8s/cluster-infra-argocd/logs/cluster-events-<timestamp>-<label>.logbootstrap/codeai-k8s/cluster-infra-argocd/cluster.logbootstrap/codeai-k8s/cluster-infra-argocd/logs/argo-trace-<label>-<timestamp>.log.md
- When running
bootstrap/codeai-k8s/cluster-infra-argocd/bin/log-cluster-events start, ALWAYS print the verbatimtail -n +1 -f ...commands for all three logs to the chat with user once they are sent to you. - Stop the sidecar watchers with
bootstrap/codeai-k8s/cluster-infra-argocd/bin/log-cluster-events stop.