28 lines
935 B
YAML
28 lines
935 B
YAML
{{- if .Values.controller.pdb.enabled }}
|
|
apiVersion: policy/v1
|
|
kind: PodDisruptionBudget
|
|
metadata:
|
|
name: {{ include "argo-cd.controller.fullname" . }}
|
|
namespace: {{ include "argo-cd.namespace" . }}
|
|
labels:
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
|
{{- with .Values.controller.pdb.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- with .Values.controller.pdb.annotations }}
|
|
annotations:
|
|
{{- range $key, $value := . }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.controller.pdb.maxUnavailable }}
|
|
maxUnavailable: {{ . }}
|
|
{{- else }}
|
|
minAvailable: {{ .Values.controller.pdb.minAvailable | default 0 }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }}
|
|
{{- end }}
|