mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
should omit comparison to bool constant in pkg/controller/controller_utils.go
This commit is contained in:
parent
e4c795168b
commit
acc55500bc
@ -504,10 +504,10 @@ func validateControllerRef(controllerRef *metav1.OwnerReference) error {
|
||||
if len(controllerRef.Kind) == 0 {
|
||||
return fmt.Errorf("controllerRef has empty Kind")
|
||||
}
|
||||
if controllerRef.Controller == nil || *controllerRef.Controller != true {
|
||||
if controllerRef.Controller == nil || !*controllerRef.Controller {
|
||||
return fmt.Errorf("controllerRef.Controller is not set to true")
|
||||
}
|
||||
if controllerRef.BlockOwnerDeletion == nil || *controllerRef.BlockOwnerDeletion != true {
|
||||
if controllerRef.BlockOwnerDeletion == nil || !*controllerRef.BlockOwnerDeletion {
|
||||
return fmt.Errorf("controllerRef.BlockOwnerDeletion is not set")
|
||||
}
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user