Skip to content

Commit

Permalink
Merge pull request #847 from libon/grafana_add_script_env
Browse files Browse the repository at this point in the history
[grafana] Add SCRIPT environment variable to grafana dashboard sidecar container
  • Loading branch information
zanhsieh committed Nov 26, 2021
2 parents ad4dd70 + 04a5ff8 commit 91c6a60
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/grafana/Chart.yaml
@@ -1,6 +1,6 @@
apiVersion: v2
name: grafana
version: 6.17.7
version: 6.17.8
appVersion: 8.2.5
kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
Expand Down
1 change: 1 addition & 0 deletions charts/grafana/README.md
Expand Up @@ -159,6 +159,7 @@ This version requires Helm >= 3.1.0.
| `sidecar.dashboards.folderAnnotation` | The annotation the sidecar will look for in configmaps to override the destination folder for files | `nil` |
| `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` | Namespaces list. If specified, the sidecar will search for dashboards config-maps inside these namespaces.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.dashboards.script` | Absolute path to shell script to execute after a configmap got reloaded. | `nil` |
| `sidecar.dashboards.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` |
| `sidecar.datasources.enabled` | Enables 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` |
Expand Down
4 changes: 4 additions & 0 deletions charts/grafana/templates/_pod.tpl
Expand Up @@ -199,6 +199,10 @@ containers:
- name: FOLDER_ANNOTATION
value: "{{ .Values.sidecar.dashboards.folderAnnotation }}"
{{- end }}
{{- if .Values.sidecar.dashboards.script }}
- name: SCRIPT
value: "{{ .Values.sidecar.dashboards.script }}"
{{- end }}
resources:
{{ toYaml .Values.sidecar.resources | indent 6 }}
volumeMounts:
Expand Down
2 changes: 2 additions & 0 deletions charts/grafana/values.yaml
Expand Up @@ -650,6 +650,8 @@ sidecar:
# If specified, the sidecar will look for annotation with this name to create folder and put graph here.
# You can use this parameter together with `provider.foldersFromFilesStructure`to annotate configmaps and create folder structure.
folderAnnotation: null
# Absolute path to shell script to execute after a configmap got reloaded
script: null
# provider configuration that lets grafana manage the dashboards
provider:
# name of the provider, should be unique
Expand Down

0 comments on commit 91c6a60

Please sign in to comment.