Skip to content

Commit

Permalink
simplify some logic
Browse files Browse the repository at this point in the history
Signed-off-by: Shane <[email protected]>
  • Loading branch information
ctccxxd committed Nov 19, 2024
1 parent fa4bc5e commit 0551651
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions apis/keda/v1alpha1/scaledobject_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,7 @@ func (so *ScaledObject) CheckReplicasNotNegative(replicas ...int32) bool {

// GetIdleReplicasIfDefined returns bool based on whether idleRelicas is defined
func (so *ScaledObject) GetIdleReplicasIfDefined() bool {
if so.Spec.IdleReplicaCount != nil {
return true
}
return false
}
return so.Spec.IdleReplicaCount != nil

// checkReplicaCountBoundsAreValid checks that Idle/Min/Max ReplicaCount defined in ScaledObject are correctly specified
// i.e. that Min is not greater than Max or Idle greater or equal to Min
Expand Down

0 comments on commit 0551651

Please sign in to comment.