Skip to content

Commit 402dc87

Browse files
committed
helm: allow customizing termination message path
By default the termination message path is set to /tmp/termination-message to prevent issues with mounting a volume mount to /dev inside the container(s). Resolves galexrt#17 Signed-off-by: Alexander Trost <[email protected]>
1 parent 02bffa7 commit 402dc87

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

charts/node-exporter-textfiles/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.2
18+
version: 0.1.3
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/node-exporter-textfiles/templates/daemonset.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ spec:
3535
{{- toYaml .resources | nindent 12 }}
3636
env:
3737
- name: SCRIPT
38-
value: "{{ .script }}"
38+
value: {{ .script | quote }}
3939
- name: OUTPUT_FILENAME
4040
value: {{ .outputFilename | quote }}
4141
- name: INTERVAL
42-
value: "{{ .interval }}"
42+
value: {{ .interval | quote }}
4343
{{- with .additionalEnv }}
4444
{{- toYaml . | nindent 12 }}
4545
{{- end}}
46+
terminationMessagePath: {{ .terminationMessagePath | default $.Values.defaultTerminationMessagePath | quote }}
4647
volumeMounts:
4748
- mountPath: /var/lib/node_exporter
4849
name: textfile

charts/node-exporter-textfiles/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ tolerations: []
4747

4848
affinity: {}
4949

50+
defaultTerminationMessagePath: "/tmp/termination-message"
51+
5052
additionalVolumes:
5153
- name: textfile
5254
hostPath:
@@ -65,6 +67,10 @@ textfiles:
6567
# Defaults to `300`
6668
interval: 900
6769
additionalEnv: []
70+
# If you want to customize the path, by default the termination message path
71+
# is `/tmp/termination-message` to prevent issues with mounting the host's
72+
# `/dev` directory
73+
#terminationMessagePath: "/tmp/termination-message"
6874
additionalVolumeMounts:
6975
- mountPath: /dev
7076
name: host-dev

0 commit comments

Comments
 (0)