Skip to content

Commit

Permalink
Merge pull request #986 from mihail-sky/skipReload
Browse files Browse the repository at this point in the history
[grafana] Add skipReload variable
  • Loading branch information
zanhsieh committed Jan 23, 2022
2 parents 521a907 + 64999b4 commit 61ee242
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/grafana/Chart.yaml
@@ -1,6 +1,6 @@
apiVersion: v2
name: grafana
version: 6.20.6
version: 6.20.7
appVersion: 8.3.4
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 @@ -170,6 +170,7 @@ This version requires Helm >= 3.1.0.
| `sidecar.datasources.searchNamespace` | Namespaces list. If specified, the sidecar will search for datasources 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.datasources.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` |
| `sidecar.datasources.reloadURL` | Full url of datasource configuration reload API endpoint, to invoke after a config-map change | `"http://localhost:3000/api/admin/provisioning/datasources/reload"` |
| `sidecar.datasources.skipReload` | Enabling this omits defining the REQ_URL and REQ_METHOD environment variables | `false` |
| `sidecar.notifiers.enabled` | Enables the cluster wide search for notifiers and adds/updates/deletes them in grafana | `false` |
| `sidecar.notifiers.label` | Label that config maps with notifiers should have to be added | `grafana_notifier` |
| `sidecar.notifiers.searchNamespace` | Namespaces list. If specified, the sidecar will search for notifiers config-maps (or secrets) 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` |
Expand Down
2 changes: 2 additions & 0 deletions charts/grafana/templates/_pod.tpl
Expand Up @@ -230,10 +230,12 @@ containers:
name: {{ .Values.admin.existingSecret | default (include "grafana.fullname" .) }}
key: {{ .Values.admin.passwordKey | default "admin-password" }}
{{- end }}
{{- if not .Values.sidecar.datasources.skipReload }}
- name: REQ_URL
value: {{ .Values.sidecar.datasources.reloadURL }}
- name: REQ_METHOD
value: POST
{{- end }}
resources:
{{ toYaml .Values.sidecar.resources | indent 6 }}
{{- if .Values.sidecar.securityContext }}
Expand Down
1 change: 1 addition & 0 deletions charts/grafana/values.yaml
Expand Up @@ -690,6 +690,7 @@ sidecar:
resource: both
# Endpoint to send request to reload datasources
reloadURL: "http://localhost:3000/api/admin/provisioning/datasources/reload"
skipReload: false
notifiers:
enabled: false
# label that the configmaps with notifiers are marked with
Expand Down

0 comments on commit 61ee242

Please sign in to comment.