Repository navigation
fix(k8s): deploy-stack --stack all and the argo cd applications deploy the same manifests and charts #1675
Description
Friction
devops k8s deploy-stack --stack all and the Argo CD Applications deploy different sets. On a cluster without Argo CD, deploy-stack installs no Traefik, no Ingresses or IngressRoutes, no Portkey, no valkey-runs and no GPU feature discovery, although Argo CD runs all of them on the homelab; in the other direction it registers k8s/argocd/networkpolicy.yaml, which no Application deploys. This breaks the AGENTS.md rule that deploy-stack deploys every manifest, and the tests hide it: the Traefik row is injected by hand and the Portkey and valkey-runs perimeters are exempted. k8s/README.md tells people to apply valkey-runs by hand although Argo CD already deploys it.
Evidence
Live, read-only, 2026-10-17 (main = 3dd7fa6). The homelab is complete because Application cluster exists and deploy-stack delegates to Argo CD; the gap is on the native path:
- Deployment
kube-system/traefikbelongs to Applicationtraefik(chart traefik-41.6.0). k3s runs with--disable traefik, so this is the cluster's only ingress controller. - 18 Ingresses and IngressRoute
kube-system/traefik-dashboardbelong to Applicationingress(k8s/ingress/ingress-routes.yaml). - Deployments
llm/portkeyandllm/valkey-runscarry tracking idsllm:apps/Deployment:llm/portkeyandllm:apps/Deployment:llm/valkey-runs. - DaemonSet
default/gpu-feature-discovery(3/3) belongs to Applicationgpu-feature-discovery.
Repo (src/devops_cli/commands/k8s/stack_lifecycle.py):
_HELM_REPOS_BY_STACK(:54-70) has no traefik repo, and_HELM_RELEASES_BY_STACK(:79-172) no traefik release._MANIFESTS_BY_STACK["llm"](:181-190) omitsk8s/llm/portkey/{configmap,deployment,service,networkpolicy}.yamlandk8s/llm/valkey-runs.yaml, whichk8s/llm/kustomization.yamllists._KUSTOMIZATIONS_BY_STACKholds only monitoring. Nothing in src/ referencesk8s/gpu-feature-discoveryork8s/ingress/ingress-routes.yaml.tests/test_k8s_argocd_apps.py:112injects traefik into the expected-release map by hand;tests/test_k8s_network_policies.py:23(UNDEPLOYED_NETWORK_POLICIES) exempts portkey-perimeter and valkey-runs-perimeter.k8s/README.md:69says valkey-runs is "not deployed by deploy-stack; apply k8s/llm/valkey-runs.yaml yourself". cloudflared's default target is Traefik (src/devops_cli/config/constants.py:600).docs/agent/tasks/task-1485-argocd-image-updater.md:34already noted "Traefik and gpu-feature-discovery have no native release either" without filing it.
Remedy
- Tests first: replace the hand-injected traefik entry (
tests/test_k8s_argocd_apps.py:112) with a test that maps every Application ink8s/argocd/appsto a deploy-stack counterpart (each chart to a release with the same version and values file, each path to a manifest list or kustomization). argocd-image-updater is the only allowed exception (k8s/README.md Service Image Updates; task-1485). Drop bothUNDEPLOYED_NETWORK_POLICIESexemptions. Both changes fail today. stack_lifecycle.py:- Traefik: repo
traefikhttps://traefik.github.io/chartsin_HELM_REPOS_BY_STACK["infra"], and a release (charttraefik/traefik, the versionk8s/argocd/apps/traefik.yamlpins, namespace kube-system, valuesk8s/ingress/traefik-values.yaml). Stock k3s ships its own Traefik HelmChart, so document (and warn in deploy-stack) that k3s must run with--disable traefik, rather than letting_adopt_helm_resource_if_conflicttake over k3s's copy. Path("gpu-feature-discovery")in_KUSTOMIZATIONS_BY_STACK["infra"](a plain DaemonSet kustomization).k8s/llm/portkey/{configmap,deployment,service,networkpolicy}.yamlandk8s/llm/valkey-runs.yamlin_MANIFESTS_BY_STACK["llm"]; they apply after step 5 pushesllm/valkey-runs-auth.k8s/ingress/ingress-routes.yamlin a manifest list, so_apply_manifest_filessubstitutes the domain; never a rawkubectl apply -k, which would apply the example.com placeholders. Keep the roadmap-service Ingress single-owned (the homelab overlay deletes the duplicate in ingress-routes.yaml for that reason).
- Traefik: repo
- The reverse gap (argocd-default-perimeter applied by deploy-stack but no Application) is settled by the argocd perimeter item; this item's test must accept its outcome.
k8s/README.md:69and the Cloudflare step: deploy-stack deploys valkey-runs and the ingress routes.changelog.d/<issue>.mdunder### Fixed.
Verify on the devcontainer's minikube (native path):deploy-stack --stack allbrings up Traefik, the Ingresses, Portkey, valkey-runs and GPU feature discovery (which schedules no pod without GPUs), and--dry-runlists them without any request.
Priority: P2. Severity medium-to-low: latent on the homelab, but it breaks the AGENTS.md deploy-everything rule and two tests mask it.
Proposed design
Problem statement
The devops k8s deploy-stack --stack all command and Argo CD Applications deploy different sets of Kubernetes manifests and charts, causing inconsistency. Specifically, deploy-stack omits Traefik, Ingresses, IngressRoutes, Portkey, valkey-runs, and GPU feature discovery, while Argo CD deploys them. This breaks the rule that deploy-stack should deploy every manifest and is hidden by tests that mask the discrepancy.
Acceptance criteria
- Criterion 1: The deploy-stack command with --stack all correctly deploys Traefik chart
Verification: Rundeploy-stack --stack alland verify that a Traefik deployment exists in kube-system namespace - Criterion 2: The deploy-stack command with --stack all correctly deploys Ingresses and IngressRoutes
Verification: Rundeploy-stack --stack alland verify that 18 Ingresses and IngressRoutekube-system/traefik-dashboardexist - Criterion 3: The deploy-stack command with --stack all correctly deploys Portkey and valkey-runs
Verification: Rundeploy-stack --stack alland verify that Deploymentsllm/portkeyandllm/valkey-runsexist - Criterion 4: The deploy-stack command with --stack all correctly deploys GPU feature discovery DaemonSet
Verification: Rundeploy-stack --stack alland verify that DaemonSetdefault/gpu-feature-discoveryexists - Criterion 5: All tests pass without hand-injected traefik entry or exemptions for network policies
Verification: Run the test suite with replaced traefik mapping and removed exemptions, ensuring no failures
Key questions
- What Helm repositories and releases are currently defined in _HELM_REPOS_BY_STACK and _HELM_RELEASES_BY_STACK for infra stack?: _HELM_REPOS_BY_STACK has no traefik repo, and _HELM_RELEASES_BY_STACK has no traefik release. [sources: src/devops_cli/commands/k8s/stack_lifecycle.py:54-70, src/devops_cli/commands/k8s/stack_lifecycle.py:79-172]
- What manifests are currently defined in _MANIFESTS_BY_STACK["llm"]?: _MANIFESTS_BY_STACK["llm"] omits k8s/llm/portkey/{configmap,deployment,service,networkpolicy}.yaml and k8s/llm/valkey-runs.yaml. [sources: src/devops_cli/commands/k8s/stack_lifecycle.py:181-190]
- What kustomizations are defined in _KUSTOMIZATIONS_BY_STACK?: _KUSTOMIZATIONS_BY_STACK holds only monitoring. Nothing references k8s/gpu-feature-discovery or k8s/ingress/ingress-routes.yaml. [sources: src/devops_cli/commands/k8s/stack_lifecycle.py:194-203]
- What changes are required to make deploy-stack consistent with Argo CD?: Tests need to be updated to map Applications to deploy-stack counterparts, stack_lifecycle.py needs Traefik repo and release added, gpu-feature-discovery kustomization added, portkey and valkey-runs manifests added, ingress-routes.yaml manifest list added, k8s/README.md needs update to reflect that valkey-runs is now deployed by deploy-stack, and changelog.d file needs to be created. (proposed) [sources: src/devops_cli/commands/k8s/stack_lifecycle.py:194-203, src/devops_cli/commands/k8s/stack_lifecycle.py:54-70, src/devops_cli/commands/k8s/stack_lifecycle.py:79-172, src/devops_cli/commands/k8s/stack_lifecycle.py:181-190, tests/test_k8s_argocd_apps.py:112, tests/test_k8s_network_policies.py:23, k8s/README.md:69]
Fit
Needs splitting into 4 items:
- Update tests to map Argo CD Applications to deploy-stack counterparts
- Modify stack_lifecycle.py to add Traefik, gpu-feature-discovery, portkey, valkey-runs and ingress routes
- Update k8s/README.md to reflect that valkey-runs is now deployed by deploy-stack
- Create changelog.d file for the fix
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 18, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
The candidate describes a discrepancy between deploy-stack and Argo CD applications, which is a bug in the system's behavior.The issue breaks a core rule of the project and affects how manifests are deployed across different paths.Fixing this ensures consistent deployment behavior, which is critical for the stability and correctness of the system.The fix involves modifying core deployment logic and test expectations, requiring significant changes to multiple files and potentially introducing regressions.dan-petty commentedon Oct 18, 2026
Proposal needs splitting into 4 items at 25e2cda (see proposed design in issue body).
fix(k8s): deploy-stack deploys everything argocd deploys (#1675) (#1712)
dan-petty commentedon Oct 20, 2026
What changed
#1712, merged into
release/v0.2.37as 07f8291.8 file(s) changed.
How it was verified
Check runs at 8be7d65:
Acceptance Criteria of
docs/agent/tasks/task-1675-deploy-stack-parity-with-argocd.md:tests/test_k8s_network_policies.pydropped all exemptions inUNDEPLOYED_NETWORK_POLICIESand passes.tests/test_k8s_argocd_apps.pyremoved hand-injected Traefik mapping and verifies that every Application ink8s/argocd/appsmaps to a deploy-stack counterpart._adopt_helm_resource_if_conflictwarns and returnsFalsewhen release name istraefik._HELM_REPOS_BY_STACK,_HELM_RELEASES_BY_STACK,_KUSTOMIZATIONS_BY_STACK, and_MANIFESTS_BY_STACKinstack_lifecycle.pyinclude all missing counterparts.k8s/README.mddocumentsvalkey-runsand Ingress route deployment bydeploy-stackand k3s--disable traefik.uv run devops ci).changelog.d/1675.md.feat(k8s): the homelab runs gitea under argo cd as a read-write inter…