Add the update method
This commit is contained in:
@ -22,6 +22,13 @@ func Create(ctx context.Context, client client.Client, obj client.Object, wait b
|
||||
return nil
|
||||
}
|
||||
|
||||
func Update(ctx context.Context, client client.Client, obj client.Object) error {
|
||||
if err := client.Update(ctx, obj); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetOwnerRef(ctx context.Context, client client.Client, obj client.Object, owner client.Object) client.Object {
|
||||
apiVersion := fmt.Sprintf("%s/%s", owner.GetObjectKind().GroupVersionKind().Group, owner.GetObjectKind().GroupVersionKind().Version)
|
||||
ownerReference := []metav1.OwnerReference{
|
||||
|
Reference in New Issue
Block a user