We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 720ae0e commit 3d35d49Copy full SHA for 3d35d49
apis/keda/v1alpha1/scaledobject_types.go
@@ -305,8 +305,13 @@ func CheckFallbackValid(scaledObject *ScaledObject) error {
305
if trigger.Type == cpuString || trigger.Type == memoryString {
306
continue
307
}
308
- // If at least one trigger is of the type `AverageValue`, then having fallback is valid.
309
- if trigger.MetricType == autoscalingv2.AverageValueMetricType {
+
+ effectiveMetricType := trigger.MetricType
310
+ if effectiveMetricType == "" {
311
+ effectiveMetricType = autoscalingv2.AverageValueMetricType
312
+ }
313
314
+ if effectiveMetricType == autoscalingv2.AverageValueMetricType {
315
fallbackValid = true
316
break
317
0 commit comments