Repository navigation
Description
Problem
devops k8s deploy-stack runs kubectl apply -k k8s/ (stack_lifecycle.py:762). The root k8s/kustomization.yaml lists namespaces.yaml, cloudflared, registry and monitoring/dashboards, but not monitoring/service-aliases.yaml. Since fdd4d0f (#734), which is not in v0.2.23, three consumers depend on Services defined only in that file:
- Alloy's metrics destination. It writes to
http://prometheus.monitoring.svc.cluster.local:9090/api/v1/write(k8s/monitoring/k8s-monitoring-values.yaml:12). Theprometheus-community/prometheusrelease createsprometheus-server, notprometheus. - Grafana's Prometheus datasource. It points at the same
prometheusService (k8s/monitoring/grafana-values.yaml). devops k8s port-forward. It targetssvc/kube-prometheus-grafanaandsvc/kube-prometheus-kube-prome-prometheus(commands/k8s/networking.py:936-940).
On a cluster built only by v0.2.24's deploy-stack, Alloy reaches no Prometheus, so no cluster or devops-cli metric is stored, Grafana's Prometheus panels are empty, and port-forward fails. On homelab-k3s the prometheus Service exists only because it was applied by hand: it carries the devops-cli-stack label and no Helm ownership, and both kube-prometheus aliases are missing.
Copilot found this reviewing release PR #905 (thread on k8s/kustomization.yaml:8). It is a P0 regression in v0.2.24, admitted as a critical fix.
Acceptance criteria
- The root kustomization applies
monitoring/service-aliases.yaml, andkubectl kustomize k8s/renders theprometheus,kube-prometheus-kube-prome-prometheusandkube-prometheus-grafanaServices in namespacemonitoring. - A test with no cluster or network collects the Services reachable from
k8s/kustomization.yaml. It asserts that the hosts named by Alloy's Prometheus destination and Grafana's Prometheus datasource, and the monitoring Services port-forward targets, are all among them. It fails on the current root kustomization. -
uv run devops cipasses.
Out of scope
- Removing the two kube-prometheus aliases and the lookups that use them is chore(k8s): drop the kube-prometheus-stack service aliases #818.
k8s/monitoring/networkpolicy.yamlhas never been applied bydeploy-stack, in v0.2.23 or v0.2.24. That gap predates this release and is filed separately.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(k8s): deploy-stack applies the monitoring services alloy, grafana…
dan-petty commentedon Oct 1, 2026
Closed by #914, 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.feat(release): v0.2.24 (#905)