Chart: Align HPA & KEDA conditions. (#11110)

This commit is contained in:
Marco Ebert 2024-03-12 14:43:51 +01:00 committed by GitHub
parent aa5deedae3
commit 9480cde724
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 70 additions and 8 deletions

View file

@ -1,7 +1,10 @@
# PDB is not supported for DaemonSets.
# https://github.com/kubernetes/kubernetes/issues/108124
{{- if eq .Values.controller.kind "Deployment" }}
{{- $replicas := .Values.controller.replicaCount }}
{{- if .Values.controller.autoscaling.enabled }}
{{- if and .Values.controller.autoscaling.enabled (not .Values.controller.keda.enabled) }}
{{- $replicas = .Values.controller.autoscaling.minReplicas }}
{{- else if .Values.controller.keda.enabled }}
{{- else if and .Values.controller.keda.enabled (not .Values.controller.autoscaling.enabled) }}
{{- $replicas = .Values.controller.keda.minReplicas }}
{{- end }}
{{- if gt ($replicas | int) 1 }}
@ -30,3 +33,4 @@ spec:
maxUnavailable: {{ .Values.controller.maxUnavailable }}
{{- end }}
{{- end }}
{{- end }}