Repository navigation
Description
Refreshed plan (2026-10-17, unblocking review)
This section supersedes any text below that conflicts with it.
Decisions
- None of the owner's decisions D1-D19 (owner, 2026-10-17) changes this item's scope. Decision D19 (owner, 2026-10-17) only moved two of PR 2's predecessors, feat(k8s): alert when pod logs stop reaching loki #890 and feat(k8s): the alloy collectors, grafana and pyroscope are scraped through chart integrations, and a dropped sample or log entry alerts #1131, to v0.2.38. The unblocking plan's directive does change this item: it and feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 share one post-Helm deploy-stack step, and whichever lands first adds it.
- Key question 1 is settled as one item delivered in two PRs. Reason: the GPU placement half never touches
k8s/monitoring/k8s-monitoring-values.yaml, the file that puts the ServiceMonitor move last in refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128's order, so it has no reason to wait behind that chain. Earlier PRs say "Part of #N" (fix(github): a pull request that delivers part of an item says Part of #N and passes readiness #1617, v0.2.37). - The shared step is one per-stack table of paths under
--k8s-dir, applied right after the Helm releases (step 9) and before step 10. A directory goes through_apply_kustomizations(kubectl apply -k) and a file through_apply_manifest_files(kubectl apply -f). Reason: feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 needs itsk8s/mattermostkustomization and this item needs one file, both applied after their CRDs exist, so one table keeps the files each body already names. - teardown-stack deletes the table's entries in reverse order before it uninstalls any release, as it does for
_MANIFESTS_BY_STACK, and both dry runs list them. Reason: a custom resource has to be deleted while the operator that clears its finalizers is still running. - The
llmrow needs no check that the CRD exists. Reason: the llm stack already needs infra'smonitoring.coreos.comCRDs because qdrant's release renders a ServiceMonitor, and--stack allresolves infra first.
Scope
- PR 1, GPU placement: the body's four GPU placement criteria, unchanged.
- PR 2, the ServiceMonitor move (refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128's last step): the body's ServiceMonitor criteria, with the post-Helm bullet replaced by the criteria below.
- Nothing moves to another item. test(k8s): devops k8s commands are thin adapters tested over edge fakes, and the _K8sModule patch forwarding is gone #1323 was closed as a duplicate on 2026-10-08, so its link no longer sets this item's order. The deploy-stack code it would have moved is still in
stack_lifecycle.py.
Delivery
- PR 1 (M), "Part of fix(k8s): deploy-stack warns about GPU nodes no Ollama tier accepts, k8s/README.md documents GPU placement, and the gateway's ServiceMonitor moves to the llm stack #1367": the node read and its warnings, the README's GPU placement section, and the removal of the 36 commented-out lines. It can start now.
- PR 2 (S, or M if it adds the shared step), "Closes fix(k8s): deploy-stack warns about GPU nodes no Ollama tier accepts, k8s/README.md documents GPU placement, and the gateway's ServiceMonitor moves to the llm stack #1367": the ServiceMonitor move,
SkipDryRunOnMissingResource=trueon thellmApplication, the README's dashboards row and file-tree line, and the tests that now read the new file.
- Each PR adds
changelog.d/1367.mdor extends it.
Acceptance criteria (these replace the body's "deploy-stack applies the monitor after the Helm releases" bullet; every other body criterion stands)
-
k8s/llm/gateway/servicemonitor.yamlis thellmrow of the shared post-Helm table. If feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 has not landed, PR 2 adds the table and the step. If feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 has landed, PR 2 adds only the row. - In a recorded native
deploy-stack --stack llm(withruntime._run_cmdpatched), the monitor'skubectl applyruns after everyhelm upgrade --install. In a recordedteardown-stack --stack llm, itskubectl deleteruns before everyhelm uninstall. -
deploy-stack --dry-runandteardown-stack --dry-runlist the table's entries and still make no_run_cmdor subprocess call. -
test_prometheus_operator_crds_install_before_every_service_monitorasserts that the gateway's ServiceMonitor is in the post-Helm table and that no file in_MANIFESTS_BY_STACKholds a ServiceMonitor. -
test_manifests_by_stack_files_exist, or a test beside it, fails when a path in the post-Helm table is missing.
Current references (checked at 3dd7fa6; these replace the body's line numbers from 910b823)
- Reachability check:
src/devops_cli/commands/k8s/stack_lifecycle.py:1051-1052. Argo CD early return::1054-1063. PR 1's node read goes between them. - Step 8's node read:
stack_lifecycle.py:1083-1088, which calls_get_unready_nodesatsrc/devops_cli/commands/k8s/cluster_runtime.py:174-200. - Helm releases (step 9):
stack_lifecycle.py:1090-1094. Step 10::1096. The shared step goes between them. _MANIFESTS_BY_STACK["llm"]:stack_lifecycle.py:181-190._KUSTOMIZATIONS_BY_STACK::210-212, whose comment at:206-209says it applies before any Secret or chart.- Apply helpers:
_apply_manifest_filesatstack_lifecycle.py:597and_apply_kustomizationsat:899-902. - teardown-stack: dry run at
stack_lifecycle.py:1199-1216, manifest deletes at:1233-1239, Helm uninstalls at:1251-1257. - The gateway's ServiceMonitor in
extraObjects:k8s/monitoring/k8s-monitoring-values.yaml:307-323. The CRD chart's comment:k8s/monitoring/prometheus-operator-crds-values.yaml:5-9. - The rule against chart-CRD kinds in a pre-chart kustomization:
k8s/monitoring/kustomization.yaml:6-8. - qdrant's ServiceMonitor:
k8s/llm/values-qdrant.yaml:74-75. Stack order forall:src/devops_cli/commands/k8s/networking.py:70-71. - feat(llm): add speed-tier service aliases, align 48gib slow routing weights and bump max loaded models #1042's live
gpu.architectureselectors:k8s/llm/profiles/ollama-profiles.yaml:207-209(24gib),:498-500(48gib) and:644-646(48gib-slow). - The commented-out blocks:
ollama-profiles.yaml:60-65,:349-354,:792-797,:939-944,:1086-1091and:1243-1248. - README: GPU placement at
k8s/README.md:125-126, the gateway's dashboards row at:189, thegateway/file-tree line at:667. - The gateway's alias Services:
k8s/llm/gateway/configmap.yaml:18,:24,:30and:53. The perimeter:k8s/llm/gateway/networkpolicy.yaml:6. k8s/argocd/apps/llm.yaml:17-26has nosyncOptions.k8s/argocd/apps/k8s-monitoring.yaml:33-34setsSkipDryRunOnMissingResource=true.k8s/llm/kustomization.yaml:4-16.- Tests:
tests/test_k8s.py:370,tests/test_stack_dashboards.py:61-68,tests/test_llm_pool_metrics.py:36andtests/test_architectural_invariants.py:1410.
Dependencies and order
- PR 1 has no blocker.
- PR 2 comes last in refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128's order. refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128 is open, P1, and a tracking parent with no release. PR 2 follows feat(k8s): the alloy collectors, grafana and pyroscope are scraped through chart integrations, and a dropped sample or log entry alerts #1131 and feat(k8s): alert when pod logs stop reaching loki #890 (both v0.2.38, by Decision D19 (owner, 2026-10-17)), fix(telemetry): devops-cli metrics reach prometheus in one hop, a late sample no longer drops a whole batch, and the collector runs only what its pipelines use #1132, fix(k8s): chart defaults stop writing logs and watches nobody reads (loki canary and per-query delete warnings, pyroscope debug logging, grafana's datasource sidecar), and loki admits only grafana and alloy from monitoring #1133 and feat(k8s): profiles come from k8s-monitoring's profiling feature for every workload, and the profiling dashboards list what is profiled #1134 (P2, no release), feat(k8s): coredns metrics and a coredns dashboard #822 and fix(k8s): the kubernetes, node and ingress dashboards query only series something serves, checked against captured exporter families and the chart allow lists #1136 (P3, no release), and Metrics for the rest of the platform #551 (v0.2.38), because it deletes
extraObjectsafter every other child that edits that file. If PR 2 goes earlier, the order change is recorded on refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128. - feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 (open, v0.2.38) shares the post-Helm step. Neither waits for the other.
- feat(llm): add speed-tier service aliases, align 48gib slow routing weights and bump max loaded models #1042 is closed, and its three selectors stay.
- This item has no milestone, and the roadmap tooling places it. The only item waiting on it is refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128, a parent, so the owner's blocker rule raises nothing.
Problem
This issue was split from #795 on 2026-10-08, when the owner reduced #795 to the gateway policy. Everything below was checked against release/v0.2.29 at 910b823.
Ollama tiers schedule only on labelled nodes, and deploy-stack does not notice.
- The nine DaemonSets in
k8s/llm/profiles/ollama-profiles.yamlrequirenvidia.com/gpu.total-vram-gib In [...]. - feat(llm): add speed-tier service aliases, align 48gib slow routing weights and bump max loaded models #1042 also requires
nvidia.com/gpu.architecture In [...]on three tiers:ollama-24gib(:148-150),ollama-48gib(:351-353) andollama-48gib-slow(:453-455). Those selectors stay, per option 1 of the owner's decision on fix(k8s): deploy-stack applies the llm gateway policy and narrows its egress #795. - GPU Feature Discovery labels per-GPU memory and the GPU count, not a total.
- The cluster's node-provisioning automation lives outside this repository. It sets
nvidia.com/gpu.presentandnvidia.com/gpu.architectureon every GPU node. It setsnvidia.com/gpu.total-vram-gibonly on nodes with more than one GPU, rounded to the nearest whole GiB. So a single-GPU node never gets the label, and a multi-GPU total may come out as a value that no tier accepts. - When no Ollama pod schedules on a node, the gateway routes to that tier fail. deploy-stack does not report it.
- deploy-stack's only node read,
_get_unready_nodes(src/devops_cli/commands/k8s/cluster_runtime.py:174-200), returns[]on every failure. It also runs at step 8 (src/devops_cli/commands/k8s/stack_lifecycle.py:1069), after the Argo CD early return (:1040-1050). A warning placed there would never print on an Argo CD-managed cluster.
The README's GPU placement section is incomplete and partly wrong. k8s/README.md:129-132 says each tier is one DaemonSet scheduled by total-vram-gib. It does not say:
- what sets the labels, or how to work out the value;
- which values each tier accepts;
- that three tiers also need
gpu.architecture; - what
llm-gateway-perimeteradmits, now that deploy-stack applies it (fix(k8s): deploy-stack applies the llm gateway policy and narrows its egress #795).
It also says the gateway reaches each tier through ollama-<n>gib. The gateway's ConfigMap actually names the alias Services ollama-16gib-fast, ollama-48gib-fast, ollama-48gib-slow and ollama-64gib-standard.
Six DaemonSets keep dead selector blocks. ollama-16gib, ollama-32gib, ollama-64gib, ollama-72gib, ollama-96gib and ollama-128gib each carry a six-line commented-out gpu.architecture/gpu.family block (for example ollama-profiles.yaml:45-50), 36 lines in all. They are left over from the vLLM/Ollama split that #734 removed.
The infra stack owns the gateway's ServiceMonitor. extraObjects in k8s/monitoring/k8s-monitoring-values.yaml:239-255 renders it, so the k8s-monitoring release owns it. That causes two problems:
teardown-stack --stack infraremoves the gateway's scrape while the gateway keeps running.- After
teardown-stack --stack llmdeletes the namespace,deploy-stack --stack llmdoes not recreate the scrape.
Listing the file in _MANIFESTS_BY_STACK["llm"] would not be enough, because deploy-stack applies native manifests (step 7) before every Helm release (step 9), prometheus-operator-crds included:
- On a fresh
--stack all, the ServiceMonitor CRD does not exist yet when the manifest is applied. - On an existing cluster, the k8s-monitoring upgrade deletes the adopted object in the same run.
Two more gaps:
test_prometheus_operator_crds_install_before_every_service_monitor(tests/test_k8s.py) checks only Helm values.k8s/argocd/apps/llm.yamlhas noSkipDryRunOnMissingResource=true, which thek8s-monitoringApplication sets.
Acceptance criteria
GPU placement:
- When
llmis selected, deploy-stack reads the nodes once, right after the reachability check and before the Argo CD early return.- It reads
kubectl get nodes -o jsonthrough a shared reader that reports failure._get_unready_nodesuses the same items. - A GPU node is one with
nvidia.com/gpucapacity above zero, or labellednvidia.com/gpu.present=true. - It warns about every GPU node that no tier accepts:
total-vram-gibis missing or not accepted, or, for the split tiers,gpu.architectureis outside the accepted values. Each warning names the node and the label, and giveskubectl label node <node> nvidia.com/gpu.total-vram-gib=<N>Gi. - If no node satisfies any tier, it also warns that no Ollama pod will schedule.
- If the read fails, it says it could not check the labels.
- In every case the deploy continues and exits 0.
- It reads
- The accepted values are read from the required
matchExpressionsof eachllm.devops.io/provider: ollamaDaemonSet inollama-profiles.yaml, never repeated in code. A guard test fails on any operator other thanIn.- Label keys and the GPU predicate's keys live in
src/devops_cli/config/constants.py. - Warning text lives in
MESSAGES.k8s.
- Label keys and the GPU predicate's keys live in
- Offline tests patch
runtime._run_cmdfor seven cases: a labelled GPU node (no warning), an unlabelled GPU node, a value outside every tier, a node without GPUs (no warning), an architecture mismatch, no node matching any tier, and a failed read.- One case runs on the Argo CD-managed path.
- A
deploy-stack --stack llm --dry-runtest asserts zero_run_cmdand subprocess calls.
- The GPU placement section of
k8s/README.mdcovers:- one DaemonSet per total-VRAM tier, behind the
ollama-<n>gibServices, plus the-fast,-slowand-standardaliases the gateway uses; - what sets the labels (the node-provisioning automation, or
kubectl label nodeby hand), and how the value is worked out, consistent with that automation; nvidia.com/gpu.present;- each tier's accepted
total-vram-gibvalues, and thegpu.architecturevalues for 24gib, 48gib and 48gib-slow; - the deploy-stack warning;
- that deploy-stack (or Argo CD's
llmApplication) appliesllm-gateway-perimeter, and what it admits.
- one DaemonSet per total-VRAM tier, behind the
- The 36 commented-out lines are removed, and feat(llm): add speed-tier service aliases, align 48gib slow routing weights and bump max loaded models #1042's three live
gpu.architectureselectors stay. Both of these print nothing:rg -n '^\s*#.*(gpu\.(family|architecture)|operator:|values:)' k8s/llm/profiles/ollama-profiles.yamlrg -n 'gpu\.family' k8s/llm k8s/README.md
ServiceMonitor (#1128's last step):
- The ServiceMonitor moves to
k8s/llm/gateway/servicemonitor.yaml, listed ink8s/llm/kustomization.yaml.extraObjectsis deleted fromk8s-monitoring-values.yaml. These are updated to match:- the comment in
k8s/monitoring/prometheus-operator-crds-values.yaml:5-8; - the gateway row of the README's dashboards table;
- the
gateway/line of the README's file tree.
- the comment in
- deploy-stack applies the monitor after the Helm releases, teardown-stack deletes it, and the dry run lists it.
test_prometheus_operator_crds_install_before_every_service_monitoralso covers deploy-stack's manifest files.- The manifest-exists invariant in
tests/test_architectural_invariants.pycovers any new manifest list.
-
k8s/argocd/apps/llm.yamlgainsSkipDryRunOnMissingResource=true. -
tests/test_llm_pool_metrics.pyandtests/test_stack_dashboards.py::_gateway_monitoredread the new file.prometheusOperatorObjectsstays enabled.
General:
- Tests touch no cluster, DNS or network, and each test's call phase stays under 1 s.
-
changelog.d/<n>.mdrecords the change.CHANGELOG.mdanddocs/ROADMAP.mdare not edited. -
uv run devops cipasses. - Pending a person: after the deploy (Argo CD's sync of the merged revision, or
devops k8s deploy-stack --stack llmon a cluster without Argo CD):devops k8s deploy-stack --stack llmwarns only about GPU nodes thatkubectl get nodes -L nvidia.com/gpu.total-vram-gib,nvidia.com/gpu.architectureshows no tier accepts.up{job="llm-gateway"} == 1afterdeploy-stack --stack llmalone, on a cluster that already runs the infra stack.helm get manifest k8s-monitoring -n monitoring | grep -c ServiceMonitorprints 0.- On a cluster without Argo CD, the one-time order is infra first, then llm.
Key questions
- One item or two? The owner grouped all four parts here on 2026-10-08. The ServiceMonitor move shares no file with the placement work and is refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128's last step. Proposed: refinement may split it into its own refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128 child if the item exceeds size M.
- Which formula does the README document? The node-provisioning automation rounds to whole GiB and labels only multi-GPU nodes, while the tiers accept multiples of 4 GiB. Proposed: document each tier's accepted values and the
kubectl label nodecommand, and record the single-GPU and rounding behaviour as a change for the provisioning automation, tracked where it lives. - Warn or fail? Warn (proposed). A cluster with no usable GPU label still gets Open WebUI, Qdrant, Valkey and the gateway, and the other selected stacks deploy in the same run.
- Keep the label key under
nvidia.com/? Yes (proposed). A rename would mean relabelling every live node at rollout; if wanted, it is a separate item. - Priority? Inherited from fix(k8s): deploy-stack applies the llm gateway policy and narrows its egress #795's grooming: on a fresh cluster or a rebuilt node, no Ollama pod schedules. The roadmap tooling may re-rank it.
Strategic alignment
- Milestone: none; the roadmap tooling places it.
- Origin: split from fix(k8s): deploy-stack applies the llm gateway policy and narrows its egress #795 (v0.2.29), which delivered the gateway policy's deploy path and narrowed egress.
- Order: this item takes fix(k8s): deploy-stack applies the llm gateway policy and narrows its egress #795's place in refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128's order, step 7: it removes
extraObjectsfromk8s-monitoring-values.yamllast, after the other children that edit that file. - Related: feat(llm): add speed-tier service aliases, align 48gib slow routing weights and bump max loaded models #1042 (architecture selectors), refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128, fix(k8s): deploy-stack applies the monitoring namespace perimeter #913, chore(ai): remove the code, config and policies left over from the removed vLLM deployments #820, feat(k8s): argo cd keeps the homelab cluster at the current release branch, with automated sync, prune and self-heal that never delete data #755, feat(k8s): modernize monitoring stack, llm profiles, traefik routing, and remove squid proxy #734.
Split from #795 by the owner's scope decision of 2026-10-08 (borrow reason: split). Filed directly because local intake could not reach the model gateway; the roadmap service's intake sets Priority, Value and Effort.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty-bot commentedon Oct 8, 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.
Users get silent gateway-routing failures and lose monitoring on llm-stack redeploy, but the cluster still runs and no data is lost.Fixes a silent operational failure mode and a monitoring gap that affect every operator deploying the llm stack on GPU nodes.Requires a new shared node-reader in deploy-stack, a warning path before the Argo CD early return, README corrections, removal of 36 dead lines, moving the ServiceMonitor to the llm manifest list with CRD-ordering handling, and test updatesdan-petty commentedon Oct 8, 2026
Linked: #1323 moves the deploy-stack code this item adds to, and #1391 needs the same post-Helm step; whichever lands first adds it. Found by the 2026-10-08 backlog review.
feat(k8s): deploy-stack warns about GPU nodes no Ollama tier accepts (#…
dan-petty commentedon Oct 21, 2026
What changed
#1796, merged into
release/v0.2.38as 81d8e0a.10 file(s) changed.
How it was verified
Check runs at 8991b2e:
Acceptance Criteria of
docs/agent/tasks/task-1367-gpu-placement-warning.md:No Acceptance Criteria section.
feat(release): v0.2.38 (#1799)
feat(release): v0.2.38 (#1798)
fix(k8s): a changed gateway ConfigMap rolls the gateway deployment, s…