Skip to content

Commit

Permalink
Watch OpenStackProvisionServer
Browse files Browse the repository at this point in the history
Trigger the Reconcile(...) whenever any object having an ownerReference
to OpenStackBaremetalSet is created/updated/deleted.

Signed-off-by: rabi <[email protected]>
  • Loading branch information
rabi committed Sep 20, 2024
1 parent 1717887 commit c802cec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions controllers/openstackbaremetalset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c802cec

Please sign in to comment.