Merge pull request #7139 from ParichayDidwania/pdb-minavailable-precedence
fix(helm): Allow pdb minAvailable to take precedence over default max…
This commit is contained in:
commit
0a9528b202
|
@ -1,5 +1,7 @@
|
||||||
{{- if .Values.podDisruptionBudget -}}
|
{{- if .Values.podDisruptionBudget -}}
|
||||||
apiVersion: {{ template "podDisruptionBudget.apiVersion" . }}
|
{{- if and .Values.podDisruptionBudget.minAvailable .Values.podDisruptionBudget.maxUnavailable }}
|
||||||
|
{{- fail "Only one of podDisruptionBudget.minAvailable or podDisruptionBudget.maxUnavailable should be set." }}
|
||||||
|
{{- end }}apiVersion: {{ template "podDisruptionBudget.apiVersion" . }}
|
||||||
kind: PodDisruptionBudget
|
kind: PodDisruptionBudget
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
@ -10,7 +12,10 @@ spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{ include "cluster-autoscaler.instance-name" . | indent 6 }}
|
{{ include "cluster-autoscaler.instance-name" . | indent 6 }}
|
||||||
{{- if .Values.podDisruptionBudget }}
|
{{- if and .Values.podDisruptionBudget.minAvailable (not .Values.podDisruptionBudget.maxUnavailable) }}
|
||||||
{{ toYaml .Values.podDisruptionBudget | nindent 2 }}
|
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.podDisruptionBudget.maxUnavailable (not .Values.podDisruptionBudget.minAvailable) }}
|
||||||
|
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
Loading…
Reference in New Issue