Skip to content

fix(k8s): deploy-stack applies the monitoring services alloy, grafana and port-forward use #912

Closed

Description

@dan-petty

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). The prometheus-community/prometheus release creates prometheus-server, not prometheus.
  • Grafana's Prometheus datasource. It points at the same prometheus Service (k8s/monitoring/grafana-values.yaml).
  • devops k8s port-forward. It targets svc/kube-prometheus-grafana and svc/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, and kubectl kustomize k8s/ renders the prometheus, kube-prometheus-kube-prome-prometheus and kube-prometheus-grafana Services in namespace monitoring.
  • 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 ci passes.

Out of scope

Activity

  1. added this to the v0.2.24 milestone on Oct 1, 2026
  2. added
    type/bug
    scope/k8s
    priority/p0-critical
    on Oct 1, 2026
  3. dan-petty commented on Oct 1, 2026

    @dan-petty
    OwnerAuthor

    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.

  4. added a commit that references this issue on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p0-criticalscope/k8stype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions