fix: correct scope for capability checks
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{{- if .Capabilities.APIVersions.Has "http.keda.sh/v1alpha1" -}}
|
||||
{{- range $processName, $config := .Values.processes }}
|
||||
# Skip cron jobs
|
||||
{{- if and (hasKey $config "cron") (hasKey $config.cron "id") }}
|
||||
@@ -5,7 +6,7 @@
|
||||
{{- end }}
|
||||
|
||||
{{- if and (eq $processName "web") (and $config.autoscaling (and $config.autoscaling.enabled (eq $config.autoscaling.type "keda"))) }}
|
||||
{{- if and (.Capabilities.APIVersions.Has "http.keda.sh/v1alpha1") (and $config.autoscaling.http_trigger (eq $config.autoscaling.http_trigger.type "http")) }}
|
||||
{{- if and $config.autoscaling.http_trigger (eq $config.autoscaling.http_trigger.type "http") }}
|
||||
{{- $mappings := dict }}
|
||||
{{- range $pdx, $port_map := $config.web.port_maps }}
|
||||
{{- $mappings := set $mappings $port_map.name "true" }}
|
||||
@@ -56,3 +57,4 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{- if .Capabilities.APIVersions.Has "http.keda.sh/v1alpha1" -}}
|
||||
{{- range $processName, $config := .Values.processes }}
|
||||
# Skip cron jobs
|
||||
{{- if and (hasKey $config "cron") (hasKey $config.cron "id") }}
|
||||
@@ -5,7 +6,6 @@
|
||||
{{- end }}
|
||||
|
||||
{{- if and (eq $processName "web") (and $config.autoscaling (and $config.autoscaling.enabled (eq $config.autoscaling.type "keda"))) }}
|
||||
{{- if .Capabilities.APIVersions.Has "http.keda.sh/v1alpha1" -}}
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{- if .Capabilities.APIVersions.Has "keda.sh/v1alpha1" -}}
|
||||
{{- range $processName, $config := .Values.processes }}
|
||||
# Skip cron jobs
|
||||
{{- if and (hasKey $config "cron") (hasKey $config.cron "id") }}
|
||||
@@ -5,7 +6,6 @@
|
||||
{{- end }}
|
||||
|
||||
{{- 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
|
||||
|
||||
Reference in New Issue
Block a user