Skip to content

Commit

Permalink
Update apis/keda/v1alpha1/scaledobject_types.go
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Wozniak <[email protected]>
Signed-off-by: rickbrouwer <[email protected]>
  • Loading branch information
rickbrouwer and wozniakjan authored Jan 17, 2025
1 parent c0b1d55 commit ea4698d
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions apis/keda/v1alpha1/scaledobject_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,6 @@ func CheckFallbackValid(scaledObject *ScaledObject) error {
scaledObject.Spec.Fallback.FailureThreshold, scaledObject.Spec.Fallback.Replicas)
}

// Check if behavior is valid when specified
if scaledObject.Spec.Fallback.Behavior != "" &&
scaledObject.Spec.Fallback.Behavior != FallbackBehaviorStatic &&
scaledObject.Spec.Fallback.Behavior != FallbackBehaviorUseCurrentReplicasAsMin {
return fmt.Errorf("behavior=%s must be either '%s' or '%s'",
scaledObject.Spec.Fallback.Behavior,
FallbackBehaviorStatic,
FallbackBehaviorUseCurrentReplicasAsMin)
}

for _, trigger := range scaledObject.Spec.Triggers {
if trigger.Type == cpuString || trigger.Type == memoryString {
return fmt.Errorf("type is %s , but fallback it is not supported by the CPU & memory scalers", trigger.Type)
Expand Down

0 comments on commit ea4698d

Please sign in to comment.