grafana
The leading tool for querying and visualizing time series and metrics.
About this chart
Grafana Helm Chart
- Installs the web dashboarding system Grafana
TL;DR;
$ helm install <helm-repo>/grafana
$ helm install stable/grafana
Installing the Chart
To install the chart with the release name my-release:
$ helm install --name my-release <helm-repo>/grafana
$ helm install --name my-release stable/grafana
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
| Parameter | Description | Default |
|---|---|---|
replicas | Number of nodes | 1 |
deploymentStrategy | Deployment strategy | RollingUpdate |
livenessProbe | Liveness Probe settings | { "httpGet": { "path": "/api/health", "port": 3000 } "initialDelaySeconds": 60, "timeoutSeconds": 30, "failureThreshold": 10 } |
readinessProbe | Rediness Probe settings | { "httpGet": { "path": "/api/health", "port": 3000 } } |
securityContext | Deployment securityContext | {"runAsUser": 472, "fsGroup": 472} |
priorityClassName | Name of Priority Class to assign pods | nil |
image.repository | Image repository | grafana/grafana |
image.tag | Image tag. (Must be >= 5.0.0) | 6.1.6 |
image.pullPolicy | Image pull policy | IfNotPresent |
image.pullSecrets | Image pull secrets | {} |
service.type | Kubernetes service type | ClusterIP |
service.port | Kubernetes port where service is exposed | 80 |
service.targetPort | internal service is port | 3000 |
service.annotations | Service annotations | {} |
service.labels | Custom labels | {} |
ingress.enabled | Enables Ingress | false |
ingress.annotations | Ingress annotations | {} |
ingress.labels | Custom labels | {} |
ingress.path | Ingress accepted path | / |
ingress.hosts | Ingress accepted hostnames | [] |
ingress.tls | Ingress TLS configuration | [] |
resources | CPU/Memory resource requests/limits | {} |
nodeSelector | Node labels for pod assignment | {} |
tolerations | Toleration labels for pod assignment | [] |
affinity | Affinity settings for pod assignment | {} |
extraInitContainers | Init containers to add to the grafana pod | {} |
extraContainers | Sidecar containers to add to the grafana pod | {} |
persistence.enabled | Use persistent volume to store data | false |
persistence.size | Size of persistent volume claim | 10Gi |
persistence.existingClaim | Use an existing PVC to persist data | nil |
persistence.storageClassName | Type of persistent volume claim | nil |
persistence.accessModes | Persistence access modes | [ReadWriteOnce] |
persistence.subPath | Mount a sub dir of the persistent volume | nil |
initChownData.enabled | If false, don't reset data ownership at startup | true |
initChownData.image.repository | init-chown-data container image repository | busybox |
initChownData.image.tag | init-chown-data container image tag | latest |
initChownData.image.pullPolicy | init-chown-data container image pull policy | IfNotPresent |
initChownData.resources | init-chown-data pod resource requests & limits | {} |
schedulerName | Alternate scheduler name | nil |
env | Extra environment variables passed to pods | {} |
envFromSecret | Name of a Kubenretes secret (must be manually created in the same namespace) containing values to be added to the environment | "" |
extraSecretMounts | Additional grafana server secret mounts | [] |
extraVolumeMounts | Additional grafana server volume mounts | [] |
extraConfigmapMounts | Additional grafana server configMap volume mounts | [] |
extraEmptyDirMounts | Additional grafana server emptyDir volume mounts | [] |
plugins | Plugins to be loaded along with Grafana | [] |
datasources | Configure grafana datasources (passed through tpl) | {} |
notifiers | Configure grafana notifiers | {} |
dashboardProviders | Configure grafana dashboard providers | {} |
dashboards | Dashboards to import | {} |
dashboardsConfigMaps | ConfigMaps reference that contains dashboards | {} |
grafana.ini | Grafana's primary configuration | {} |
ldap.existingSecret | The name of an existing secret containing the ldap.toml file, this must have the key ldap-toml. | "" |
ldap.config | Grafana's LDAP configuration | "" |
annotations | Deployment annotations | {} |
podAnnotations | Pod annotations | {} |
sidecar.image | Sidecar image | kiwigrid/k8s-sidecar:0.0.16 |
sidecar.imagePullPolicy | Sidecar image pull policy | IfNotPresent |
sidecar.resources | Sidecar resources | {} |
sidecar.dashboards.enabled | Enabled the cluster wide search for dashboards and adds/updates/deletes them in grafana | false |
sidecar.skipTlsVerify | Set to true to skip tls verification for kube api calls | nil |
sidecar.dashboards.label | Label that config maps with dashboards should have to be added | grafana_dashboard |
sidecar.dashboards.folder | Folder in the pod that should hold the collected dashboards (unless sidecar.dashboards.defaultFolderName is set). This path will be mounted. | /tmp/dashboards |
sidecar.dashboards.defaultFolderName | The default folder name, it will create a subfolder under the sidecar.dashboards.folder and put dashboards in there instead | nil |
sidecar.dashboards.searchNamespace | If specified, the sidecar will search for dashboard config-maps inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It's also possible to specify ALL to search in all namespaces | nil |
sidecar.datasources.enabled | Enabled the cluster wide search for datasources and adds/updates/deletes them in grafana | false |
sidecar.datasources.label | Label that config maps with datasources should have to be added | grafana_datasource |
sidecar.datasources.searchNamespace | If specified, the sidecar will search for datasources config-maps inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It's also possible to specify ALL to search in all namespaces | nil |
smtp.existingSecret | The name of an existing secret containing the SMTP credentials. | "" |
smtp.userKey | The key in the existing SMTP secret containing the username. | "user" |
smtp.passwordKey | The key in the existing SMTP secret containing the password. | "password" |
admin.existingSecret | The name of an existing secret containing the admin credentials. | "" |
admin.userKey | The key in the existing admin secret containing the username. | "admin-user" |
admin.passwordKey | The key in the existing admin secret containing the password. | "admin-password" |
rbac.create | Create and use RBAC resources | true |
rbac.namespaced | Creates Role and Rolebinding instead of the default ClusterRole and ClusteRoleBindings for the grafana instance | false |
rbac.pspEnabled | Create PodSecurityPolicy (with rbac.create, grant roles permissions as well) | true |
rbac.pspUseAppArmor | Enforce AppArmor in created PodSecurityPolicy (requires rbac.pspEnabled) | true |
command | Define command to be executed by grafana container at startup | nil |
testFramework.image | test-framework image repository. | dduportal/bats |
testFramework.tag | test-framework image tag. | 0.4.0 |
Example of extraVolumeMounts
- extraVolumeMounts:
- name: plugins
mountPath: /var/lib/grafana/plugins
subPath: configs/grafana/plugins
existingClaim: existing-grafana-claim
readOnly: false
Import dashboards
There are a few methods to import dashboards to Grafana. Below are some examples and explanations as to how to use each method:
dashboards:
default:
some-dashboard:
json: |
{
"annotations":
...
# Complete json file he
Deploy grafana with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has grafana on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartgrafana is pinned at v3.3.8 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply