Skip to content

Latest commit

 

History

History
33 lines (31 loc) · 3.6 KB

File metadata and controls

33 lines (31 loc) · 3.6 KB
  • 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 its Chart.yaml top-level version: 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 under bootstrap/apptrees/mimic/apps/app-of-apps/* when relevant, so the test tree does not bitrot.

Bootstrapping and Destroying app-of-apps w/o tofu

  • 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.
  • 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, run bootstrap/codeai-k8s/cluster-infra-argocd/bin/log-cluster-events start before 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 start accepts an optional label. If omitted, it uses session. Use "bootstrap-app-of-apps" for creation and "destroy-app-of-apps" for deletion.
  • bootstrap/codeai-k8s/cluster-infra-argocd/bin/log-cluster-events runs bootstrap/codeai-k8s/cluster-infra-argocd/bin/argo-trace as a sidecar logger and writes bootstrap/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-events now writes three first-class logs per session:
    • bootstrap/codeai-k8s/cluster-infra-argocd/logs/cluster-events-<timestamp>-<label>.log
    • bootstrap/codeai-k8s/cluster-infra-argocd/cluster.log
    • bootstrap/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 verbatim tail -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.