Grafana
Grafana observability dashboards with declarative provisioning and guarded high availability.
Features
- pinned official multi-architecture Grafana OSS image;
- durable single-replica SQLite default with retained storage;
- fail-fast PostgreSQL/MySQL requirements for active-active replicas;
- declarative datasources, dashboard providers, dashboards, and alerting;
- administrator and database credentials through managed or existing Secrets;
- native External Secrets Operator resources;
- secure non-root, read-only filesystem defaults;
- Ingress and canonical multi-route Gateway API exposure;
- NetworkPolicy, PodDisruptionBudget, dual-stack Service, and ServiceMonitor;
- application listener overrides wired to the real Grafana process.
Installation
Helm repository
helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install grafana helmforge/grafana --namespace observability --create-namespace
OCI registry
helm install grafana oci://ghcr.io/helmforgedev/helm/grafana \
--version 1.0.0 \
--namespace observability \
--create-namespace
Read the generated administrator password:
kubectl get secret -n observability grafana-grafana-admin \
-o jsonpath='{.data.admin-password}' | base64 --decode
Use port forwarding for a private first login:
kubectl port-forward -n observability svc/grafana-grafana 3000:80
Open http://127.0.0.1:3000 and sign in as admin.
Quick start
Use an existing Secret in any durable environment:
admin:
existingSecret: grafana-admin
persistence:
enabled: true
size: 20Gi
Create the Secret before installation:
kubectl create secret generic grafana-admin \
--namespace observability \
--from-literal=admin-user=platform-admin \
--from-literal=admin-password='replace-with-a-secret-manager-value'
Deployment topologies
Single replica with SQLite
The default topology is one replica backed by a retained PVC. It is suitable
for small teams and straightforward recovery. Recreate upgrades prevent two
Grafana processes from sharing the same SQLite file.
replicaCount: 1
database:
type: sqlite3
persistence:
enabled: true
accessModes: [ReadWriteOnce]
size: 20Gi
Active-active with PostgreSQL
Grafana HA requires a shared PostgreSQL or MySQL database. The database is an external operational dependency and is not installed by this chart.
replicaCount: 3
database:
type: postgres
host: grafana-postgresql.database.svc.cluster.local
port: 5432
name: grafana
user: grafana
existingSecret: grafana-database
passwordKey: password
sslMode: verify-full
persistence:
enabled: false
pdb:
enabled: true
The chart rejects multiple replicas with SQLite and rejects shared
ReadWriteOnce storage for multiple replicas.
Declarative provisioning
Provision a Prometheus datasource:
provisioning:
datasources:
apiVersion: 1
datasources:
- name: Prometheus
uid: prometheus
type: prometheus
access: proxy
url: http://prometheus.monitoring.svc.cluster.local:9090
isDefault: true
editable: false
Provision dashboards as native JSON objects:
provisioning:
dashboards:
platform-home:
title: Platform home
uid: platform-home
schemaVersion: 41
version: 1
panels: []
See Provisioning for dashboard providers, alerting documents, and GitOps behavior.
Exposure
Ingress
grafana:
rootUrl: https://grafana.example.com
ingress:
enabled: true
ingressClassName: nginx
hosts:
- host: grafana.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: grafana-tls
hosts: [grafana.example.com]
networkPolicy:
ingress:
extraFrom:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: ingress-nginx
Gateway API
gatewayAPI:
enabled: true
httpRoutes:
- parentRefs:
- name: public
namespace: gateway-system
hostnames:
- grafana.example.com
networkPolicy:
ingress:
extraFrom:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: gateway-system
See Production operations for TLS, database, and routing guidance.
External Secrets
The chart can render External Secrets Operator ExternalSecret resources. Set
admin.existingSecret to the exact target Secret so Grafana and ESO have one
credential owner.
admin:
existingSecret: grafana-admin
externalSecrets:
enabled: true
items:
- name: admin
fullnameOverride: grafana-admin
spec:
secretStoreRef:
name: production
kind: ClusterSecretStore
target:
name: grafana-admin
creationPolicy: Owner
dataFrom:
- extract:
key: grafana/admin
See Security for Secret ownership and NetworkPolicy.
Plugins
Plugins are installed through Grafana's supported preinstall mechanism. Every plugin must include an exact version:
plugins:
preinstall:
- [email protected]
Plugin installation requires egress. Pin versions, test upgrades, and avoid unsigned plugins unless the security risk is explicitly accepted.
Monitoring
Grafana exposes Prometheus metrics on /metrics using the same HTTP Service.
metrics:
serviceMonitor:
enabled: true
labels:
release: monitoring
networkPolicy:
ingress:
extraFrom:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: monitoring
The Prometheus Operator CRD must exist before installing a ServiceMonitor.
Configuration reference
Values & Configuration Reference
All schema parameters, types, defaults, and allowed values are extracted directly from the chart repository. Filter and search them in the interactive reference below or customize in Values Studio.
The complete typed contract is in values.yaml and values.schema.json.
Backup and restore
Back up all state domains together:
- SQLite or the external PostgreSQL/MySQL database;
- chart values and referenced Secrets;
- plugins under
/var/lib/grafana/pluginswhen not reproducibly installed; - declarative provisioning source.
Stop Grafana before directly copying grafana.db, or use an
application-consistent storage snapshot. For external databases, use native
database backup tools and test restoration independently.
Upgrade
helm repo update
helm upgrade grafana helmforge/grafana \
--namespace observability \
--reuse-values
Before upgrading, review Grafana release notes, confirm plugin compatibility, back up metadata, render the release with the new chart, and test it in a non-production namespace.
Troubleshooting
Check rollout and logs:
kubectl rollout status -n observability deployment/grafana-grafana
kubectl logs -n observability deployment/grafana-grafana --tail=200
kubectl get events -n observability --sort-by=.lastTimestamp
Call health through the Service:
kubectl run grafana-health --rm -i --restart=Never -n observability \
--image=curlimages/curl:8.17.0 -- \
curl --fail --silent http://grafana-grafana/api/health
Common causes include an unwritable PVC, invalid external database TLS mode, incorrect root URL, blocked datasource/plugin egress, and malformed provisioning documents.
Security
The chart uses a non-root UID/GID, read-only root filesystem, dropped Linux capabilities, RuntimeDefault seccomp, no privilege escalation, and no mounted Kubernetes API token. Review Security before production.
Security scan
🟢 Security Scan: grafana
| Framework | Score |
|---|---|
| MITRE + NSA + SOC2 | 100.000000% |
✅ Security posture acceptable.
Examples
Non-goals
This chart does not operate a database, fetch mutable dashboards from the internet, grant Grafana Kubernetes discovery RBAC, or claim that PVC retention is a backup.
Additional resources
System Architecture
DESIGN.md SyncedVerified architecture contract rendered dynamically from GitHub DESIGN.md
flowchart LR
Client[Browser or API client] --> Edge[Ingress or HTTPRoute]
Edge --> Service[Grafana Service]
Service --> Pods[Grafana Deployment]
Config[ConfigMaps] --> Pods
Admin[Admin Secret] --> Pods
ESO[External Secrets Operator] -. optional .-> Admin
Pods --> Data{Metadata topology}
Data -->|single replica| PVC[SQLite and plugin PVC]
Data -->|multiple replicas| DB[External PostgreSQL or MySQL]
Prometheus[Prometheus Operator] -. /metrics .-> ServiceGrafana Values Schema Reference
Official schema parameters, default values, and types extracted directly from the chart repository.
Global(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| global | object | - | Chart configuration parameter |
Name Override(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| nameOverride | string | - | Chart configuration parameter |
Fullname Override(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| fullnameOverride | string | - | Chart configuration parameter |
Common Labels(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| commonLabels | object | - | Chart configuration parameter |
Common Annotations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| commonAnnotations | object | - | Chart configuration parameter |
Replica Count(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| replicaCount | integer | - | Chart configuration parameter |
Image(3)
| Parameter | Type | Default | Description |
|---|---|---|---|
| image.repository | string | - | Chart configuration parameter |
| image.tag | string | - | Chart configuration parameter |
| image.pullPolicy | string | - | Chart configuration parameter Allowed: AlwaysIfNotPresentNever |
Image Pull Secrets(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| imagePullSecrets | array | - | Chart configuration parameter |
Service Account(4)
| Parameter | Type | Default | Description |
|---|---|---|---|
| serviceAccount.create | boolean | - | Chart configuration parameter |
| serviceAccount.name | string | - | Chart configuration parameter |
| serviceAccount.annotations | any | - | Chart configuration parameter |
| serviceAccount.automountServiceAccountToken | boolean | - | Chart configuration parameter |
Service & Networking(5)
| Parameter | Type | Default | Description |
|---|---|---|---|
| service.type | string | - | Chart configuration parameter Allowed: ClusterIPNodePortLoadBalancer |
| service.port | integer | - | Chart configuration parameter |
| service.annotations | any | - | Chart configuration parameter |
| service.ipFamilyPolicy | string | - | Chart configuration parameter Allowed: SingleStackPreferDualStackRequireDualStack |
| service.ipFamilies | array | - | Chart configuration parameter |
Grafana(6)
| Parameter | Type | Default | Description |
|---|---|---|---|
| grafana.port | integer | - | Chart configuration parameter |
| grafana.rootUrl | string | - | Chart configuration parameter |
| grafana.serveFromSubPath | boolean | - | Chart configuration parameter |
| grafana.logLevel | string | - | Chart configuration parameter Allowed: debuginfowarnerrorcritical |
| grafana.ini | object | - | Chart configuration parameter |
| grafana.extraEnv | array | - | Chart configuration parameter |
Admin(5)
| Parameter | Type | Default | Description |
|---|---|---|---|
| admin.user | string | - | Chart configuration parameter |
| admin.password | string | - | Chart configuration parameter |
| admin.existingSecret | string | - | Chart configuration parameter |
| admin.userKey | string | - | Chart configuration parameter |
| admin.passwordKey | string | - | Chart configuration parameter |
Database(11)
| Parameter | Type | Default | Description |
|---|---|---|---|
| database.type | string | - | Chart configuration parameter Allowed: sqlite3postgresmysql |
| database.host | string | - | Chart configuration parameter |
| database.port | integer | - | Chart configuration parameter |
| database.name | string | - | Chart configuration parameter |
| database.user | string | - | Chart configuration parameter |
| database.password | string | - | Chart configuration parameter |
| database.existingSecret | string | - | Chart configuration parameter |
| database.passwordKey | string | - | Chart configuration parameter |
| database.sslMode | string | - | Chart configuration parameter |
| database.urlQueryParams | string | - | Chart configuration parameter |
| database.networkPolicyPeers | array | - | Chart configuration parameter |
Persistence(7)
| Parameter | Type | Default | Description |
|---|---|---|---|
| persistence.enabled | boolean | - | Chart configuration parameter |
| persistence.existingClaim | string | - | Chart configuration parameter |
| persistence.storageClass | string | - | Chart configuration parameter |
| persistence.accessModes | array | - | Chart configuration parameter |
| persistence.size | string | - | Chart configuration parameter |
| persistence.retain | boolean | - | Chart configuration parameter |
| persistence.annotations | any | - | Chart configuration parameter |
Provisioning(4)
| Parameter | Type | Default | Description |
|---|---|---|---|
| provisioning.datasources | object | - | Chart configuration parameter |
| provisioning.dashboardProviders | object | - | Chart configuration parameter |
| provisioning.dashboards | object | - | Chart configuration parameter |
| provisioning.alerting | object | - | Chart configuration parameter |
Plugins(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| plugins.preinstall | array | - | Chart configuration parameter |
External Secrets(3)
| Parameter | Type | Default | Description |
|---|---|---|---|
| externalSecrets.enabled | boolean | - | Chart configuration parameter |
| externalSecrets.refreshInterval | string | - | Chart configuration parameter |
| externalSecrets.items | array | - | Chart configuration parameter |
Ingress(5)
| Parameter | Type | Default | Description |
|---|---|---|---|
| ingress.enabled | boolean | - | Chart configuration parameter |
| ingress.ingressClassName | string | - | Chart configuration parameter |
| ingress.annotations | any | - | Chart configuration parameter |
| ingress.hosts | array | - | Chart configuration parameter |
| ingress.tls | array | - | Chart configuration parameter |
Gateway API(2)
| Parameter | Type | Default | Description |
|---|---|---|---|
| gatewayAPI.enabled | boolean | - | Chart configuration parameter |
| gatewayAPI.httpRoutes | array | - | Chart configuration parameter |
Metrics & Observability(5)
| Parameter | Type | Default | Description |
|---|---|---|---|
| metrics.serviceMonitor.enabled | boolean | - | Chart configuration parameter |
| metrics.serviceMonitor.labels | any | - | Chart configuration parameter |
| metrics.serviceMonitor.interval | string | - | Chart configuration parameter |
| metrics.serviceMonitor.scrapeTimeout | string | - | Chart configuration parameter |
| metrics.serviceMonitor.metricRelabelings | array | - | Chart configuration parameter |
Health Probes(15)
| Parameter | Type | Default | Description |
|---|---|---|---|
| probes.startup.enabled | boolean | - | Chart configuration parameter |
| probes.startup.initialDelaySeconds | integer | - | Chart configuration parameter |
| probes.startup.periodSeconds | integer | - | Chart configuration parameter |
| probes.startup.timeoutSeconds | integer | - | Chart configuration parameter |
| probes.startup.failureThreshold | integer | - | Chart configuration parameter |
| probes.liveness.enabled | boolean | - | Chart configuration parameter |
| probes.liveness.initialDelaySeconds | integer | - | Chart configuration parameter |
| probes.liveness.periodSeconds | integer | - | Chart configuration parameter |
| probes.liveness.timeoutSeconds | integer | - | Chart configuration parameter |
| probes.liveness.failureThreshold | integer | - | Chart configuration parameter |
| probes.readiness.enabled | boolean | - | Chart configuration parameter |
| probes.readiness.initialDelaySeconds | integer | - | Chart configuration parameter |
| probes.readiness.periodSeconds | integer | - | Chart configuration parameter |
| probes.readiness.timeoutSeconds | integer | - | Chart configuration parameter |
| probes.readiness.failureThreshold | integer | - | Chart configuration parameter |
Resources(4)
| Parameter | Type | Default | Description |
|---|---|---|---|
| resources.requests.cpu | string | - | Chart configuration parameter |
| resources.requests.memory | string | - | Chart configuration parameter |
| resources.limits.cpu | string | - | Chart configuration parameter |
| resources.limits.memory | string | - | Chart configuration parameter |
Pod Security(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podSecurityContext | object | - | Chart configuration parameter |
Container Security(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| securityContext | object | - | Chart configuration parameter |
Runtime Storage(2)
| Parameter | Type | Default | Description |
|---|---|---|---|
| runtimeStorage.tmpSizeLimit | string | - | Chart configuration parameter |
| runtimeStorage.logsSizeLimit | string | - | Chart configuration parameter |
Pdb(4)
| Parameter | Type | Default | Description |
|---|---|---|---|
| pdb.enabled | boolean | - | Chart configuration parameter |
| pdb.minAvailable | stringinteger | - | Chart configuration parameter |
| pdb.maxUnavailable | stringinteger | - | Chart configuration parameter |
| pdb.unhealthyPodEvictionPolicy | string | - | Chart configuration parameter Allowed: IfHealthyBudgetAlwaysAllow |
Network Policy(6)
| Parameter | Type | Default | Description |
|---|---|---|---|
| networkPolicy.enabled | boolean | - | Chart configuration parameter |
| networkPolicy.ingress.allowSameNamespace | boolean | - | Chart configuration parameter |
| networkPolicy.ingress.extraFrom | array | - | Chart configuration parameter |
| networkPolicy.egress.enabled | boolean | - | Chart configuration parameter |
| networkPolicy.egress.allowDNS | boolean | - | Chart configuration parameter |
| networkPolicy.egress.extraEgress | array | - | Chart configuration parameter |
Pod Labels(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podLabels | any | - | Chart configuration parameter |
Pod Annotations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podAnnotations | any | - | Chart configuration parameter |
Node Selector(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| nodeSelector | any | - | Chart configuration parameter |
Tolerations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| tolerations | array | - | Chart configuration parameter |
Affinity(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| affinity | object | - | Chart configuration parameter |
Topology Spread Constraints(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| topologySpreadConstraints | array | - | Chart configuration parameter |
Priority Class Name(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| priorityClassName | string | - | Chart configuration parameter |
Termination Grace Period Seconds(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| terminationGracePeriodSeconds | integer | - | Chart configuration parameter |
Extra Volumes(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraVolumes | array | - | Chart configuration parameter |
Extra Volume Mounts(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraVolumeMounts | array | - | Chart configuration parameter |
Extra Init Containers(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraInitContainers | array | - | Chart configuration parameter |
Extra Manifests(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraManifests | array | - | Chart configuration parameter |
No schema parameters match your search
Try searching for a different keyword or reset the filter.