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 -}}
|
||||
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
|
||||
metadata:
|
||||
labels:
|
||||
|
@ -10,7 +12,10 @@ spec:
|
|||
selector:
|
||||
matchLabels:
|
||||
{{ include "cluster-autoscaler.instance-name" . | indent 6 }}
|
||||
{{- if .Values.podDisruptionBudget }}
|
||||
{{ toYaml .Values.podDisruptionBudget | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.podDisruptionBudget.minAvailable (not .Values.podDisruptionBudget.maxUnavailable) }}
|
||||
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if and .Values.podDisruptionBudget.maxUnavailable (not .Values.podDisruptionBudget.minAvailable) }}
|
||||
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Reference in New Issue