Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetControllerReference ¶
SetControllerReference sets owner as a Controller OwnerReference on controlled. This is used for garbage collection of the controlled object and for reconciling the owner object on changes to controlled (with a Watch + EnqueueRequestForOwner). Since only one OwnerReference can be a controller, it returns an error if there is another OwnerReference with Controller flag set.
func SetOwnerReference ¶
SetOwnerReference is a helper method to make sure the given object contains an object reference to the object provided. This allows you to declare that owner has a dependency on the object without specifying it as a controller. If a reference to the same object already exists, it'll be overwritten with the newly provided version.
Types ¶
type AlreadyOwnedError ¶
type AlreadyOwnedError struct { Object metav1.Object Owner metav1.OwnerReference }
AlreadyOwnedError is an error returned if the object you are trying to assign a controller reference is already owned by another controller Object is the subject and Owner is the reference for the current owner.
func (*AlreadyOwnedError) Error ¶
func (e *AlreadyOwnedError) Error() string