Skip to content

fix(k8s): grafana moves to the grafana-community chart on a grafana 13 release that fixes cve-2026-76154, and provisioning prunes removed datasources #1624

Closed

Description

@dan-petty

Friction

Grafana is frozen at 12.3.1 because its chart source stopped publishing. grafana/grafana 10.5.15 is the last release in grafana.github.io/helm-charts and is marked deprecated: true; the chart moved to grafana-community/helm-charts on 2026-01-30. No 12.x chart in either repository ships a fixed Grafana, so the cluster misses every Grafana security release, including CVE-2026-76154 (High 7.3) and CVE-2026-17033 (Medium 6.8), and will keep missing them until the chart source moves. Separately, Grafana still offers a Jaeger datasource that git removed in v0.2.35, because provisioning never deletes a datasource that leaves the file.

Evidence

Live, read-only, 2026-10-17 (main = 3dd7fa6):

  • Deployment monitoring/grafana: label helm.sh/chart=grafana-10.5.15, pod image docker.io/grafana/grafana:12.3.1. Argo CD Application grafana Synced and Healthy.
  • Ingress monitoring/grafana-ingress routes to it; k8s/monitoring/grafana-values.yaml:35-37 enables anonymous Viewer.
  • Grafana lists 6 datasources; one is Jaeger (uid jaeger, readOnly, url http://jaeger.otel.svc.cluster.local:16686) whose health check fails with "no such host". No jaeger Service or pod exists. The provisioning ConfigMap monitoring/grafana (datasources.yaml) lists only Prometheus, Loki, Tempo, Pyroscope and Alertmanager. The 2026-10-13T23:58Z restart kept the stale row.

Repo and charts:

  • k8s/argocd/apps/grafana.yaml:11-13 (repoURL grafana.github.io/helm-charts, chart grafana, 10.5.15); src/devops_cli/commands/k8s/stack_lifecycle.py:113,116 (grafana/grafana 10.5.15). The grafana-community repo alias is already registered at stack_lifecycle.py:59, and AppProjects allow it (k8s/argocd/apps/projects.yaml:16,96). Tempo already moved (k8s/argocd/apps/tempo.yaml:11).
  • helm search repo: grafana-community/grafana 14.0.1 and 13.7.0 both ship Grafana 13.2.4 (kubeVersion ^1.25.0-0). The last community 10.x is 10.7.0 (12.3.1) and the last 11.x is 11.6.1 (12.4.3, below 12.4.11), so the fix has to cross to Grafana 13.
  • grafana.com advisories: CVE-2026-76154 (Geomap MapLibre XSS) fixed in >=12.4.11 <13.0.0, >=13.0.9 <13.1.0, >=13.1.6 <13.2.0, >=13.2.2; CVE-2026-17033 (stored XSS via an external Alertmanager generatorURL) fixed in >=13.1.0, and it applies because grafana-values.yaml:85-89 provisions an Alertmanager datasource.
  • Exploitation needs an Editor or Admin to plant a Geomap payload, or the ability to inject an alert into Alertmanager; anonymous users are Viewer.
  • k8s/monitoring/grafana-values.yaml:47-94 defines five datasources and has neither prune nor deleteDatasources; de09432 (feat(telemetry): traces are stored in tempo on a volume, and grafana and devops-cli read them, linked to logs and profiles #1135) replaced the Jaeger entry with Tempo. No test pins the Grafana chart version.

Remedy

  1. Tests first: add a test pinning the Grafana release to the grafana-community chart and version, and asserting the Argo CD Application and deploy-stack name the same chart and version (follow tests/test_k8s_tempo.py:61). Add a test that the rendered datasources.yaml sets prune: true.
  2. k8s/argocd/apps/grafana.yaml:11-13: repoURL https://grafana-community.github.io/helm-charts, chart grafana, targetRevision 13.7.0 (or 14.0.1; both ship 13.2.4, 13.7.0 crosses one major fewer). stack_lifecycle.py:113,116: grafana-community/grafana at the same version.
  3. k8s/monitoring/grafana-values.yaml: add prune: true next to apiVersion: 1 (:49) in the datasources block. On the next start, provisioning deletes the stale Jaeger row and any datasource removed from git later, so no one-off deleteDatasources entry has to be remembered and removed.
  4. Update the header comment in grafana-values.yaml:1-4 and the tree comment at k8s/README.md:641 to name grafana-community.
  5. Diff helm template of 10.5.15 against the target with the repo values; read the upgrade notes for chart majors 11 to 13 or 14 and for Grafana 13 (Angular plugin removal, dashboard schema migration). Run kubectl apply --dry-run=server on the render in monitoring, and confirm the grafana PVC (local-path, Prune=false,Delete=false), Secret grafana-admin, both sidecars and datasource uids prometheus, loki, tempo, pyroscope and alertmanager carry over.
  6. Coordinate with 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, which edits the same values file (sidecar scope, rbac.namespaced); either order works.

Verification after the sync: the pod runs Grafana >= 13.2.2; /api/datasources lists 5 entries and no uid jaeger; every provisioned dashboard loads.

Priority: P1. Severity high on vendor CVSS for a published UI on a chart line that will never get a fix.

Proposed design

Problem statement

Grafana is frozen at version 12.3.1 because its Helm chart source stopped publishing, missing critical security fixes including CVE-2026-76154 and CVE-2026-17033. Additionally, the provisioning configuration does not prune removed datasources, leaving stale entries like Jaeger that no longer exist.

Acceptance criteria

  • Criterion 1: The Grafana Helm chart is updated to version 13.7.0 from the grafana-community repository
    Verification: Verify that k8s/argocd/apps/grafana.yaml uses repoURL 'https://grafana-community.github.io/helm-charts', chart 'grafana', and targetRevision '13.7.0'
  • Criterion 2: The stack_lifecycle.py file references the new grafana-community/grafana chart version
    Verification: Confirm that src/devops_cli/commands/k8s/stack_lifecycle.py lines 113,116 reference 'grafana-community/grafana' at version 13.7.0
  • Criterion 3: Datasource provisioning includes prune: true to delete removed datasources
    Verification: Check that k8s/monitoring/grafana-values.yaml has 'prune: true' set in the datasources block
  • Criterion 4: The header comment in grafana-values.yaml is updated to reflect the new chart source
    Verification: Verify that k8s/monitoring/grafana-values.yaml lines 1-4 mention 'grafana-community' instead of 'grafana.github.io/helm-charts'
  • Criterion 5: The tree comment in k8s/README.md is updated to reflect the new chart source
    Verification: Confirm that k8s/README.md line 641 mentions 'grafana-community' for the grafana-values.yaml file

Key questions

  • Should the chart version be 13.7.0 or 14.0.1?: Use 13.7.0 as it crosses one major fewer and is sufficient to get the security fixes (proposed)
  • Are there any tests that should be added to verify the chart version?: Yes, tests should be added that pin the Grafana release to the grafana-community chart and version, and assert the Argo CD Application and deploy-stack name the same chart and version (proposed)

Open questions

  • What version of the Grafana chart should be used to get security fixes? (missing verified source)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/security
    on Oct 18, 2026
  2. dan-petty commented on Oct 18, 2026

    @dan-petty
    OwnerAuthor

    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.

    • Type: type/security. The candidate fixes a security vulnerability by updating Grafana to a version that addresses CVE-2026-76154 and CVE-2026-17033.
    • Priority: P1-High. The fix addresses high and medium severity security vulnerabilities that affect the cluster's Grafana deployment.
    • Value: High. The change fixes critical security issues and ensures the cluster is not missing any Grafana security releases.
    • Effort: Medium. The fix requires updating chart sources, modifying configuration files, adding tests, and verifying upgrades.
  3. added a commit that references this issue on Oct 24, 2026
    6d978ff
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

    source/agenttype/security

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions