feat: Updated PDB template to support Keda

Add keda to the conditional judgement

Fix:https://github.com/kubernetes/ingress-nginx/issues/10083
Signed-off-by: fedstate <yanru.lv@daocloud.io>
This commit is contained in:
tigerK 2023-06-27 00:46:45 +08:00 committed by fedstate
parent 643c475db0
commit 54b0e6aca1

View file

@ -1,4 +1,4 @@
{{- if or (and .Values.controller.autoscaling.enabled (gt (.Values.controller.autoscaling.minReplicas | int) 1)) (and (not .Values.controller.autoscaling.enabled) (gt (.Values.controller.replicaCount | int) 1)) }}
{{- if or (and .Values.controller.autoscaling.enabled (gt (.Values.controller.autoscaling.minReplicas | int) 1)) (and (not .Values.controller.autoscaling.enabled) (gt (.Values.controller.replicaCount | int) 1)) (and .Values.controller.keda.enabled (gt (.Values.controller.keda.minReplicas | int) 1)) }}
apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
kind: PodDisruptionBudget
metadata: