Skip to content

feat: support GrafanaDashboard CR rollout in gateway-addons-helm - #9963

Open
uladzimirzel wants to merge 2 commits into
envoyproxy:mainfrom
uladzimirzel:feat/addons-helm-grafana-dashboard-operator
Open

feat: support GrafanaDashboard CR rollout in gateway-addons-helm#9963
uladzimirzel wants to merge 2 commits into
envoyproxy:mainfrom
uladzimirzel:feat/addons-helm-grafana-dashboard-operator

Conversation

@uladzimirzel

Copy link
Copy Markdown

What this PR does / why we need it:

Adds a dashboard.mode value to the gateway-addons-helm chart to switch between the two ways Grafana dashboards are rolled out:

  • configmap (default): dashboards are bundled into the existing grafana-dashboards ConfigMap consumed by the bundled Grafana subchart. Backward compatible — the rendered output for default values is byte-identical to before.
  • grafana-operator: each dashboards/*.json is rendered as a GrafanaDashboard custom resource (grafana.integreatly.org/v1beta1), which requires the Grafana Operator and a Grafana instance matching dashboard.instanceSelector. The bundled Grafana subchart is not used in this mode (set grafana.enabled=false or clear its dashboardsConfigMaps/dashboardProviders).

Also adds:

  • dashboard.folder and dashboard.instanceSelector values (defaults: envoy-gateway, label dashboards: grafana).
  • A failing guard for unsupported dashboard.mode values.
  • A golden template test (grafana-operator.in.yaml) for the operator mode.
  • Regenerated Helm docs (README + site API page).

Which issue(s) this PR fixes:
N/A

Test plan:

  • helm lint passes.
  • make helm-template.gateway-addons-helm regenerates goldens; default.out.yaml / e2e.out.yaml are unchanged, proving backward compatibility.
  • gen-check (CI) covers the golden files.

Release note:

gateway-addons-helm: support rolling out Grafana dashboards as GrafanaDashboard custom resources via the new `dashboard.mode=grafana-operator` value (default `configmap` keeps the existing ConfigMap behavior).

🤖 Generated with Claude Code

@uladzimirzel
uladzimirzel requested a review from a team as a code owner September 7, 2026 07:44
@netlify

netlify Bot commented Sep 7, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 025af88
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a9e6f82a3a96f0008b891a9
😎 Deploy Preview https://deploy-preview-9963--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Add a dashboard.mode value to the gateway-addons-helm chart to switch
between the two ways dashboards are rolled out to Grafana:

- configmap (default): dashboards are bundled into the existing
  grafana-dashboards ConfigMap consumed by the bundled Grafana subchart.
- grafana-operator: each dashboards/*.json is rendered as a
  GrafanaDashboard custom resource (grafana.integreatly.org/v1beta1),
  which requires the Grafana Operator and a Grafana instance matching
  dashboard.instanceSelector. The bundled Grafana subchart is not used
  in this mode (set grafana.enabled=false or clear its
  dashboardsConfigMaps/dashboardProviders).

Also add dashboard.folder and dashboard.instanceSelector values, a
failing guard for unsupported modes, a golden template test for the
operator mode, and regenerate the helm docs.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Uladzimir Zel <uladzimirzel@gmail.com>
@uladzimirzel
uladzimirzel force-pushed the feat/addons-helm-grafana-dashboard-operator branch from f5dfd93 to 30cacdb Compare September 7, 2026 07:46

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f5dfd93c6a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +10 to +11
annotations:
argocd.argoproj.io/sync-options: ServerSideApply=true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve configurable metadata on operator dashboards

When grafana-operator mode is selected, the ConfigMap template is skipped, but this template never applies the documented dashboard.labels or dashboard.annotations values. Consequently, installations using those values for admission policies, ownership, or GitOps behavior silently lose the required metadata on every generated GrafanaDashboard; render these maps here and merge the Argo CD annotation with user annotations.

Useful? React with 👍 / 👎.

argocd.argoproj.io/sync-options: ServerSideApply=true
spec:
allowCrossNamespaceImport: true
folder: {{ $.Values.dashboard.folder }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Quote the rendered folder value

For valid folder names that YAML interprets as another scalar type, such as "123", "true", or "null", this unquoted substitution renders a number, boolean, or null even when the Helm value was quoted. The GrafanaDashboard CRD expects spec.folder to be a string, so Kubernetes rejects the resource; apply quote to the rendered value.

Useful? React with 👍 / 👎.

Comment on lines +5 to +9
# - "grafana-operator": one GrafanaDashboard custom resource (grafana.integreatly.org/v1beta1)
# is rendered per dashboard. This requires the Grafana Operator and a Grafana instance
# matching dashboard.instanceSelector. The bundled Grafana subchart is not used in this mode,
# so set grafana.enabled=false (or clear grafana.dashboardsConfigMaps and grafana.dashboardProviders).
mode: configmap

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add a new-feature release-note fragment

This introduces a user-facing chart capability but adds no fragment under release-notes/current/new_features/. The repository's release-note compiler consumes only those fragments, so this option will be omitted from the next generated release notes despite the release-note text in the commit message.

Useful? React with 👍 / 👎.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Uladzimir Zel <uladzimirzel@gmail.com>
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.

1 participant