feat(argo-cd): Add support for custom Deployment strategy (#1918)

Signed-off-by: Laurent Lavaud <l.lavaud@gmail.com>
This commit is contained in:
Laurent Lavaud 2023-04-03 11:58:50 +02:00 committed by GitHub
parent 0697ab1e4b
commit 4ea0119321
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 83 additions and 4 deletions

View file

@ -120,3 +120,20 @@ nodeAffinity:
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Common deployment strategy definition
- Recreate don't have additional fields, we need to remove them if added by the mergeOverwrite
*/}}
{{- define "argo-cd.strategy" -}}
{{- $preset := . -}}
{{- if (eq $preset.type "Recreate") }}
type: Recreate
{{- else if (eq $preset.type "RollingUpdate") }}
type: RollingUpdate
{{- with $preset.rollingUpdate }}
rollingUpdate:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
{{- end -}}