Chart: Align default backend PodDisruptionBudget. (#11999)
Co-authored-by: Marco Ebert <marco_ebert@icloud.com>
This commit is contained in:
parent
46e91fd359
commit
bd97375742
4 changed files with 55 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue