Skip to content

Commit

Permalink
Update charts/ingress-nginx/templates/controller-poddisruptionbudget.…
Browse files Browse the repository at this point in the history
…yaml

Co-authored-by: Marco Ebert <marco_ebert@icloud.com>
  • Loading branch information
StuxxNet and Gacko committed Mar 11, 2024
1 parent b869ebc commit 6480e14
Showing 1 changed file with 7 additions and 1 deletion.
@@ -1,4 +1,10 @@
{{- 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))}}
{{- $replicas := .Values.controller.replicaCount }}
{{- if .Values.controller.autoscaling.enabled }}
{{- $replicas = .Values.controller.autoscaling.minReplicas }}
{{- else if .Values.controller.keda.enabled }}
{{- $replicas = .Values.controller.keda.minReplicas }}
{{- end }}
{{- if gt ($replicas | int) 1 }}
apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
kind: PodDisruptionBudget
metadata:
Expand Down

0 comments on commit 6480e14

Please sign in to comment.