3 * Installs the web dashboarding system [Grafana](http://grafana.org/)
8 $ helm install stable/grafana
11 ## Installing the Chart
13 To install the chart with the release name `my-release`:
16 $ helm install --name my-release stable/grafana
19 ## Uninstalling the Chart
21 To uninstall/delete the my-release deployment:
24 $ helm delete my-release
27 The command removes all the Kubernetes components associated with the chart and deletes the release.
32 | Parameter | Description | Default |
33 |-------------------------------------------|-----------------------------------------------|---------------------------------------------------------|
34 | `replicas` | Number of nodes | `1` |
35 | `deploymentStrategy` | Deployment strategy | `RollingUpdate` |
36 | `livenessProbe` | Liveness Probe settings | `{ "httpGet": { "path": "/api/health", "port": 3000 } "initialDelaySeconds": 60, "timeoutSeconds": 30, "failureThreshold": 10 }` |
37 | `readinessProbe` | Rediness Probe settings | `{ "httpGet": { "path": "/api/health", "port": 3000 } }`|
38 | `securityContext` | Deployment securityContext | `{"runAsUser": 472, "fsGroup": 472}` |
39 | `priorityClassName` | Name of Priority Class to assign pods | `nil` |
40 | `image.repository` | Image repository | `grafana/grafana` |
41 | `image.tag` | Image tag. (`Must be >= 5.0.0`) | `6.0.2` |
42 | `image.pullPolicy` | Image pull policy | `IfNotPresent` |
43 | `service.type` | Kubernetes service type | `ClusterIP` |
44 | `service.port` | Kubernetes port where service is exposed | `80` |
45 | `service.targetPort` | internal service is port | `3000` |
46 | `service.annotations` | Service annotations | `{}` |
47 | `service.labels` | Custom labels | `{}` |
48 | `ingress.enabled` | Enables Ingress | `false` |
49 | `ingress.annotations` | Ingress annotations | `{}` |
50 | `ingress.labels` | Custom labels | `{}` |
51 | `ingress.hosts` | Ingress accepted hostnames | `[]` |
52 | `ingress.tls` | Ingress TLS configuration | `[]` |
53 | `resources` | CPU/Memory resource requests/limits | `{}` |
54 | `nodeSelector` | Node labels for pod assignment | `{}` |
55 | `tolerations` | Toleration labels for pod assignment | `[]` |
56 | `affinity` | Affinity settings for pod assignment | `{}` |
57 | `extraInitContainers` | Init containers to add to the grafana pod | `{}` |
58 | `extraContainers` | Sidecar containers to add to the grafana pod | `{}` |
59 | `persistence.enabled` | Use persistent volume to store data | `false` |
60 | `persistence.initChownData` | Change ownership of persistent volume on initialization | `true` |
61 | `persistence.size` | Size of persistent volume claim | `10Gi` |
62 | `persistence.existingClaim` | Use an existing PVC to persist data | `nil` |
63 | `persistence.storageClassName` | Type of persistent volume claim | `nil` |
64 | `persistence.accessModes` | Persistence access modes | `[ReadWriteOnce]` |
65 | `persistence.subPath` | Mount a sub dir of the persistent volume | `nil` |
66 | `schedulerName` | Alternate scheduler name | `nil` |
67 | `env` | Extra environment variables passed to pods | `{}` |
68 | `envFromSecret` | Name of a Kubenretes secret (must be manually created in the same namespace) containing values to be added to the environment | `""` |
69 | `extraSecretMounts` | Additional grafana server secret mounts | `[]` |
70 | `extraVolumeMounts` | Additional grafana server volume mounts | `[]` |
71 | `extraConfigmapMounts` | Additional grafana server configMap volume mounts | `[]` |
72 | `extraEmptyDirMounts` | Additional grafana server emptyDir volume mounts | `[]` |
73 | `plugins` | Plugins to be loaded along with Grafana | `[]` |
74 | `datasources` | Configure grafana datasources (passed through tpl) | `{}` |
75 | `notifiers` | Configure grafana notifiers | `{}` |
76 | `dashboardProviders` | Configure grafana dashboard providers | `{}` |
77 | `dashboards` | Dashboards to import | `{}` |
78 | `dashboardsConfigMaps` | ConfigMaps reference that contains dashboards | `{}` |
79 | `grafana.ini` | Grafana's primary configuration | `{}` |
80 | `ldap.existingSecret` | The name of an existing secret containing the `ldap.toml` file, this must have the key `ldap-toml`. | `""` |
81 | `ldap.config ` | Grafana's LDAP configuration | `""` |
82 | `annotations` | Deployment annotations | `{}` |
83 | `podAnnotations` | Pod annotations | `{}` |
84 | `sidecar.image` | Sidecar image | `kiwigrid/k8s-sidecar:0.0.13` |
85 | `sidecar.imagePullPolicy` | Sidecar image pull policy | `IfNotPresent` |
86 | `sidecar.resources` | Sidecar resources | `{}` |
87 | `sidecar.dashboards.enabled` | Enabled the cluster wide search for dashboards and adds/updates/deletes them in grafana | `false` |
88 | `sidecar.dashboards.label` | Label that config maps with dashboards should have to be added | `grafana_dashboard` |
89 | `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` |
90 | `sidecar.datasources.enabled` | Enabled the cluster wide search for datasources and adds/updates/deletes them in grafana |`false` |
91 | `sidecar.datasources.label` | Label that config maps with datasources should have to be added | `grafana_datasource` |
92 | `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` |
93 | `smtp.existingSecret` | The name of an existing secret containing the SMTP credentials. | `""` |
94 | `smtp.userKey` | The key in the existing SMTP secret containing the username. | `"user"` |
95 | `smtp.passwordKey` | The key in the existing SMTP secret containing the password. | `"password"` |
96 | `admin.existingSecret` | The name of an existing secret containing the admin credentials. | `""` |
97 | `admin.userKey` | The key in the existing admin secret containing the username. | `"admin-user"` |
98 | `admin.passwordKey` | The key in the existing admin secret containing the password. | `"admin-password"` |
99 | `rbac.create` | Create and use RBAC resources | `true` |
100 | `rbac.namespaced` | Creates Role and Rolebinding instead of the default ClusterRole and ClusteRoleBindings for the grafana instance | `false` |
101 | `rbac.pspEnabled` | Create PodSecurityPolicy (with `rbac.create`, grant roles permissions as well) | `true` |
102 | `rbac.pspUseAppArmor` | Enforce AppArmor in created PodSecurityPolicy (requires `rbac.pspEnabled`) | `true` |
103 | `command` | Define command to be executed by grafana container at startup | `nil` |
105 ### Example of extraVolumeMounts
110 mountPath: /var/lib/grafana/plugins
111 subPath: configs/grafana/plugins
112 existingClaim: existing-grafana-claim
118 There are a few methods to import dashboards to Grafana. Below are some examples and explanations as to how to use each method:
129 # Complete json file here
132 "title": "Some Dashboard",
137 # This is a path to a file inside the dashboards directory inside the chart directory
138 file: dashboards/custom-dashboard.json
140 # Ref: https://grafana.com/dashboards/2
143 datasource: Prometheus
145 url: https://raw.githubusercontent.com/user/repository/master/dashboards/dashboard.json
150 Dashboards could be storaged in a server that does not return JSON directly and instead of it returns a Base64 encoded file (e.g. Gerrit)
151 A new parameter has been added to the url use case so if you specify a b64content value equals to true after the url entry a Base64 decoding is applied before save the file to disk.
152 If this entry is not set or is equals to false not decoding is applied to the file before saving it to disk.
155 Gerrit API for download files has the following schema: https://yourgerritserver/a/{project-name}/branches/{branch-id}/files/{file-id}/content where {project-name} and
156 {file-id} usualy has '/' in their values and so they MUST be replaced by %2F so if project-name is user/repo, branch-id is master and file-id is equals to dir1/dir2/dashboard
157 the url value is https://yourgerritserver/a/user%2Frepo/branches/master/files/dir1%2Fdir2%2Fdashboard/content
159 ## Sidecar for dashboards
161 If the parameter `sidecar.dashboards.enabled` is set, a sidecar container is deployed in the grafana pod. This container watches all config maps in the cluster and filters out the ones with a label as defined in `sidecar.dashboards.label`. The files defined in those configmaps are written to a folder and accessed by grafana. Changes to the configmaps are monitored and the imported dashboards are deleted/updated. A recommendation is to use one configmap per dashboard, as an reduction of multiple dashboards inside one configmap is currently not properly mirrored in grafana.
162 Example dashboard config:
167 name: sample-grafana-dashboard
171 k8s-dashboard.json: |-
175 ## Sidecar for datasources
177 If the parameter `sidecar.datasources.enabled` is set, an init container is deployed in the grafana pod. This container lists all config maps in the cluster and filters out the ones with a label as defined in `sidecar.datasources.label`. The files defined in those configmaps are written to a folder and accessed by grafana on startup. Using these yaml files, the data sources in grafana can be imported. The configmaps must be created before `helm install` so that the datasources init container can list the configmaps.
179 Example datasource config adapted from [Grafana](http://docs.grafana.org/administration/provisioning/#example-datasource-config-file):
184 name: sample-grafana-datasource
186 grafana_datasource: 1
189 # config file version
192 # list of datasources that should be deleted from the database
197 # list of datasources to insert/update depending
198 # whats available in the database
200 # <string, required> name of the datasource. Required
202 # <string, required> datasource type. Required
204 # <string, required> access mode. proxy or direct (Server or Browser in the UI). Required
206 # <int> org id. will default to orgId 1 if not specified
209 url: http://localhost:8080
210 # <string> database password, if used
212 # <string> database user, if used
214 # <string> database name, if used
216 # <bool> enable/disable basic auth
218 # <string> basic auth username
220 # <string> basic auth password
222 # <bool> enable/disable with credentials headers
224 # <bool> mark as default datasource. Max one per org
226 # <map> fields that will be converted to json and stored in json_data
228 graphiteVersion: "1.1"
230 tlsAuthWithCACert: true
231 # <string> json object of data that will be encrypted.
237 # <bool> allow users to edit datasources from the UI.