Merge pull request #8522 from dokku/fix-keda-scaling

Only emit keda fallback when a non-cpu/memory trigger exists
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-29 02:27:03 -04:00
committed by GitHub
3 changed files with 127 additions and 0 deletions

View File

@@ -33,9 +33,17 @@ spec:
pollingInterval: {{ $config.autoscaling.polling_interval_seconds }}
minReplicaCount: {{ $config.autoscaling.min_replicas }}
maxReplicaCount: {{ $config.autoscaling.max_replicas }}
{{- $hasFallbackTrigger := false }}
{{- range $config.autoscaling.triggers }}
{{- if and (ne .type "cpu") (ne .type "memory") }}
{{- $hasFallbackTrigger = true }}
{{- end }}
{{- end }}
{{- if $hasFallbackTrigger }}
fallback:
failureThreshold: 3
replicas: {{ $config.replicas }}
{{- end }}
{{- if $config.autoscaling.triggers }}
triggers:
{{- with $config.autoscaling.triggers }}