Documentation ¶
Index ¶
- func CheckOwnerRefExist(uid types.UID, ownerRefs []metav1.OwnerReference) bool
- func EnsureOwnerRef(ctx context.Context, h *helper.Helper, owner client.Object, ...) error
- func PatchOwnerRef(owner client.Object, object client.Object, scheme *runtime.Scheme) (map[string]interface{}, client.Patch, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckOwnerRefExist ¶
func CheckOwnerRefExist( uid types.UID, ownerRefs []metav1.OwnerReference, ) bool
CheckOwnerRefExist - returns true if the owner is already in the owner ref list
func EnsureOwnerRef ¶
func EnsureOwnerRef( ctx context.Context, h *helper.Helper, owner client.Object, object client.Object, ) error
EnsureOwnerRef - adds owner ref (no controller) to an object which then can can be used to reconcile when the object changes by adding the following in NewControllerManagedBy(). Note: This will not triggere a reconcilation when the object gets re-created from scratch, like deleting a secret.
watch for secrets we added ourselves as additional owners, NOT as controller Watches(
&source.Kind{Type: &corev1.Secret{}}, &handler.EnqueueRequestForOwner{OwnerType: &clientv1.OpenStackClient{}, IsController: false}).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.