Skip to content

Commit

Permalink
Update controllers/spaceprovisionerconfig/spaceprovisionerconfig_cont…
Browse files Browse the repository at this point in the history
…roller.go

Co-authored-by: Matous Jobanek <mjobanek@redhat.com>
  • Loading branch information
fbm3307 and MatousJobanek authored Jan 10, 2025
1 parent b1eb15e commit 177d7e2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (r *Reconciler) determineCapacityReadyState(spc *toolchainv1alpha1.SpacePro
// It always knows this fact so returning a bool is ok, in contrast to determinMemoryUtilizationReadyState.
func determineSpaceCountReadyState(spc *toolchainv1alpha1.SpaceProvisionerConfig) bool {
max := spc.Spec.CapacityThresholds.MaxNumberOfSpaces
//the value of we don't expect that the max number of Space count would ever go above the max size of int and it won't overflow, hence its okay to ignore the overflow linter error
// we don't expect that the max number of spaces would ever go above the max size of int, so we don't have to worry about the overflow error, hence its okay to ignore the linter here
return max == 0 || int(max) > spc.Status.ConsumedCapacity.SpaceCount // nolint:gosec
}

Expand Down

0 comments on commit 177d7e2

Please sign in to comment.