Skip to content

Commit 5a26bed

Browse files
Merge branch 'main' into fix-grafana-chart
Signed-off-by: Sheikh-Abubaker <[email protected]>
2 parents dc073f3 + 78f8d0e commit 5a26bed

File tree

2 files changed

+35
-11
lines changed

2 files changed

+35
-11
lines changed

charts/grafana/templates/_pod.tpl

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ initContainers:
230230
- name: SKIP_TLS_VERIFY
231231
value: "{{ . }}"
232232
{{- end }}
233+
{{- with .Values.sidecar.datasources.script }}
234+
- name: SCRIPT
235+
value: {{ quote . }}
236+
{{- end }}
233237
{{- with .Values.sidecar.resources }}
234238
resources:
235239
{{- toYaml . | nindent 6 }}
@@ -241,6 +245,9 @@ initContainers:
241245
volumeMounts:
242246
- name: sc-datasources-volume
243247
mountPath: "/etc/grafana/provisioning/datasources"
248+
{{- with .Values.sidecar.datasources.extraMounts }}
249+
{{- toYaml . | trim | nindent 6 }}
250+
{{- end }}
244251
{{- end }}
245252
{{- if and .Values.sidecar.notifiers.enabled .Values.sidecar.notifiers.initNotifiers }}
246253
- name: {{ include "grafana.name" . }}-init-sc-notifiers
@@ -288,6 +295,10 @@ initContainers:
288295
- name: SKIP_TLS_VERIFY
289296
value: "{{ . }}"
290297
{{- end }}
298+
{{- with .Values.sidecar.notifiers.script }}
299+
- name: SCRIPT
300+
value: {{ quote . }}
301+
{{- end }}
291302
{{- with .Values.sidecar.livenessProbe }}
292303
livenessProbe:
293304
{{- toYaml . | nindent 6 }}
@@ -307,6 +318,9 @@ initContainers:
307318
volumeMounts:
308319
- name: sc-notifiers-volume
309320
mountPath: "/etc/grafana/provisioning/notifiers"
321+
{{- with .Values.sidecar.notifiers.extraMounts }}
322+
{{- toYaml . | trim | nindent 6 }}
323+
{{- end }}
310324
{{- end}}
311325
{{- with .Values.extraInitContainers }}
312326
{{- tpl (toYaml .) $root | nindent 2 }}
@@ -503,7 +517,7 @@ containers:
503517
{{- end }}
504518
{{- with .Values.sidecar.dashboards.script }}
505519
- name: SCRIPT
506-
value: "{{ . }}"
520+
value: {{ quote . }}
507521
{{- end }}
508522
{{- if not .Values.sidecar.dashboards.skipReload }}
509523
{{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }}
@@ -629,9 +643,9 @@ containers:
629643
- name: SKIP_TLS_VERIFY
630644
value: "{{ .Values.sidecar.skipTlsVerify }}"
631645
{{- end }}
632-
{{- if .Values.sidecar.datasources.script }}
646+
{{- with .Values.sidecar.datasources.script }}
633647
- name: SCRIPT
634-
value: "{{ .Values.sidecar.datasources.script }}"
648+
value: {{ quote . }}
635649
{{- end }}
636650
{{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }}
637651
- name: REQ_USERNAME
@@ -752,9 +766,9 @@ containers:
752766
- name: SKIP_TLS_VERIFY
753767
value: "{{ . }}"
754768
{{- end }}
755-
{{- if .Values.sidecar.notifiers.script }}
769+
{{- with .Values.sidecar.notifiers.script }}
756770
- name: SCRIPT
757-
value: "{{ .Values.sidecar.notifiers.script }}"
771+
value: {{ quote . }}
758772
{{- end }}
759773
{{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }}
760774
- name: REQ_USERNAME
@@ -873,7 +887,7 @@ containers:
873887
{{- end }}
874888
{{- with .Values.sidecar.plugins.script }}
875889
- name: SCRIPT
876-
value: "{{ . }}"
890+
value: {{ quote . }}
877891
{{- end }}
878892
{{- with .Values.sidecar.skipTlsVerify }}
879893
- name: SKIP_TLS_VERIFY

charts/grafana/values.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,9 @@ sidecar:
10221022
#
10231023
# Endpoint to send request to reload alerts
10241024
reloadURL: "http://localhost:3000/api/admin/provisioning/alerting/reload"
1025-
# Absolute path to shell script to execute after a alert got reloaded
1025+
# Absolute path to a script to execute after a configmap got reloaded.
1026+
# It runs before calls to REQ_URI. If the file is not executable it will be passed to sh.
1027+
# Otherwise, it's executed as is. Shebangs known to work are #!/bin/sh and #!/usr/bin/env python
10261028
script: null
10271029
skipReload: false
10281030
# This is needed if skipReload is true, to load any alerts defined at startup time.
@@ -1099,7 +1101,9 @@ sidecar:
10991101
#
11001102
# Endpoint to send request to reload alerts
11011103
reloadURL: "http://localhost:3000/api/admin/provisioning/dashboards/reload"
1102-
# Absolute path to shell script to execute after a configmap got reloaded
1104+
# Absolute path to a script to execute after a configmap got reloaded.
1105+
# It runs before calls to REQ_URI. If the file is not executable it will be passed to sh.
1106+
# Otherwise, it's executed as is. Shebangs known to work are #!/bin/sh and #!/usr/bin/env python
11031107
script: null
11041108
skipReload: false
11051109
# watchServerTimeout: request to the server, asking it to cleanly close the connection after that.
@@ -1203,7 +1207,9 @@ sidecar:
12031207
#
12041208
# Endpoint to send request to reload datasources
12051209
reloadURL: "http://localhost:3000/api/admin/provisioning/datasources/reload"
1206-
# Absolute path to shell script to execute after a datasource got reloaded
1210+
# Absolute path to a script to execute after a configmap got reloaded.
1211+
# It runs before calls to REQ_URI. If the file is not executable it will be passed to sh.
1212+
# Otherwise, it's executed as is. Shebangs known to work are #!/bin/sh and #!/usr/bin/env python
12071213
script: null
12081214
skipReload: false
12091215
# This is needed if skipReload is true, to load any datasources defined at startup time.
@@ -1269,7 +1275,9 @@ sidecar:
12691275
#
12701276
# Endpoint to send request to reload plugins
12711277
reloadURL: "http://localhost:3000/api/admin/provisioning/plugins/reload"
1272-
# Absolute path to shell script to execute after a plugin got reloaded
1278+
# Absolute path to a script to execute after a configmap got reloaded.
1279+
# It runs before calls to REQ_URI. If the file is not executable it will be passed to sh.
1280+
# Otherwise, it's executed as is. Shebangs known to work are #!/bin/sh and #!/usr/bin/env python
12731281
script: null
12741282
skipReload: false
12751283
# Deploy the datasource sidecar as an initContainer in addition to a container.
@@ -1335,7 +1343,9 @@ sidecar:
13351343
#
13361344
# Endpoint to send request to reload notifiers
13371345
reloadURL: "http://localhost:3000/api/admin/provisioning/notifications/reload"
1338-
# Absolute path to shell script to execute after a notifier got reloaded
1346+
# Absolute path to a script to execute after a configmap got reloaded.
1347+
# It runs before calls to REQ_URI. If the file is not executable it will be passed to sh.
1348+
# Otherwise, it's executed as is. Shebangs known to work are #!/bin/sh and #!/usr/bin/env python
13391349
script: null
13401350
skipReload: false
13411351
# Deploy the notifier sidecar as an initContainer in addition to a container.

0 commit comments

Comments
 (0)