diff --git a/plugins/scheduler-k3s/templates/chart/deployment.yaml b/plugins/scheduler-k3s/templates/chart/deployment.yaml index 0fa6d45b2..30a38ec12 100644 --- a/plugins/scheduler-k3s/templates/chart/deployment.yaml +++ b/plugins/scheduler-k3s/templates/chart/deployment.yaml @@ -1,4 +1,8 @@ {{- range $processName, $config := .Values.processes }} +{{- if hasKey $config "cron" }} +# Skip {{ $processName }} as it is a cron job +{{- continue }} +{{- end }} {{- $mappings := dict }} {{- if hasKey $config "web" }} diff --git a/plugins/scheduler-k3s/templates/chart/keda-scaled-object.yaml b/plugins/scheduler-k3s/templates/chart/keda-scaled-object.yaml index 6487f7c7c..ac0f61f23 100644 --- a/plugins/scheduler-k3s/templates/chart/keda-scaled-object.yaml +++ b/plugins/scheduler-k3s/templates/chart/keda-scaled-object.yaml @@ -1,5 +1,9 @@ {{- if .Capabilities.APIVersions.Has "keda.sh/v1alpha1" -}} {{- range $processName, $config := .Values.processes }} +{{- if hasKey $config "cron" }} +# Skip {{ $processName }} as it is a cron job +{{- continue }} +{{- end }} {{- if and (hasKey $config "autoscaling") (and $config.autoscaling.enabled (eq $config.autoscaling.type "keda")) }} ---