Repository navigation
Description
Problem
The owner decided on 2026-10-03 that:
- everything in the homelab cluster is in code and git;
- Argo CD reconciles it with automated sync, prune and self-heal;
- it tracks the current release branch, and
devops release preparemoves the revision at each cut.
Today nothing reconciles the cluster, and nothing removes what git no longer has.
Evidence of 2026-10-03, at 321ecda (live reads on homelab-k3s; Secrets by name only):
Argo CD has no Applications, and the ones in git cannot sync.
-
Argo CD v3.5.3 (chart argo-cd 10.9.6) runs with zero Applications.
-
The app-of-apps points at paths that do not exist:
k8s/argocd/apps/root-app.yaml:14(argocd/apps);infra-apps.yaml:14and:38(monitoring,otel);llm-apps.yaml:14(llm).
All use
targetRevision: HEAD. -
All three files carry
resources-finalizer.argocd.argoproj.io, so deleting one would delete everything it synced. -
kubectl kustomize k8s/llmfails onca-configmap.yaml(k8s/llm/kustomization.yaml:7), which feat(k8s): modernize monitoring stack, llm profiles, traefik routing, and remove squid proxy #734 deleted.
The cluster is built by hand-run commands.
-
deploy-stack runs
helm upgrade --installfor each release in_HELM_RELEASES_BY_STACK(src/devops_cli/commands/k8s/stack_lifecycle.py:63) with no--version(_build_helm_upgrade_cmd, :514). It then applies_MANIFESTS_BY_STACK(:148) and runskubectl apply -k k8s/(:772). -
helm list -Ashows argocd at revision 107, open-webui at 115, otel-collector at 112 and qdrant at 110. -
Live chart versions:
- argo-cd 10.9.6, prometheus-operator-crds 32.0.1, k8s-monitoring 4.5.2, prometheus 29.35.0;
- grafana 10.5.15, dcgm-exporter 4.8.4, opentelemetry-collector 0.175.0, pyroscope 2.3.1;
- open-webui 16.6.0, qdrant 1.19.1, loki 7.3.0;
- fluent-bit 0.58.3 (fix(k8s): pod logs reach loki once and labelled, with alloy as the only shipper (remove fluent-bit) #548 removes it);
- traefik 41.6.0, installed by hand in kube-system with k8s/ingress/traefik-values.yaml.
That is 13 releases: 12 in
_HELM_RELEASES_BY_STACK, plus traefik. -
The k8s-monitoring chart's alloy-operator installs its own releases (
k8s-monitoring-alloy-logs,-metrics,-singleton). -
Other hand steps:
kubectl apply -k k8s/cloudflared/(k8s/README.md:267);devops k8s apply k8s/ingress/ingress-routes.yaml --template(:275);- the monitoring perimeter (fix(k8s): deploy-stack applies the monitoring namespace perimeter #913);
- valkey-runs (:69);
- k8s/coredns, a k3s addon patch.
Leftovers are removed by hand.
- Today's cleanup removed the
squidnamespace, vLLM PVCs and policies, the Servicesllm/ollamaandllm/ollama-nodes, and a PV bound to an offline node. All were left by feat(k8s): modernize monitoring stack, llm profiles, traefik routing, and remove squid proxy #734 and fix(k8s): monitoring ingress admits 0.0.0.0/0, qdrant ignores its security context, and single-ollama leftovers remain #953, and prune would have removed every one. - Still live and untracked:
- Secret
cloudflared/cloudflared-tunnel-token, while the Deployment readscloudflared-token(k8s/cloudflared/deployment.yaml:43); - Secret
monitoring/kube-prometheus-kube-prome-admission, from a kube-prometheus-stack install that nothing in git has.
- Secret
Data.
- All 7 PVs are
local-pathwith reclaimDelete. - Chart PVCs (grafana, prometheus-server, open-webui) and
registry-data(k8s/registry/pvc.yaml) would be tracked. - StatefulSet claims are created by their controllers.
qdrant-storage-qdrant-0anddata-pyroscope-0have no owner. storage-loki-0is owned by its StatefulSet: the loki StatefulSet haspersistentVolumeClaimRetentionPolicy.whenDeleted: Delete(chart valuesingleBinary.persistence.enableStatefulSetAutoDeletePVC: true). Deleting or recreating it would delete the claim, and the logs with it.- Argo CD's
Delete=falsecovers only Application deletion. A manifest removed from git is pruned unless it carriesPrune=false. Several options share oneargocd.argoproj.io/sync-optionsannotation, comma-separated. - Pruning a Namespace deletes its PVCs and Secrets.
Objects Argo CD would list as orphans.
- In the namespaces it will manage, these have no owner and will never be in git:
- the PVCs above;
- Secrets
llm/llm-gateway-secrets,llm/qdrant-api-key,cloudflared/cloudflared-token,argocd/argocd-initial-admin-secretandargocd/argocd-redis; - Helm records
sh.helm.release.v1.*.
- k8s/ingress/ingress-routes.yaml puts an IngressRoute (:509-520) and an Ingress (:512) in kube-system.
- k8s/gpu-feature-discovery/daemonset.yaml:5 deploys into
default.
Duplicates.
- Namespaces argocd, llm, monitoring and otel are declared in
k8s/namespaces.yamland again in per-directorynamespace.yamlfiles. The root file's labels are a superset of the per-directory ones and match the live namespaces. monitoring/service-aliases.yamlandmonitoring/dashboardssit in both the root and the monitoring kustomizations (this issue's comment of 2026-10-01).k8s/overlays/templated/kustomization.yamllists../../cloudflared, which the root kustomization also lists (k8s/kustomization.yaml:6).k8s/llm/kustomization.yamllists portkey (:15-18) and valkey-runs (:9). Neither runs, andvalkey-runs-authdoes not exist.
Policies, live against git (kubectl diff):
k8s/argocd/networkpolicy.yamlis not applied. As written it would cut Argo CD off from the API server (fix(k8s): deploy-stack applies the monitoring namespace perimeter #913, problem lines 40-41). The chart's own four policies are live.otel-default-perimeterwas applied by hand on 2026-10-02. The file differs only by adding port 4040.monitoring-default-perimeter: the file drops the live0.0.0.0/0ingress peer (fix(k8s): monitoring ingress admits 0.0.0.0/0, qdrant ignores its security context, and single-ollama leftovers remain #953) and adds 4040 (feat(k8s): integrate grafana pyroscope to the monitoring stack #943).- The gateway, llm, logging, cloudflared and vLLM profiles policies equal the live copies.
The domain.
- 23 Ingress hosts and one IngressRoute match (
Host(`traefik.example.com`), ingress-routes.yaml:520) use the placeholderexample.com. It is substituted at apply time (src/devops_cli/k8s/template.py:66-70). - Argo CD renders git as it is.
Generated values.
k8s/monitoring/grafana-values.yaml:27setsadminPassword: "", sohelm templategenerates a new password on every render.argocd-secretis rendered by the chart.
Health. All 19 Ingresses have an empty status.loadBalancer, and the traefik Service is ClusterIP. Argo CD reports such Ingresses as Progressing.
Secrets out of band: cloudflared/cloudflared-token, llm/llm-gateway-secrets (master-key) and llm/qdrant-api-key, plus the Argo CD-generated argocd-initial-admin-secret and argocd-redis. #741's devops k8s push-secrets writes the first three from the keyring, and deploy-stack runs it before applying anything that reads them.
Release.
devops release preparemoves no cluster revision (release.py:747-757).- The cut stages only
_release_paths(release.py:522-537). - fix(release): one fail-closed release path: cut branch from the remote release tip,
uv.lockbump, draft flag, required label and milestone #982 sends the cut commit tomainfromchore/cut-vX.Y.Z. - feat(github): current release admission, cap, descoping and stall rules (
devops roadmap reprioritize) #740 creates the nextrelease/vX.Y.Zfrom main's head at ship. - After v0.2.29 the next open release is v0.3.0 (milestone feat(release): v0.2.8 #28).
Drift. devops argo gitops drift (src/devops_cli/commands/argo.py:924) reports only local working-tree changes. devops argo cd apps list (:186) shows Sync and Health.
Proposed solution
Applications
k8s/argocd/bootstrap/bootstrap.yaml: Applicationbootstrap, onmain, pathk8s/argocd/bootstrap, which holds onlycluster.yaml.cluster.yaml: Applicationcluster, onrelease/vX.Y.Z(the current release), pathk8s/argocd/apps.- Both use project
defaultand carry no resources finalizer. k8s/argocd/apps/projects.yamldefines two AppProjects. Both haveclusterResourceWhitelist: [{group: '*', kind: '*'}]and sourceRepos = this repo, the Helm repos of_HELM_REPOS(stack_lifecycle.py:38-60) and traefik's.homelab:- destinations: argocd, cloudflared, devops, llm, logging, monitoring, otel, registry;
orphanedResources.warn: true, withignoreentries for:- the push table's Secrets by name;
argocd-initial-admin-secretandargocd-redis;- Secrets
sh.helm.release.v1.*; - every PersistentVolumeClaim;
- Jobs
devops-cli-*(feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's cluster jobs).
homelab-system: destinations kube-system, default and the namespaces theingressApplication writes to. No orphan warnings, since k3s owns most of kube-system.
- One Application per directory:
- in
homelab:base(the root kustomization),monitoring,llm,otel,logginganddevops(k8s/overlays/homelab/devops); - in
homelab-system:ingress(k8s/overlays/homelab/ingress) andgpu-feature-discovery.
- in
- One multi-source Application per release in
_HELM_RELEASES_BY_STACK, plus traefik inhomelab-system. Each pins its chart (targetRevision: <x.y.z>) and reads$values/k8s/...from this repo at the current release branch. - Every Application:
syncPolicy.automated: {prune: true, selfHeal: true}, with aretryand backoff.- Leaf Applications carry
resources-finalizer.argocd.argoproj.io.bootstrap,clusterandargocdcarry none. prometheus-operator-crdsusesServerSideApply=true.- Applications that render custom resources whose CRDs another Application installs use
SkipDryRunOnMissingResource=true: k8s-monitoring, dcgm-exporter, andingress(for the IngressRoute).
- Leaf Applications carry
Release tracking
devops release prepare X.Y.Zrewrites every git-sourcetargetRevisionunderk8s/argocd/(Applications and$valuesrefs) torelease/v<next>. Next is the lowest-numbered open release above X.Y.Z, read through the roadmap store (refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768)._release_pathsgainsk8s/argocd/.- When the release PR merges,
mainpointsclusterat the next branch, which feat(github): current release admission, cap, descoping and stall rules (devops roadmap reprioritize) #740 creates from main's head.
Data safety
- Every Namespace and PVC rendered from the repo carries
Prune=false,Delete=false. - loki sets
singleBinary.persistence.enableStatefulSetAutoDeletePVC: false. - The argo-cd chart sets
crds.annotationsargocd.argoproj.io/sync-options: ServerSideApply=true,Prune=false,Delete=false.crds.keepstays true. - Before the merge, a person sets every bound PV to Retain.
Ownership. Every object belongs to exactly one Application.
Secrets. devops k8s push-secrets (#741) writes every out-of-band Secret from the keyring. This item adds the monitoring/grafana-admin row.
deploy-stack. Every release gains its pinned version. Where Application cluster exists in argocd, deploy-stack still pushes the same Secrets it pushes without Argo CD (#741), then applies nothing else and says that Argo CD manages the rest; teardown-stack refuses.
Drift is reported by Argo CD (see the key questions).
Scope
Argo CD files
- Delete
k8s/argocd/apps/root-app.yaml,infra-apps.yamlandllm-apps.yaml. - Add
k8s/argocd/bootstrap/bootstrap.yaml,k8s/argocd/bootstrap/cluster.yaml,k8s/argocd/apps/projects.yamland one file per Application. - In
argo.py,--root-appdefaults tok8s/argocd/bootstrap/bootstrap.yaml(:336) and--app-nametocluster(:864, :977). docs/commands/argo.md is regenerated.
Ownership clean-up
-
Delete the per-directory
namespace.yamlfor argocd, llm, monitoring and otel, and their kustomization entries.k8s/namespaces.yamlstays the one declaration;devopsis feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's. Every Namespace gets the annotation. -
k8s/monitoring/kustomization.yamlkeeps onlynetworkpolicy.yaml. -
k8s/llm/kustomization.yamldropsca-configmap.yaml,portkey/*andvalkey-runs.yaml, with a comment naming how each is applied:- valkey-runs: by
devops ai runs(commands/ai_runs.py:124-130); - portkey: by hand; nothing applies it today.
gateway/networkpolicy.yamlstays, since the live copy equals the file. - valkey-runs: by
-
k8s/argocd/kustomization.yamldropsnamespace.yamland keeps listingnetworkpolicy.yaml. No Application syncsk8s/argocd/as a kustomization, so that policy stays unapplied until the argocd/otel perimeter follow-up (fix(k8s): deploy-stack applies the monitoring namespace perimeter #913, KQ 3). tests/test_k8s_network_policies.py passes unchanged. -
k8s/otel/kustomization.yamlkeepsnetworkpolicy.yaml; theotelApplication syncs it. -
Add
k8s/logging/kustomization.yaml, listingnetworkpolicy.yaml.
Domain
k8s/overlays/homelab/ingress/(resources:../../../ingressonly) andk8s/overlays/homelab/devops/(resources:../../../devops) replacek8s/overlays/templated/, which nothing references.- Each patches every Ingress host and the IngressRoute match from
example.comto the homelab domain. k8s/coredns/stays outside Argo CD, and the README names it.
Values
- grafana:
admin.existingSecret: grafana-admin. - The PVC annotation keys of grafana (
persistence.annotations), prometheus (server.persistentVolume.annotations) and open-webui (persistence annotations) are set toPrune=false,Delete=false. - loki:
singleBinary.persistence.enableStatefulSetAutoDeletePVC: false. - argo-cd:
crds.annotationsas above. - traefik:
providers.kubernetesIngress.publishedService.enabled: true. If a ClusterIP Service leaves the Ingress status empty, add an Ingress health customization ink8s/argocd/values.yaml. k8s/registry/pvc.yamlgets the sync-options annotation.
push-secrets row (#741's table): monitoring/grafana-admin, stack infra.
admin-useris the literaladmin.admin-passwordcomes from keyringgrafana_password, is required, and is adopted from the chart's livemonitoring/grafanakeyadmin-passwordwhen the keyring lacks it. It is generated only when both lack it. Grafana keeps the admin password in its database after the first start, so the live value must carry over.- It restarts
deployment/grafana. _sync_grafana_credentials(src/devops_cli/k8s/credentials.py:534) stops writinggrafana_passwordto the keyring, because feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 copies no table Secret cluster → keyring. It mints the Grafana API token with the keyring's password.
The gateway, Qdrant, run index and tunnel rows are feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's.
deploy-stack
_HELM_RELEASES_BY_STACKentries gainversion, and--versionis passed.- When
kubectl -n argocd get application clustersucceeds, deploy-stack runs only feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's push for its stacks, skipskubectl apply -k, the raw manifests and Helm, and exits 0, printing that Argo CD manages the cluster and naming the README's GitOps section. teardown-stack refuses with exit 1. - No new stack value.
Release
- The targetRevision step goes in the bump block, after feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's tag step.
_release_pathsgainsk8s/argocd/.release checkfails when the git-source targetRevisions differ from each other, or do not name a release above the version.
Docs
- A k8s/README.md "GitOps" section covering:
- bootstrap and adoption;
- recovery:
helm upgrade --install argocd argo/argo-cd --version 10.9.6 -n argocd -f k8s/argocd/values.yaml, thendevops argo cd apps bootstrap-gitops; - the drift commands;
- the table of replaced hand steps.
changelog.d/755.md; task filedocs/agent/tasks/task-755-argocd-reconciles-cluster.md.
Acceptance criteria
In the gate (pure Python file reads, a stub store and a patched runner; under 1 s: uv run pytest tests/test_k8s_argocd_apps.py tests/test_release.py tests/test_k8s_stack_lifecycle.py --durations=0):
- Applications (tests/test_k8s_argocd_apps.py):
- Every Application's project is
homelaborhomelab-system, exceptbootstrapandcluster, which usedefault. - No
homelabApplication targets kube-system or default. - Each has
automated.pruneandautomated.selfHealtrue. - Git sources name this repo, and their targetRevisions are equal and match
release/v\d+\.\d+\.\d+, exceptbootstrap, which usesmain. - Helm sources pin exact versions.
- Every
pathexists, and every resource each synced kustomization lists exists, including akustomization.yamlin each listed directory. - The Helm Applications match
_HELM_RELEASES_BY_STACKplus traefik by name, chart, namespace, values file and version. bootstrap,clusterandargocdcarry noresources-finalizer.argocd.argoproj.io.- Both projects whitelist cluster-scoped kinds.
homelabhasorphanedResources.warn: true, with ignore entries for each push-table Secret name,sh.helm.release.v1.*, PersistentVolumeClaim and Jobdevops-cli-*.
- Every Application's project is
- Ownership. Each rendered raw object (group, kind, namespace, name) appears in exactly one Application's synced paths. Each Namespace is declared once.
- Data safety.
- Every Namespace and PVC in a synced raw manifest has sync-options containing
Prune=falseandDelete=false. - The grafana, prometheus and open-webui values set that annotation at the chart's PVC annotation key.
- loki's
enableStatefulSetAutoDeletePVCis false. - argo-cd's
crds.annotationssync-options containServerSideApply=true,Prune=falseandDelete=false.
- Every Namespace and PVC in a synced raw manifest has sync-options containing
- Perimeters.
- No Application syncs a kustomization that lists
k8s/argocd/networkpolicy.yaml. - The
otelApplication's kustomization listsnetworkpolicy.yaml. - tests/test_k8s_network_policies.py passes unchanged.
- No Application syncs a kustomization that lists
- Domain.
- No synced raw manifest, after the overlay patches, contains
example.com. - Every Ingress host and the IngressRoute match equal the template render (template.py:66-70) for the overlay's domain.
- No synced raw manifest, after the overlay patches, contains
- Release.
- With a store whose open releases are v0.2.27 and v0.2.28,
release prepare 0.2.27on atmp_pathtree sets every git-source targetRevision torelease/v0.2.28and leaves chart versions alone. - With no open release above the one being prepared, it exits 1 and changes nothing.
_release_paths(root)containsk8s/argocd/.- Mismatched targetRevisions make
release checkexit 1.
- With a store whose open releases are v0.2.27 and v0.2.28,
- deploy-stack.
- When
kubectl -n argocd get application clustersucceeds,--stack infra|llm|logging|allrecords only feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's server-side Secret apply (nokubectl apply -k, raw manifest or Helm call), exits 0 and names the README's GitOps section;teardown-stackexits 1 naming it. - Otherwise each
helm upgradecarries--version, equal to the table's.
- When
- push-secrets.
- feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's table has the
monitoring/grafana-adminrow: stackinfra,admin-userliteraladmin,admin-passwordfromgrafana_passwordwith adopt-frommonitoring/grafanaadmin-password, restartdeployment/grafana. - k8s/monitoring/grafana-values.yaml sets
admin.existingSecret: grafana-adminand noadminPassword, and feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's reference guard test passes.
- feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's table has the
- Docs regenerate,
changelog.d/755.mdexists, CHANGELOG.md and docs/ROADMAP.md are untouched, anduv run devops cipasses within budget.
Pending a person (homelab-k3s). Merges into the current release branch deploy.
- Before merge, data:
- Record
kubectl --context homelab-k3s get pvc -A -o custom-columns=NS:.metadata.namespace,NAME:.metadata.name,UID:.metadata.uidin the PR. - Set each bound PV to Retain: first
kubectl --context homelab-k3s patch pv <name> -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}' --dry-run=server, then the same without--dry-run.
- Record
- Before merge, diff:
kubectl --context homelab-k3s diff -kfork8s, monitoring, llm, otel, logging, gpu-feature-discovery,k8s/overlays/homelab/ingressandk8s/overlays/homelab/devops.helm template <release> <repo>/<chart> --version <v> -n <ns> -f k8s/<values> | kubectl --context homelab-k3s diff -n <ns> -f -for each chart.- Every difference is settled in the PR. Expected: the monitoring perimeter drops the
0.0.0.0/0peer and adds 4040; otel adds 4040. - Record
count by (job) (up == 1)from Prometheus.
- Secrets:
uv run devops k8s push-secrets --stack infra --context homelab-k3s --dry-runshowsmonitoring/grafana-adminadmin-passwordaswould adoptorunchanged, neverdiffers. The same without--dry-runexits 0, and the Grafana admin login still works. - After merge:
uv run devops argo cd apps bootstrap-gitops -f k8s/argocd/bootstrap/cluster.yaml --context homelab-k3s.- Within 15 minutes,
kubectl --context homelab-k3s -n argocd get applications -o custom-columns=NAME:.metadata.name,SYNC:.status.sync.status,HEALTH:.status.health.status,CONDITIONS:.status.conditions[*].typeshows every ApplicationSyncedandHealthy, with onlyOrphanedResourceWarningconditions. - The PVC UIDs equal the recorded ones. Every tracked PVC shows
Prune=false,Delete=false(jsonpath on.metadata.annotations.argocd\.argoproj\.io/sync-options). - Monitoring under its first synced perimeter:
count by (job) (up == 1)equals the recorded value, and Grafana's Prometheus, Loki, Jaeger and Pyroscope datasources pass "Save & test" (fix(k8s): deploy-stack applies the monitoring namespace perimeter #913's checks).
- Leftovers:
- Delete only
cloudflared/cloudflared-tunnel-tokenandmonitoring/kube-prometheus-kube-prome-admission, each first with--dry-run=server. - Record in the PR any other resource an
OrphanedResourceWarningnames, and leave it alone. Never delete on that warning alone a PVC, a Secret, a NetworkPolicy, or anything in kube-system, default or local-path-storage. kubectl --context homelab-k3s get ns -o go-template='{{range .items}}{{if not (index .metadata.annotations "argocd.argoproj.io/tracking-id")}}{{.metadata.name}}{{"\n"}}{{end}}{{end}}'prints onlydefault,kube-node-lease,kube-public,kube-systemandlocal-path-storage.
- Delete only
- Helm records:
- For each release an Application adopted (not the alloy-operator's
k8s-monitoring-alloy-*releases), runkubectl --context homelab-k3s -n <ns> delete secret -l owner=helm,name=<release> --dry-run=server, then the same without--dry-run. - Afterwards
helm --kube-context homelab-k3s list -Alists only the alloy-operator's releases.
- For each release an Application adopted (not the alloy-operator's
- Self-heal:
kubectl --context homelab-k3s -n otel scale deploy jaeger --replicas=2. Within 5 minutes,kubectl --context homelab-k3s -n otel get deploy jaeger -o jsonpath='{.spec.replicas}'prints1(k8s/otel/jaeger.yaml:10). - At this release's ship:
uv run devops argo cd apps bootstrap-gitops --context homelab-k3s(the new default,bootstrap.yaml).- After feat(github): current release admission, cap, descoping and stall rules (
devops roadmap reprioritize) #740 creates the next branch,kubectl -n argocd get application cluster -o jsonpath='{.spec.source.targetRevision}'prints it.
Key questions
-
One PR? Yes. It is mostly YAML, plus small changes to:
release.py(the step,_release_paths, the check);- deploy-stack (versions and the refusal);
- feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's push table (the
grafana-adminrow); - the argo defaults.
There is no new deploy-stack value; recovery is the README's two commands.
-
How does the cluster move to the next branch without a hand step?
- Through the two levels:
bootstraponmainpointsclusterat the release branch. - The cut commit, with
k8s/argocd/in_release_paths, lands onmainthrough fix(release): one fail-closed release path: cut branch from the remote release tip,uv.lockbump, draft flag, required label and milestone #982'schore/cut-vX.Y.Z. - A self-managed root on the release branch could not move, because the cut never lands there.
- Through the two levels:
-
Which "next" release? The lowest-numbered open release above the one being prepared, from the store. It is not a patch bump: v0.2.29 is followed by v0.3.0. If there is none, the command exits 1 before editing.
-
What about Argo CD itself?
- It is self-managed (
argocdApplication, chart 10.9.6,k8s/argocd/values.yaml). - It has no resources finalizer, and its CRDs carry
Prune=false,Delete=false, so no sync or deletion can remove the Applications. - Recovery: the README's
helm upgrade --install … --version 10.9.6, thenbootstrap-gitops.
- It is self-managed (
-
Delete=falseorPrune=false? Both:Prune=falsekeeps data when a manifest leaves git.Delete=falsekeeps it when an Application is deleted.- Namespaces get both.
- A manifest removed on purpose leaves its Application OutOfSync until a person deletes the object, after a backup. So deleting data stays a person's step.
- StatefulSet claims are not tracked, and loki's auto-delete is turned off.
-
Finalizers? Leaf Applications carry the resources finalizer, so removing a stack removes its workloads, while data survives through
Delete=false.bootstrap,clusterandargocdcarry none, so a rename or deletion never cascades. -
Orphans?
- Warnings are on in
homelaband ignore the objects that are deliberately not in git: the push table's Secrets, Argo CD's generated Secrets, Helm records, PVCs and cluster jobs. - kube-system and default sit in
homelab-system, without warnings, because k3s owns them. - A warning is a report. A person deletes only what the item names.
- Warnings are on in
-
What does the first sync change?
- portkey and valkey-runs leave the
llmkustomization. - The argocd perimeter file stays unsynced.
- The monitoring perimeter's diff is applied (fix(k8s): monitoring ingress admits 0.0.0.0/0, qdrant ignores its security context, and single-ollama leftovers remain #953, feat(k8s): integrate grafana pyroscope to the monitoring stack #943), and otel gains 4040.
- Everything else is adopted as it is live.
- portkey and valkey-runs leave the
-
Domain? It is in git, in the homelab overlays. It is not a secret: it is public DNS and already in source help text (src/devops_cli/commands/cloudflare.py:238).
-
What replaces the hand steps?
Hand step today After this item deploy-stack's helm upgradePinned Helm Applications. deploy-stack pins the same versions for clusters without Argo CD kubectl apply -k k8s/cloudflared/baseingress --templateingress, over the homelab overlaymonitoring perimeter by hand monitoringdevops k8s apply k8s/devops/ --templatedevops, over the homelab overlay--from-literalSecrets and deploy-stack's qdrant Secretpush-secrets(feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741), which deploy-stack still runs under Argo CDleftover clean-up prune, plus orphan warnings release preparebumped nothing in k8s/the image tag (feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741) and the revision What stays by hand:
k8s/coredns/(k3s owns it) and the two one-time bootstrap applies. -
How is drift reported?
- Self-heal reverts edits to tracked fields and records them in the Application's history.
- Untracked objects show as
OrphanedResourceWarning. - Stray namespaces show in the tracking-id check.
- Sync and health show in
devops argo cd apps listand inkubectl -n argocd get applications. - Metrics, dashboards and alerts are Metrics for the rest of the platform #551 and Alerts fire into nothing: no Alertmanager, and k3s false positives #549.
-
How does a person try a change before merge? With
kubectl diffagainst the branch render. Self-heal reverts live trials in managed namespaces, by design: the release branch is the integration environment. A merge deploys within the 120 s reconciliation (plus up to 60 s jitter), and a revert PR undoes it. -
Grafana's generated password?
admin.existingSecret, filled bypush-secrets. -
Ingress health? Traefik publishes its Service in the Ingress status. If that stays empty, a health customization marks Ingresses Healthy.
-
Monitoring perimeter and fix(k8s): deploy-stack applies the monitoring namespace perimeter #913? This item deploys it through
monitoring. When fix(k8s): deploy-stack applies the monitoring namespace perimeter #913 moves it into the root kustomization, fix(k8s): deploy-stack applies the monitoring namespace perimeter #913 drops it fromk8s/monitoring/kustomization.yamlin the same PR.
Out of scope
- The argocd perimeter, and otel's
0.0.0.0/0rule (the follow-up to fix(k8s): deploy-stack applies the monitoring namespace perimeter #913, KQ 3). - The gateway policy's content (fix(k8s): deploy-stack applies the llm gateway policy and narrows its egress #795).
- vLLM manifests (chore(ai): remove the code, config and policies left over from the removed vLLM deployments #820).
- Metrics for the rest of the platform #551 and Alerts fire into nothing: no Alertmanager, and k3s false positives #549.
- coredns.
- RBAC for agents.
- The runtime,
devops k8s push-secretsand its table (feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741). - Edits to CHANGELOG.md and docs/ROADMAP.md.
Strategic alignment
- Milestone: v0.2.27, proposed. No person placed this item.
- Priority: P1, from the owner's direction of 2026-10-03.
- Value: High. Effort: High.
- Depends on: feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 (push-secrets and its table, deploy-stack's push step,
k8s/devops/). - Sequencing: after fix(release): one fail-closed release path: cut branch from the remote release tip,
uv.lockbump, draft flag, required label and milestone #982 (bump block), fix(k8s): pod logs reach loki once and labelled, with alloy as the only shipper (remove fluent-bit) #548 and feat(k8s): the roadmap service runs in the cluster's devops namespace, reachable from outside only on /webhooks/github #1083 when they land first. If fix(k8s): pod logs reach loki once and labelled, with alloy as the only shipper (remove fluent-bit) #548 lands later, it deletes the fluent-bit Application. If feat(k8s): the roadmap service runs in the cluster's devops namespace, reachable from outside only on /webhooks/github #1083 lands later, it adds its host to the devops overlay. - Lands before: fix(k8s): deploy-stack applies the monitoring namespace perimeter #913 and fix(k8s): deploy-stack applies the llm gateway policy and narrows its egress #795 (v0.2.29).
- Related: the argocd/otel perimeter follow-up (to file per fix(k8s): deploy-stack applies the monitoring namespace perimeter #913, KQ 3), Metrics for the rest of the platform #551, Alerts fire into nothing: no Alertmanager, and k3s false positives #549, chore(ai): remove the code, config and policies left over from the removed vLLM deployments #820, fix(cli): docs check resolves every devops argv in src #868, fix(ai): the knowledge base names only commands, options and components that exist #920, docs: hand-written docs name only commands, options and components that exist #921, fix(k8s): tunnel sync and url setup still overwrite settings they should keep #794 and feat(github): current release admission, cap, descoping and stall rules (
devops roadmap reprioritize) #740.
Readiness check (2026-10-04)
Checked at b61e5a0 (release/v0.2.26).
Dependencies.
- Merged: feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741, fix(release): one fail-closed release path: cut branch from the remote release tip,
uv.lockbump, draft flag, required label and milestone #982 and fix(k8s): pod logs reach loki once and labelled, with alloy as the only shipper (remove fluent-bit) #548 (v0.2.26); refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768 and feat(github): current release admission, cap, descoping and stall rules (devops roadmap reprioritize) #740 (v0.2.25). - feat(k8s): the roadmap service runs in the cluster's devops namespace, reachable from outside only on /webhooks/github #1083 is still open, but it is in v0.2.26, so it lands first. Its host goes into the
devopsoverlay with this item. - fix(k8s): deploy-stack applies the monitoring namespace perimeter #913 and fix(k8s): deploy-stack applies the llm gateway policy and narrows its egress #795 (v0.2.29) still come after this item.
Since #548. fluent-bit has left _HELM_RELEASES_BY_STACK (stack_lifecycle.py:65), which now holds 11 releases.
- That makes 12 Helm Applications (the 11 plus traefik), and there is no fluent-bit Application.
- fix(k8s): pod logs reach loki once and labelled, with alloy as the only shipper (remove fluent-bit) #548's person step
helm uninstall fluent-bit -n loggingmust run before the after-merge check thathelm list -Alists only the alloy-operator's releases.
Since #741.
- The push table is
CLUSTER_SECRETS(src/devops_cli/k8s/cluster_secrets.py:161), and the reference guard istests/test_k8s_push_secrets.py:226. devopsis a detached stack (DETACHED_STACKS,cluster_secrets.py:25). Itsk8s/devops/namespace.yamlstays the onedevopsdeclaration and also gets the annotation.- deploy-stack has
--push-secrets/--no-push-secrets(stack_lifecycle.py:688-690). Under Argo CD it pushes only when that flag is on.
Since #982.
- The bump block is
_apply_cut_modifications(release.py:1034-1049). The targetRevision step goes after_update_service_image_tag(:1040). cut_release(:1328) calls it, and servesrelease prepare(:893),release pr(:1457) and the automatic cut indevops roadmap close(commands/roadmap.py:461). So every cut moves the revision.release.py:747-757now refers to this block,_release_pathsis at:656-676, andrelease checkis at:1568.
Moved citations.
- In
stack_lifecycle.py:_HELM_REPOS:38-60→:58, with_HELM_REPOS_BY_STACKat:41;_MANIFESTS_BY_STACK:148→:144;_build_helm_upgrade_cmd:514→:461;kubectl apply -k:772→:749.
k8s/README.md:267,:275and:69→:417,:425and:70.ingress-routes.yaml: the only object in kube-system is the IngressRoutetraefik-dashboard(:484-495, match at:495). There is no Ingress there._sync_grafana_credentials→credentials.py:512.tests/test_k8s_stack_lifecycle.pydoes not exist yet. Liketests/test_k8s_argocd_apps.py, it is a new file; today's deploy-stack tests are intests/test_k8s.py.- Alerts fire into nothing: no Alertmanager, and k3s false positives #549 is delivered.
Rule alignment: dry run (#412). A dry run makes no request, reads included.
- deploy-stack and teardown-stack do not run
kubectl -n argocd get application clusterunder--dry-run. They list that probe first and condition the later steps on its result. release preparereads no roadmap store under--dry-run. The next release shows as a<next open release>placeholder.- The person step that has
push-secrets --dry-runshowwould adoptcannot hold: since feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741, a dry run resolves nothing. That preview is--plan(cluster_secret_push.py:203).
Amended criteria:
- Under
--dry-run, deploy-stack and teardown-stack exit 0 and record nokubectlorhelmcall on the patched runner, the Argo CD probe included.release prepare 0.2.27 --dry-runmakes no call on the stub store and changes no file. - (replaces the Secrets person step)
uv run devops k8s push-secrets --stack infra --context homelab-k3s --planshowsmonitoring/grafana-adminadmin-passwordaswould adoptorunchanged, neverdiffers. The same command without--planexits 0, and the Grafana admin login still works.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
chore(docs): record roadmap service decisions and the machine-account…
dan-petty commentedon Oct 1, 2026
When this lands, watch for one thing. #692 makes the root kustomization apply
k8s/monitoring/dashboards, andk8s/monitoring/kustomization.yamllistsdashboardstoo. Once themonitoring-stackArgoCD app points atk8s/monitoring(prune and self-heal on), ArgoCD anddevops k8s deploy-stackwill both apply the dashboard ConfigMaps. Either leavedashboardsout of the ArgoCD app, or have deploy-stack stop applying it, so the ConfigMaps have one owner andteardown-stack --stack alldoesn't fight self-heal.feat(release): v0.2.24 (#905)
[-]fix(k8s): argocd applications point at repo paths that don't exist[/-][+]feat(k8s): argo cd keeps the homelab cluster at the current release branch, with automated sync, prune and self-heal that never delete data[/+]3 remaining items
dan-petty-bot commentedon Oct 6, 2026
Moved to v0.2.28: every other item in v0.2.27 is done, and it had not started. (devops roadmap reprioritize)
dan-petty-bot commentedon Oct 6, 2026
Moved to the backlog: after v0.2.27 started, only a critical fix can join it. A person can place it in a planned release, and that placement stands. (devops roadmap reprioritize)
feat(k8s): argo cd keeps cluster at declared state and release workfl…
dan-petty-bot commentedon Oct 6, 2026
Moved to the backlog: after v0.2.27 started, only a critical fix can join it. A person can place it in a planned release, and that placement stands. (devops roadmap reprioritize)
dan-petty-bot commentedon Oct 6, 2026
What changed
#1256, merged into
release/v0.2.27as 5f37f2f.90 file(s) changed.
How it was verified
Check runs at 3ad85cb:
Acceptance Criteria of
docs/agent/tasks/task-755-argocd-reconciles-cluster.md:No Acceptance Criteria section.
feat(release): v0.2.27 (#1257)
refactor(release): the release no longer pins, bumps or pre-publishes…
feat(release): v0.2.32 (#1516)