simplify isMutating logic

This commit is contained in:
Sam Stoelinga 2022-07-22 07:40:01 -07:00
parent ff449375da
commit 1f5b29b7f6

View File

@ -165,9 +165,6 @@ func IsPSPMutating(pspObj *v1beta1.PodSecurityPolicy) (mutating bool, fields, an
}
}
if len(fields) > 0 || len(annotations) > 0 {
return true, fields, annotations
}
return false, fields, annotations
isMutating := len(fields) > 0 || len(annotations) > 0
return isMutating, fields, annotations
}