diff --git a/crd/nodenetworkconfig/client.go b/crd/nodenetworkconfig/client.go index f3113f2c06..6669f91122 100644 --- a/crd/nodenetworkconfig/client.go +++ b/crd/nodenetworkconfig/client.go @@ -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")