Skip to content

Commit c6fd307

Browse files
authored
Set Controller on im-common-service (#1000)
Originating issue: [IBMPrivateCloud/roadmap#66197](https://github.ibm.com/IBMPrivateCloud/roadmap/issues/66197) Signed-off-by: Rob Hundley <[email protected]>
1 parent 3d01ffb commit c6fd307

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controllers/operator/operandrequest.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ func (r *AuthenticationReconciler) createEDBShareClaim(ctx context.Context, req
294294
},
295295
}
296296
unstructuredObj := &unstructured.Unstructured{Object: unstructuredCS}
297+
if err = controllerutil.SetControllerReference(authCR, unstructuredObj, r.Client.Scheme()); err != nil {
298+
reqLogger.Error(err, "Failed to set owner for ConfigMap")
299+
return subreconciler.RequeueWithError(err)
300+
}
297301

298302
if err = r.Create(context.TODO(), unstructuredObj); k8sErrors.IsAlreadyExists(err) {
299303
// CommonService already exists from a previous reconcile

0 commit comments

Comments
 (0)