Attempt to fix Armada self-upgrade race condition

Change-Id: I1b84abb02fedfc788739de162d1e4938a008bc7d
This commit is contained in:
Sean Eagan 2021-10-09 12:08:42 -05:00
parent b5b519f66a
commit 026a00a88e
2 changed files with 13 additions and 0 deletions

View File

@ -113,6 +113,18 @@ spec:
{{ tuple $envAll "api" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "armada" "container" "armada_api" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
{{- if .Values.pod.lifecycle.prestop_sleep }}
lifecycle:
preStop:
exec:
command:
# Delay armada termination so that it has a chance to finish
# a helm upgrade of the armada chart itself so that the armada
# helm release gets marked DEPLOYED/FAILED, rather than
# PENDING_UPGRADE.
- sleep
- "{{ .Values.pod.lifecycle.prestop_sleep }}"
{{- end }}
{{- if .Values.pod.env.armada_api }}
env:
{{- range .Values.pod.env.armada_api }}

View File

@ -298,6 +298,7 @@ pod:
termination_grace_period:
api:
timeout: 30
prestop_sleep: 20
resources:
enabled: false
api: