Skip to content

Add Helm support for Grafana dashboard annotations (including folder assignment)#432

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/add-annotations-support-grafana-dashboards
Open

Add Helm support for Grafana dashboard annotations (including folder assignment)#432
Copilot wants to merge 3 commits into
mainfrom
copilot/add-annotations-support-grafana-dashboards

Conversation

Copy link
Copy Markdown

Copilot AI commented May 9, 2026

Users enabling chart-managed Grafana dashboards could not attach annotations to the generated dashboard resources, which blocked common workflows like folder assignment via grafana_folder. This change adds first-class annotations support for dashboard manifests.

  • Helm values surface

    • Added dashboards.annotations to chart values to allow arbitrary metadata annotations on dashboard resources.
  • Dashboard template rendering

    • Updated templates/dashboards.yaml to render metadata.annotations from dashboards.annotations on:
      • the dashboards ConfigMap
      • both GrafanaDashboard resources (general and internal) when CRDs are available.
    • Normalized metadata label indentation in GrafanaDashboard blocks while touching this area.
  • Chart tests and docs

    • Extended tests/dashboards_test.yaml to assert annotation rendering on both ConfigMap and GrafanaDashboard manifests.
    • Updated chart README values table to document dashboards.annotations.

Example values:

dashboards:
  enabled: true
  annotations:
    grafana_folder: my-folder

Copilot AI requested review from Copilot and removed request for Copilot May 9, 2026 14:28
Copilot AI linked an issue May 9, 2026 that may be closed by this pull request
Copilot AI requested review from Copilot and removed request for Copilot May 9, 2026 14:29
Copilot AI requested review from Copilot and removed request for Copilot May 9, 2026 14:29
Copilot AI changed the title [WIP] Add support for annotations on Grafana dashboard Add Helm support for Grafana dashboard annotations (including folder assignment) May 9, 2026
Copilot AI requested a review from davidcollom May 9, 2026 14:30
@davidcollom davidcollom marked this pull request as ready for review May 9, 2026 14:35
@davidcollom davidcollom requested a review from maria-reynoso as a code owner May 9, 2026 14:35
Copilot AI review requested due to automatic review settings May 9, 2026 14:35
@davidcollom davidcollom enabled auto-merge (squash) May 9, 2026 14:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class Helm values and template support to attach arbitrary metadata.annotations onto the chart-managed Grafana dashboard resources, enabling workflows like Grafana Operator folder assignment via grafana_folder.

Changes:

  • Added dashboards.annotations to chart values (and documented it) to allow user-supplied annotations.
  • Rendered dashboards.annotations onto the dashboards ConfigMap and both GrafanaDashboard CRs (when the CRD is available), alongside a small label indentation normalization.
  • Extended Helm unit tests to assert annotation rendering on both ConfigMap and GrafanaDashboard manifests.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
deploy/charts/version-checker/values.yaml Exposes dashboards.annotations in the chart values API.
deploy/charts/version-checker/templates/dashboards.yaml Renders metadata.annotations for dashboard resources (ConfigMap + GrafanaDashboard CRs).
deploy/charts/version-checker/tests/dashboards_test.yaml Adds unit assertions that annotations are rendered correctly.
deploy/charts/version-checker/README.md Documents the new dashboards.annotations value in the values table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@davidcollom davidcollom disabled auto-merge May 9, 2026 14:45
@davidcollom davidcollom self-requested a review May 9, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Support annotations on Grafana dashboard

3 participants