#7271 feat: avoid-pdb-creation-when-default-backend-disabled-and-replicas-gt-1 (#8155)

* feat: avoid-pdb-creation-when-default-backend-disabled-and-replicas-gt-1

* fix: added-eol

* feat: avoid-pdb-creation-when-default-backend-disabled-and-replicas-gt-1

* fix: added-eol
This commit is contained in:
Marc Portabella Clotet 2022-01-18 00:16:49 +01:00 committed by GitHub
parent cce04fca48
commit 4badf20173
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,3 +1,4 @@
{{- if .Values.defaultBackend.enabled -}}
{{- if or (gt (.Values.defaultBackend.replicaCount | int) 1) (gt (.Values.defaultBackend.autoscaling.minReplicas | int) 1) }}
apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
kind: PodDisruptionBudget
@ -17,3 +18,4 @@ spec:
app.kubernetes.io/component: default-backend
minAvailable: {{ .Values.defaultBackend.minAvailable }}
{{- end }}
{{- end }}