From c23bb155898789c0b619339482eb8705925ccd47 Mon Sep 17 00:00:00 2001 From: Pierre Date: Thu, 17 Mar 2022 17:35:47 +0100 Subject: [PATCH] Configurable pod termination grace period --- cockroachdb/templates/statefulset.yaml | 2 +- cockroachdb/values.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cockroachdb/templates/statefulset.yaml b/cockroachdb/templates/statefulset.yaml index ba920e07..8e1cc24b 100644 --- a/cockroachdb/templates/statefulset.yaml +++ b/cockroachdb/templates/statefulset.yaml @@ -138,7 +138,7 @@ spec: {{- end }} # No pre-stop hook is required, a SIGTERM plus some time is all that's # needed for graceful shutdown of a node. - terminationGracePeriodSeconds: 60 + terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }} containers: - name: db image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/cockroachdb/values.yaml b/cockroachdb/values.yaml index a4277df3..bdcfecb9 100644 --- a/cockroachdb/values.yaml +++ b/cockroachdb/values.yaml @@ -213,6 +213,10 @@ statefulset: # Does not apply for other anti-affinity types. weight: 100 + # Pod termination grace period + # https://www.cockroachlabs.com/docs/stable/node-shutdown.html#termination-grace-period + terminationGracePeriodSeconds: 60 + # Node selection constraints for scheduling Pods of this StatefulSet. # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector nodeSelector: {}