Chart: Align HPA & KEDA conditions. (#11113)
Co-authored-by: Marco Ebert <marco_ebert@icloud.com>
This commit is contained in:
parent
7f8bebeb88
commit
f118d67042
7 changed files with 70 additions and 8 deletions
|
|
@ -19,7 +19,7 @@ spec:
|
|||
matchLabels:
|
||||
{{- include "ingress-nginx.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: controller
|
||||
{{- if not (or .Values.controller.autoscaling.enabled .Values.controller.keda.enabled) }}
|
||||
{{- if eq .Values.controller.autoscaling.enabled .Values.controller.keda.enabled }}
|
||||
replicas: {{ .Values.controller.replicaCount }}
|
||||
{{- end }}
|
||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{- if and .Values.controller.keda.enabled (eq .Values.controller.kind "Deployment") -}}
|
||||
{{- if and (eq .Values.controller.kind "Deployment") .Values.controller.keda.enabled (not .Values.controller.autoscaling.enabled) -}}
|
||||
apiVersion: {{ .Values.controller.keda.apiVersion }}
|
||||
kind: ScaledObject
|
||||
metadata:
|
||||
|
|
|
|||
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue