Skip to content

feat: Add grafana2 Helm chart for staging GCP cluster with dashboards as code - #23

Open
tomadowley wants to merge 2 commits into
masterfrom
cosine/helm-grafana-staging-gcp
Open

feat: Add grafana2 Helm chart for staging GCP cluster with dashboards as code#23
tomadowley wants to merge 2 commits into
masterfrom
cosine/helm-grafana-staging-gcp

Conversation

@tomadowley

Copy link
Copy Markdown

This patch introduces the grafana2 Helm chart to deploy Grafana on the staging GCP cluster with dashboards-as-code support.

What’s included:

  • grafana2 Helm chart that wraps the Grafana Community chart (grafana 12.3.0) to stay on a maintained chart line
  • Dashboards as code: dashboards/*.json are provisioned as ConfigMaps via dashboard-configmaps.yaml and loaded by Grafana through the dashboard sidecar
  • Data sources as code: Google Cloud Monitoring (stackdriver) and Google Cloud Logging configured via a datasources-configmap.yaml and Grafana sidecar
  • Secrets integration: expects a 1Password secret named cluster-staging-grafana in the target namespace containing DB_URL, admin-user, and admin-password; Grafana admin credentials are read from this secret
  • Staging values: grafana2/values-staging.yaml and grafana2/values.yaml define project, replicas, image, RBAC, sidecar provisioning, and Google Cloud data sources
  • Install guidance: after dependency update, install with Helm in the observability namespace using the staging values; example in README

Files added/updated:

  • grafana2/Chart.yaml, grafana2/Chart.lock, grafana2/README.md, grafana2/templates/dashboard-configmaps.yaml, grafana2/templates/datasources-configmap.yaml, grafana2/templates/_helpers.tpl, grafana2/charts/.gitignore, grafana2/dashboards/gke-managed-prometheus-overview.json, grafana2/values.yaml, grafana2/values-staging.yaml, grafana2/values.yaml
  • grafana2/dashboards and grafana2/values-staging.yaml provide the configuration for dashboards and GCP data sources in staging

How this solves the task:

  • Enables Helm-based deployment of Grafana to the staging GCP cluster with dashboards and data sources provisioned as code, ensuring consistent environments and easier rollout between stages.
  • Keeps Grafana on a maintained chart line by wrapping grafana-community/grafana, while allowing dashboards and data sources to be managed as code and provisioned automatically via sidecars.
  • Uses a single secret source (1Password) for DB credentials and admin user/password, keeping sensitive data out of charts.

tomadowley and others added 2 commits May 6, 2026 13:41
…as code

Created a new Helm chart for Grafana deployment to the staging GCP cluster. This chart manages dashboards as code, utilizing the latest Grafana and GCP plugins. It includes configurations for Google Cloud Monitoring and Google Managed Prometheus metrics, along with Google Cloud Logging. Starter dashboards for GKE managed Prometheus overview are added. A README file with installation instructions and required secrets is also included. A .gitignore file was added to prevent accidental commitment of chart archives.

Co-Authored-By: Cosine CLI (gpt-5.5) <agent@cosine.sh>
…ds as code

Designed a new Helm chart for Grafana, named `grafana2`, to manage dashboards as code.

Included configuration for GCP integration:
- Utilized the built-in `stackdriver` datasource for GCP metrics and Google Managed Service for Prometheus.
- Configured the `googlecloud-logging-datasource@1.6.3` plugin for Google Cloud Logging.

Implemented dashboard-as-code by placing JSON dashboards in `grafana2/dashboards/`.
- Added a starter dashboard `gke-managed-prometheus-overview.json`.

Added necessary Helm chart files, including templates and helper configurations.
- Included a `README.md` with installation instructions and required secret information.
- Added `.gitignore` to the `charts` directory to prevent accidental commits of chart archives.

Performed verification steps including linting and templating the Helm chart. Ensured correct configuration for Workload Identity, GCP datasources, and secret references.
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