From c802cecb7b9450833b9f82a52727566f150c275a Mon Sep 17 00:00:00 2001 From: rabi Date: Thu, 19 Sep 2024 15:48:01 +0530 Subject: [PATCH] Watch OpenStackProvisionServer Trigger the Reconcile(...) whenever any object having an ownerReference to OpenStackBaremetalSet is created/updated/deleted. Signed-off-by: rabi --- controllers/openstackbaremetalset_controller.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/openstackbaremetalset_controller.go b/controllers/openstackbaremetalset_controller.go index cdf036a..7b883cb 100644 --- a/controllers/openstackbaremetalset_controller.go +++ b/controllers/openstackbaremetalset_controller.go @@ -183,7 +183,7 @@ func (r *OpenStackBaremetalSetReconciler) SetupWithManager(mgr ctrl.Manager) err return ctrl.NewControllerManagedBy(mgr). For(&baremetalv1.OpenStackBaremetalSet{}). - Owns(&baremetalv1.OpenStackBaremetalSet{}). + Owns(&baremetalv1.OpenStackProvisionServer{}). Watches(&metal3v1.BareMetalHost{}, openshiftMachineAPIBareMetalHostsFn). Complete(r) } @@ -500,7 +500,6 @@ func (r *OpenStackBaremetalSetReconciler) provisionServerCreateOrUpdate( if err != nil { return err } - provisionServer.Spec.OSImage = instance.Spec.OSImage provisionServer.Spec.OSContainerImageURL = instance.Spec.OSContainerImageURL provisionServer.Spec.ApacheImageURL = instance.Spec.ApacheImageURL