CD: apply deploy/ cluster manifests on push to main (kill the manual kubectl apply) #346
Labels
No labels
burndown-2026-06
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/infrastructure#346
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
A commit to infra
mainthat changes adeploy/cluster manifest should apply itself on the in-clusterdeployrunner, not wait on a hand-runsudo k3s kubectl applyon kai-server. Today infra CI is config-validation only (AGENTS.md: "a commit to main is not a deploy"), so every manifest change carries a manual apply step. This was the last loose end of infra#345 / deploy#12: the eco-app deployer RBAC landed indeploy/forgejo-runner-deploy.ymlbut only reached the cluster when applied by hand.What to add
.forgejo/workflows/deploy-infra.ymlor similar),runs-on: deploy,pushondeploy/**+workflow_dispatch, thatkubectl applys the changed manifests. Mirrors the per-servicedeploy-<name>.ymlpattern proven for atlas + eco-app, but for the cluster-infra layer.deploy/*.ymlthat are safe to auto-apply, vs. apply-everything-changed. Somedeploy/manifests (observability values, secretstore) may want to stay manual.Nuances / blockers to design around
deployrunner is itself defined indeploy/forgejo-runner-deploy.yml. A workflow on that runner re-applying its own StatefulSet is workable (the apply is idempotent and the pod survives its own re-apply), but a breaking change to the runner manifest could strand the runner. The runner's own bootstrap apply stays manual.deployerSA is deliberately narrow - namespaces get/create cluster-wide, plus RW scoped to theatlasandcoilysiren-eco-appnamespaces only. Applyingforgejo-runner-deploy.yml(or anyforgejo-namespace / ClusterRole resource) needs perms the deployer SA does not have today and arguably should never have (it would let CD rewrite its own RBAC - a privilege-escalation surface). Likely answer: infra CD applies app/namespace-scoped manifests but the cluster-RBAC + runner manifests stay an operator apply. Pin this down before wiring.kubectl apply.Relationship
deploy/layer.