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 0c4781c commit 0cc1386
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func determineMemoryUtilizationReadyState(spc *toolchainv1alpha1.SpaceProvisione

// the memory utilitzation is ok if it is below the threshold in all node types
for _, val := range spc.Status.ConsumedCapacity.MemoryUsagePercentPerNodeRole {
//the value of this is not going be less 0 or negative and it won't overflow, hence its okay to ignore the overflow linter error
// the MaxMemoryUtilizationPercent won't go over 100, so it's safe to cast it to int and to not worry about overflow error, thus ignoring the linter
if val >= int(spc.Spec.CapacityThresholds.MaxMemoryUtilizationPercent) { // nolint:gosec
return corev1.ConditionFalse
}
Expand Down

0 comments on commit 0cc1386

Please sign in to comment.