Skip to content

Commit

Permalink
helm: allow customizing termination message path
Browse files Browse the repository at this point in the history
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 #17

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
  • Loading branch information
galexrt committed Oct 4, 2022
1 parent 02bffa7 commit 402dc87
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/node-exporter-textfiles/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.2
version: 0.1.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
5 changes: 3 additions & 2 deletions charts/node-exporter-textfiles/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ spec:
{{- toYaml .resources | nindent 12 }}
env:
- name: SCRIPT
value: "{{ .script }}"
value: {{ .script | quote }}
- name: OUTPUT_FILENAME
value: {{ .outputFilename | quote }}
- name: INTERVAL
value: "{{ .interval }}"
value: {{ .interval | quote }}
{{- with .additionalEnv }}
{{- toYaml . | nindent 12 }}
{{- end}}
terminationMessagePath: {{ .terminationMessagePath | default $.Values.defaultTerminationMessagePath | quote }}
volumeMounts:
- mountPath: /var/lib/node_exporter
name: textfile
Expand Down
6 changes: 6 additions & 0 deletions charts/node-exporter-textfiles/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ tolerations: []

affinity: {}

defaultTerminationMessagePath: "/tmp/termination-message"

additionalVolumes:
- name: textfile
hostPath:
Expand All @@ -65,6 +67,10 @@ textfiles:
# Defaults to `300`
interval: 900
additionalEnv: []
# If you want to customize the path, by default the termination message path
# is `/tmp/termination-message` to prevent issues with mounting the host's
# `/dev` directory
#terminationMessagePath: "/tmp/termination-message"
additionalVolumeMounts:
- mountPath: /dev
name: host-dev
Expand Down

0 comments on commit 402dc87

Please sign in to comment.