Skip to content

Commit

Permalink
Added with statement for termination grace period
Browse files Browse the repository at this point in the history
Signed-off-by: Nicole <[email protected]>
  • Loading branch information
nfrazier08 committed Jan 31, 2024
1 parent e4964d7 commit 05955e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion charts/prometheus-node-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "prometheus-node-exporter.serviceAccountName" . }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- with .Values.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ . }}
{{- end }}
containers:
{{- $servicePort := ternary .Values.kubeRBACProxy.port .Values.service.port .Values.kubeRBACProxy.enabled }}
- name: node-exporter
Expand Down
6 changes: 3 additions & 3 deletions charts/prometheus-node-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ nodeSelector:
kubernetes.io/os: linux
# kubernetes.io/arch: amd64

# Specify grace period for graceful termination of pods
terminationGracePeriodSeconds: 30
# Specify grace period for graceful termination of pods. Defaults to 30
terminationGracePeriodSeconds: null

tolerations:
- effect: NoSchedule
Expand All @@ -371,7 +371,7 @@ tolerations:
# Enable or disable container termination message settings
# https://kubernetes.io/docs/tasks/debug/debug-application/determine-reason-pod-failure/
terminationMessageParams:
enabled: false
enabled: true
# If enabled, specify the path for termination messages
terminationMessagePath: /dev/termination-log
# If enabled, specify the policy for termination messages
Expand Down

0 comments on commit 05955e8

Please sign in to comment.