Skip to content

Commit 4a06e6f

Browse files
committed
chore(grafana): Bump chart version, add docs comments and extend scripts config
- bump the patch version of the Grafana Helm Chart - add detailed comments on the functionality of the script value for the sidecar container - apply the script config to the other init and side containers - use the "with" control structure for the script config Signed-off-by: Hector Valcarcel <[email protected]>
1 parent daddddc commit 4a06e6f

File tree

3 files changed

+31
-14
lines changed

3 files changed

+31
-14
lines changed

charts/grafana/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: grafana
3-
version: 8.13.1
3+
version: 8.13.2
44
appVersion: 11.6.1
55
kubeVersion: "^1.8.0-0"
66
description: The leading tool for querying and visualizing time series and metrics.

charts/grafana/templates/_pod.tpl

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ initContainers:
230230
- name: SKIP_TLS_VERIFY
231231
value: "{{ . }}"
232232
{{- end }}
233-
{{- if .Values.sidecar.datasources.script }}
233+
{{- with .Values.sidecar.datasources.script }}
234234
- name: SCRIPT
235-
value: "{{ .Values.sidecar.datasources.script }}"
235+
value: {{ quote . }}
236236
{{- end }}
237237
{{- with .Values.sidecar.resources }}
238238
resources:
@@ -295,6 +295,10 @@ initContainers:
295295
- name: SKIP_TLS_VERIFY
296296
value: "{{ . }}"
297297
{{- end }}
298+
{{- with .Values.sidecar.notifiers.script }}
299+
- name: SCRIPT
300+
value: {{ quote . }}
301+
{{- end }}
298302
{{- with .Values.sidecar.livenessProbe }}
299303
livenessProbe:
300304
{{- toYaml . | nindent 6 }}
@@ -314,6 +318,9 @@ initContainers:
314318
volumeMounts:
315319
- name: sc-notifiers-volume
316320
mountPath: "/etc/grafana/provisioning/notifiers"
321+
{{- with .Values.sidecar.notifiers.extraMounts }}
322+
{{- toYaml . | trim | nindent 6 }}
323+
{{- end }}
317324
{{- end}}
318325
{{- with .Values.extraInitContainers }}
319326
{{- tpl (toYaml .) $root | nindent 2 }}
@@ -510,7 +517,7 @@ containers:
510517
{{- end }}
511518
{{- with .Values.sidecar.dashboards.script }}
512519
- name: SCRIPT
513-
value: "{{ . }}"
520+
value: {{ quote . }}
514521
{{- end }}
515522
{{- if not .Values.sidecar.dashboards.skipReload }}
516523
{{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }}
@@ -636,9 +643,9 @@ containers:
636643
- name: SKIP_TLS_VERIFY
637644
value: "{{ .Values.sidecar.skipTlsVerify }}"
638645
{{- end }}
639-
{{- if .Values.sidecar.datasources.script }}
646+
{{- with .Values.sidecar.datasources.script }}
640647
- name: SCRIPT
641-
value: "{{ .Values.sidecar.datasources.script }}"
648+
value: {{ quote . }}
642649
{{- end }}
643650
{{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }}
644651
- name: REQ_USERNAME
@@ -759,9 +766,9 @@ containers:
759766
- name: SKIP_TLS_VERIFY
760767
value: "{{ . }}"
761768
{{- end }}
762-
{{- if .Values.sidecar.notifiers.script }}
769+
{{- with .Values.sidecar.notifiers.script }}
763770
- name: SCRIPT
764-
value: "{{ .Values.sidecar.notifiers.script }}"
771+
value: {{ quote . }}
765772
{{- end }}
766773
{{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }}
767774
- name: REQ_USERNAME
@@ -880,7 +887,7 @@ containers:
880887
{{- end }}
881888
{{- with .Values.sidecar.plugins.script }}
882889
- name: SCRIPT
883-
value: "{{ . }}"
890+
value: {{ quote . }}
884891
{{- end }}
885892
{{- with .Values.sidecar.skipTlsVerify }}
886893
- name: SKIP_TLS_VERIFY

charts/grafana/values.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,9 @@ sidecar:
10201020
#
10211021
# Endpoint to send request to reload alerts
10221022
reloadURL: "http://localhost:3000/api/admin/provisioning/alerting/reload"
1023-
# Absolute path to shell script to execute after a alert got reloaded
1023+
# Absolute path to a script to execute after a configmap got reloaded.
1024+
# It runs before calls to REQ_URI. If the file is not executable it will be passed to sh.
1025+
# Otherwise, it's executed as is. Shebangs known to work are #!/bin/sh and #!/usr/bin/env python
10241026
script: null
10251027
skipReload: false
10261028
# This is needed if skipReload is true, to load any alerts defined at startup time.
@@ -1097,7 +1099,9 @@ sidecar:
10971099
#
10981100
# Endpoint to send request to reload alerts
10991101
reloadURL: "http://localhost:3000/api/admin/provisioning/dashboards/reload"
1100-
# Absolute path to shell script to execute after a configmap got reloaded
1102+
# Absolute path to a script to execute after a configmap got reloaded.
1103+
# It runs before calls to REQ_URI. If the file is not executable it will be passed to sh.
1104+
# Otherwise, it's executed as is. Shebangs known to work are #!/bin/sh and #!/usr/bin/env python
11011105
script: null
11021106
skipReload: false
11031107
# watchServerTimeout: request to the server, asking it to cleanly close the connection after that.
@@ -1201,7 +1205,9 @@ sidecar:
12011205
#
12021206
# Endpoint to send request to reload datasources
12031207
reloadURL: "http://localhost:3000/api/admin/provisioning/datasources/reload"
1204-
# Absolute path to shell script to execute after a datasource got reloaded
1208+
# Absolute path to a script to execute after a configmap got reloaded.
1209+
# It runs before calls to REQ_URI. If the file is not executable it will be passed to sh.
1210+
# Otherwise, it's executed as is. Shebangs known to work are #!/bin/sh and #!/usr/bin/env python
12051211
script: null
12061212
skipReload: false
12071213
# This is needed if skipReload is true, to load any datasources defined at startup time.
@@ -1267,7 +1273,9 @@ sidecar:
12671273
#
12681274
# Endpoint to send request to reload plugins
12691275
reloadURL: "http://localhost:3000/api/admin/provisioning/plugins/reload"
1270-
# Absolute path to shell script to execute after a plugin got reloaded
1276+
# Absolute path to a script to execute after a configmap got reloaded.
1277+
# It runs before calls to REQ_URI. If the file is not executable it will be passed to sh.
1278+
# Otherwise, it's executed as is. Shebangs known to work are #!/bin/sh and #!/usr/bin/env python
12711279
script: null
12721280
skipReload: false
12731281
# Deploy the datasource sidecar as an initContainer in addition to a container.
@@ -1333,7 +1341,9 @@ sidecar:
13331341
#
13341342
# Endpoint to send request to reload notifiers
13351343
reloadURL: "http://localhost:3000/api/admin/provisioning/notifications/reload"
1336-
# Absolute path to shell script to execute after a notifier got reloaded
1344+
# Absolute path to a script to execute after a configmap got reloaded.
1345+
# It runs before calls to REQ_URI. If the file is not executable it will be passed to sh.
1346+
# Otherwise, it's executed as is. Shebangs known to work are #!/bin/sh and #!/usr/bin/env python
13371347
script: null
13381348
skipReload: false
13391349
# Deploy the notifier sidecar as an initContainer in addition to a container.

0 commit comments

Comments
 (0)