Chart: Align default backend PodDisruptionBudget. (#11993)

This commit is contained in:
Marco Ebert 2024-09-20 14:04:48 +02:00 committed by GitHub
parent 9e6c40664f
commit 435d5365b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 55 additions and 2 deletions

View file

@ -1,5 +1,9 @@
{{- if .Values.defaultBackend.enabled -}}
{{- if or (gt (.Values.defaultBackend.replicaCount | int) 1) (gt (.Values.defaultBackend.autoscaling.minReplicas | int) 1) }}
{{- $replicas := .Values.defaultBackend.replicaCount }}
{{- if .Values.defaultBackend.autoscaling.enabled }}
{{- $replicas = .Values.defaultBackend.autoscaling.minReplicas }}
{{- end }}
{{- if gt ($replicas | int) 1 }}
apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
kind: PodDisruptionBudget
metadata: