From 1f68852dc24e90e9d59f2ef8f6c92fae47fd5f00 Mon Sep 17 00:00:00 2001 From: fischerman Date: Wed, 15 Jan 2020 11:03:20 +0100 Subject: [PATCH] add lifecycle to vault instead of extra container (#179) --- templates/server-statefulset.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/server-statefulset.yaml b/templates/server-statefulset.yaml index 48edf16..985bf59 100644 --- a/templates/server-statefulset.yaml +++ b/templates/server-statefulset.yaml @@ -117,9 +117,6 @@ spec: successThreshold: 1 timeoutSeconds: 5 {{- end }} - {{- if .Values.server.extraContainers }} - {{ toYaml .Values.server.extraContainers | nindent 8}} - {{- end }} lifecycle: # Vault container doesn't receive SIGTERM from Kubernetes # and after the grace period ends, Kube sends SIGKILL. This @@ -128,6 +125,9 @@ spec: preStop: exec: command: ["/bin/sh","-c","kill -SIGTERM $(pidof vault)"] + {{- if .Values.server.extraContainers }} + {{ toYaml .Values.server.extraContainers | nindent 8}} + {{- end }} {{- if .Values.global.imagePullSecrets }} imagePullSecrets: {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}