Skip to content

Commit 4a0028b

Browse files
committed
initial work st2api st2auth
1 parent 912dd75 commit 4a0028b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

templates/deployments.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ spec:
6060
- 'sh'
6161
- '-ec'
6262
- printf "${ST2_AUTH_USERNAME}:$(openssl passwd -apr1 "${ST2_AUTH_PASSWORD}")\n" > /tmp/st2/htpasswd
63+
terminationGracePeriodSeconds: {{ .Values.st2auth.terminationGracePeriodSeconds | default 30 }}
6364
containers:
6465
- name: st2auth
6566
image: '{{ template "stackstorm-ha.imageRepository" . }}/st2auth:{{ tpl (.Values.st2auth.image.tag | default .Values.image.tag) . }}'
@@ -179,6 +180,7 @@ spec:
179180
{{- if and .Values.st2.packs.images (not .Values.st2.packs.volumes.enabled) }}
180181
{{- include "stackstorm-ha.packs-initContainers" . | nindent 6 }}
181182
{{- end }}
183+
terminationGracePeriodSeconds: {{ .Values.st2api.terminationGracePeriodSeconds | default 30 }}
182184
containers:
183185
- name: st2api
184186
image: '{{ template "stackstorm-ha.imageRepository" . }}/st2api:{{ tpl (.Values.st2api.image.tag | default .Values.image.tag) . }}'
@@ -220,6 +222,9 @@ spec:
220222
mountPath: /post-start.sh
221223
subPath: post-start.sh
222224
lifecycle:
225+
preStop:
226+
exec:
227+
command: [ "sleep", {{ .Values.st2.st2api.preStopSleep }} ]
223228
postStart:
224229
exec:
225230
command: ["/bin/bash", "/post-start.sh"]

0 commit comments

Comments
 (0)