You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// AlreadyOwnedError is an error returned if the object you are trying to assign
29
+
// an controller reference is already owned by another controller
30
+
// Object is the subject and Owner is the reference for the current owner
31
+
typeAlreadyOwnedErrorstruct {
32
+
Object v1.Object
33
+
Owner v1.OwnerReference
34
+
}
35
+
36
+
func (e*AlreadyOwnedError) Error() string {
37
+
returnfmt.Sprintf("Object %s/%s is already owned by another %s controller %s", e.Object.GetNamespace(), e.Object.GetName(), e.Owner.Kind, e.Owner.Name)
38
+
}
39
+
40
+
// NewAlreadyOwnedError creates a new AlreadyOwnedError
// Make sure that object and owner are in the same namespace
45
-
ifobject.GetNamespace() !=owner.GetNamespace() {
46
-
returnfmt.Errorf("Object %s/%s must be in the same namespace as owner %s/%s", object.GetNamespace(), object.GetName(), owner.GetNamespace(), owner.GetName())
0 commit comments