feat: default to no triggers on any created ScaledObject
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
{{- $config := index .Values.processes "PROCESS_NAME" }}
|
{{- $config := index .Values.processes "PROCESS_NAME" }}
|
||||||
{{- if and $config.autoscaling (and $config.autoscaling.enabled (eq $config.autoscaling.type "keda")) }}
|
{{- if and $config.autoscaling (and $config.autoscaling.enabled (eq $config.autoscaling.type "keda")) }}
|
||||||
{{- if .Capabilities.APIVersions.Has "keda.sh/v1alpha1" -}}
|
{{- if .Capabilities.APIVersions.Has "keda.sh/v1alpha1" -}}
|
||||||
|
---
|
||||||
apiVersion: keda.sh/v1alpha1
|
apiVersion: keda.sh/v1alpha1
|
||||||
kind: ScaledObject
|
kind: ScaledObject
|
||||||
metadata:
|
metadata:
|
||||||
@@ -31,9 +32,13 @@ spec:
|
|||||||
fallback:
|
fallback:
|
||||||
failureThreshold: 3
|
failureThreshold: 3
|
||||||
replicas: {{ $config.replicas }}
|
replicas: {{ $config.replicas }}
|
||||||
|
{{- if $config.autoscaling.triggers }}
|
||||||
triggers:
|
triggers:
|
||||||
{{- with $config.autoscaling.triggers }}
|
{{- with $config.autoscaling.triggers }}
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
triggers: []
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user