Skip to content

Commit d5b0743

Browse files
authored
call SetControllerReference when creating component instances (#23)
1 parent ec37088 commit d5b0743

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/controller/appwrapper_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ func (r *AppWrapperReconciler) createComponents(ctx context.Context, aw *workloa
321321
}
322322
return err, meta.IsNoMatchError(err) || apierrors.IsInvalid(err) // fatal
323323
}
324+
if err := controllerutil.SetControllerReference(aw, obj, r.Scheme); err != nil {
325+
return err, true
326+
}
324327
}
325328
return nil, false
326329
}

0 commit comments

Comments
 (0)