Skip to content

Commit

Permalink
kubernetes#7271 feat: avoid-pdb-creation-when-default-backend-disable…
Browse files Browse the repository at this point in the history
…d-and-replicas-gt-1 (kubernetes#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
  • Loading branch information
marcportabellaclotet-mt authored and rchshld committed May 17, 2023
1 parent 9f4ab4b commit 099ecad
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,3 +18,4 @@ spec:
app.kubernetes.io/component: default-backend
minAvailable: {{ .Values.defaultBackend.minAvailable }}
{{- end }}
{{- end }}

0 comments on commit 099ecad

Please sign in to comment.