fix: ensure the ScaledObject resource is not created if the capability does not exist
This commit is contained in:
1 parent
46f11cb239
commit
8add9b4b13
1 file changed
+3
-1
@@ -1,6 +1,7 @@
|
||||
{{- $processName := "PROCESS_NAME" }}
|
||||
{{- $config := index .Values.processes "PROCESS_NAME" }}
|
||||
{{- if and $config.autoscaling (and $config.autoscaling.enabled (eq $config.autoscaling.type "keda")) }}
|
||||
{{- if .Capabilities.APIVersions.Has "keda.sh/v1alpha1" -}}
|
||||
apiVersion: keda.sh/v1alpha1
|
||||
kind: ScaledObject
|
||||
metadata:
|
||||
@@ -40,4 +41,5 @@ spec:
|
||||
replicas: {{ $config.replicas }}
|
||||
triggers:
|
||||
{{- toYaml $config.autoscaling.triggers | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in new issue
Block a user