diff --git a/pkg/controller/controllerutil/controllerutil.go b/pkg/controller/controllerutil/controllerutil.go index b62fe22a92..b856322eb6 100644 --- a/pkg/controller/controllerutil/controllerutil.go +++ b/pkg/controller/controllerutil/controllerutil.go @@ -96,7 +96,7 @@ func SetOwnerReference(owner, object metav1.Object, scheme *runtime.Scheme) erro // Validate the owner. ro, ok := owner.(runtime.Object) if !ok { - return fmt.Errorf("%T is not a runtime.Object, cannot call SetOwnerReference", owner) + return fmt.Errorf("%T is not a runtime.Object, cannot call SetControllerReference", owner) } if err := validateOwner(owner, object); err != nil { return err @@ -281,9 +281,9 @@ func RemoveFinalizerWithError(o runtime.Object, finalizer string) error { return nil } -// KubernetesObject allows functions to work indistinctly with any resource that +// Object allows functions to work indistinctly with any resource that // implements both Object interfaces. -type KubernetesObject interface { +type Object interface { metav1.Object runtime.Object }