feat(argo-rollouts): Add PDB option to controller and dashboard (#1294)

* feat(argo-rollouts): Add PodDisruptionBudget option to controller and dashboard

Signed-off-by: Ward Loos <ward.loos@gmail.com>

* Apply changes from code review

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

Co-authored-by: Ward Loos <ward.loos@aaqua.live>
Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
Ward Loos 2022-05-26 13:59:58 +02:00 committed by GitHub
parent 0956363ebb
commit dc4f6919d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 106 additions and 3 deletions

View file

@ -84,3 +84,14 @@ Return the target Kubernetes version
{{- define "argo-rollouts.kubeVersion" -}}
{{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride }}
{{- end -}}
{{/*
Return the appropriate apiVersion for pod disruption budget
*/}}
{{- define "argo-rollouts.podDisruptionBudget.apiVersion" -}}
{{- if semverCompare "<1.21-0" (include "argo-rollouts.kubeVersion" $) -}}
{{- print "policy/v1beta1" -}}
{{- else -}}
{{- print "policy/v1" -}}
{{- end -}}
{{- end -}}