Skip to content

Commit a9e6a0a

Browse files
Add preStop lifecycle hook (#105)
* Add preStop lifecycle hook * Fix typo in comment
1 parent e3c771a commit a9e6a0a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

templates/server-statefulset.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ spec:
102102
periodSeconds: 3
103103
successThreshold: 1
104104
timeoutSeconds: 5
105+
lifecycle:
106+
# Vault container doesn't receive SIGTERM from Kubernetes
107+
# and after the grace period ends, Kube sends SIGKILL. This
108+
# causes issues with graceful shutdowns such as deregistering itself
109+
# from Consul (zombie services).
110+
preStop:
111+
exec:
112+
command: ["/bin/sh","-c","kill -SIGTERM $(pidof vault)"]
105113
{{- if .Values.global.imagePullSecrets }}
106114
imagePullSecrets:
107115
{{- toYaml .Values.global.imagePullSecrets | nindent 8 }}

0 commit comments

Comments
 (0)