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

@ -0,0 +1,27 @@
{{- if .Values.controller.pdb.enabled }}
apiVersion: {{ include "argo-rollouts.podDisruptionBudget.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "argo-rollouts.fullname" . }}
labels:
{{- include "argo-rollouts.labels" . | nindent 4 }}
{{- with .Values.controller.pdb.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.controller.pdb.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.controller.pdb.minAvailable }}
minAvailable: {{ .Values.controller.pdb.minAvailable }}
{{- else if .Values.controller.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.controller.pdb.maxUnavailable }}
{{- else }}
minAvailable: 0
{{- end }}
selector:
matchLabels:
{{- include "argo-rollouts.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: {{ .Values.controller.component }}
{{- end }}