fix scaleTargetRef definition for KEDA v.2

This commit is contained in:
hoodbsa 2021-01-14 13:29:32 +03:00
parent 9bf4155724
commit d70652a0eb
No known key found for this signature in database
GPG key ID: 2D2768C44911298A
3 changed files with 13 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{{- if .Values.controller.keda.enabled }}
{{- if and .Values.controller.keda.enabled (or (eq .Values.controller.kind "Deployment") (eq .Values.controller.kind "Both")) -}}
# https://keda.sh/docs/
apiVersion: {{ .Values.controller.keda.apiVersion }}
@ -11,7 +11,11 @@ metadata:
spec:
scaleTargetRef:
{{- if eq .Values.controller.keda.apiVersion "keda.k8s.io/v1alpha1" }}
deploymentName: {{ include "ingress-nginx.controller.fullname" . }}
{{- else if eq .Values.controller.keda.apiVersion "keda.sh/v1alpha1" }}
name: {{ include "ingress-nginx.controller.fullname" . }}
{{- end }}
pollingInterval: {{ .Values.controller.keda.pollingInterval }}
cooldownPeriod: {{ .Values.controller.keda.cooldownPeriod }}
minReplicaCount: {{ .Values.controller.keda.minReplicas }}