Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crd/nodenetworkconfig/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,14 @@ func (c *Client) UpdateSpec(ctx context.Context, key types.NamespacedName, spec
return nnc, nil
}

// SetOwnerRef sets the owner of the NodeNetworkConfig to the given object, using HTTP Patch
// SetOwnerRef sets the controller of the NodeNetworkConfig to the given object atomically, using HTTP Patch.
// Deprecated: SetOwnerRef is deprecated, use the more correctly named SetControllerRef.
func (c *Client) SetOwnerRef(ctx context.Context, key types.NamespacedName, owner metav1.Object, fieldManager string) (*v1alpha.NodeNetworkConfig, error) {
return c.SetControllerRef(ctx, key, owner, fieldManager)
}

// SetControllerRef sets the controller of the NodeNetworkConfig to the given object atomically, using HTTP Patch.
func (c *Client) SetControllerRef(ctx context.Context, key types.NamespacedName, owner metav1.Object, fieldManager string) (*v1alpha.NodeNetworkConfig, error) {
obj := genPatchSkel(key)
if err := ctrlutil.SetControllerReference(owner, obj, Scheme); err != nil {
return nil, errors.Wrapf(err, "failed to set controller reference for nnc")
Expand Down