Skip to content

Commit

Permalink
storageclassrequest: set controller ownerref
Browse files Browse the repository at this point in the history
The `own()` method was no setting a controller ownerref on objects
created by the controller, which meant that updates to the created
resources would not trigger reconciliation when using `Owns()` for the
reconciler.

Signed-off-by: Jose A. Rivera <[email protected]>
  • Loading branch information
jarrpa committed Mar 28, 2024
1 parent 26be0b7 commit 435a1fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ func (r *StorageClassRequestReconciler) list(obj client.ObjectList, listOptions

func (r *StorageClassRequestReconciler) own(resource metav1.Object) error {
// Ensure StorageClassRequest ownership on a resource
return controllerutil.SetOwnerReference(r.StorageClassRequest, resource, r.Scheme)
return controllerutil.SetControllerReference(r.StorageClassRequest, resource, r.Scheme)
}

func (r *StorageClassRequestReconciler) getNamespacedName() string {
Expand Down

0 comments on commit 435a1fb

Please sign in to comment.