Skip to content

Commit

Permalink
Add skipReload variable
Browse files Browse the repository at this point in the history
Signed-off-by: Mihail Ivanov <mihail.ivanov@sky.uk>
  • Loading branch information
mihail-i4v committed Jan 21, 2022
1 parent 8ba9d98 commit 53dd92e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/grafana/README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 53dd92e

Please sign in to comment.