Repository navigation
Description
Context & Rationale
Before fdd4d0f (#734), kube-prometheus-stack installed the monitoring.coreos.com CRDs. #734 replaced it with k8s-monitoring 4.5.2 and the standalone prometheus chart, and neither ships those CRDs. k8s-monitoring's alloy-operator subchart ships only the Alloy and PodLogs CRDs (cached chart, charts/alloy-operator/Chart.yaml:4-8).
The infra stack still creates ServiceMonitors:
llm-gateway, in k8s-monitoring's extraObjects (k8s/monitoring/k8s-monitoring-values.yaml:126-142);- dcgm-exporter's own monitor (k8s/monitoring/dcgm-exporter-values.yaml:42-45). Its template has no capability guard (cached dcgm-exporter 4.8.4, templates/service-monitor.yaml:1).
Nothing in the repo installs the CRDs: rg monitoring.coreos.com finds only k8s-monitoring-values.yaml:127.
On a cluster without the CRDs, Helm refuses both releases ("no matches for kind ServiceMonitor"). _install_single_release only prints the error and moves on (src/devops_cli/commands/k8s/stack_lifecycle.py:595-597). So devops k8s deploy-stack --stack infra finishes with no Alloy, which means no cluster metrics, no pod logs and no gateway or GPU metrics.
The homelab probably still has the CRDs that kube-prometheus-stack left behind, because Helm keeps CRDs on uninstall. That would hide the defect there. Those leftover CRDs carry no Helm ownership, and _adopt_helm_resource_if_conflict can't adopt them: its regex needs a non-empty namespace, and it always passes -n (stack_lifecycle.py:192-245, regex at line 202).
fdd4d0f is in no release yet (git tag --contains fdd4d0f prints nothing), so v0.2.24 would ship this regression.
Scope & Deliverables
- Deliverable:
- Install
prometheus-community/prometheus-operator-crdsas the first infra release in_HELM_RELEASES_BY_STACK(stack_lifecycle.py:59-128), ahead of k8s-monitoring and dcgm-exporter. The repo is already in_HELM_REPOS_BY_STACK["infra"](line 37). - Let the conflict adoption handle cluster-scoped resources: match
in namespace ""and leave out-n. - Unit tests that cover:
- the release order;
- adopting a cluster-scoped conflict message.
- Install
- Acceptance criteria:
- On a scratch cluster without the CRDs (k3d or minikube),
devops k8s deploy-stack --stack infrainstalls k8s-monitoring and dcgm-exporter without errors. - On the homelab, where unowned CRDs exist, the same command adopts them and succeeds.
- The task file records both runs.
- The unit tests pass, and
uv run devops cipasses.
- On a scratch cluster without the CRDs (k3d or minikube),
- Key questions:
- Should teardown remove the CRDs? No (proposed). CRDs are cluster-scoped, and deleting them deletes every ServiceMonitor in the cluster. Teardown skips the CRD release.
- Should the chart version be pinned? No (proposed). This follows deploy-stack's existing convention (stack_lifecycle.py:492-513). Pinning is a separate decision.
- Priority? P0, a critical fix for v0.2.24. It is a regression whose introducing commit is cited (fdd4d0f), that commit is unshipped, and without it a fresh
deploy-stack --stack infrainstalls no Alloy, so feat(k8s): llm gateway, otel collector and prometheus dashboards over metrics the cluster collects (k8s/monitoring/dashboards/) #693's dashboards would have no gateway or GPU series. Leftover CRDs on the homelab hide it there, which is why it surfaced only in review.
- Constraint: A reputable, maintained chart only (prometheus-community). Tests never touch the network.
Strategic Alignment
- Milestone: v0.2.24, as a critical fix (regression from fdd4d0f, feat(k8s): modernize monitoring stack, llm profiles, traefik routing, and remove squid proxy #734)
- Depends on: none. Related: feat(k8s): llm gateway, otel collector and prometheus dashboards over metrics the cluster collects (
k8s/monitoring/dashboards/) #693, feat(k8s): modernize monitoring stack, llm profiles, traefik routing, and remove squid proxy #734.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(k8s): deploy-stack installs the prometheus operator crds its serv…
dan-petty commentedon Oct 1, 2026
Closed by #827, merged into
release/v0.2.24.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.fix(k8s): drop the collector and qdrant servicemonitors that overlap #…
fix(k8s): integrate monitoring telemetry and fix dashboard metrics (#825
feat(release): v0.2.24 (#905)