Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
trigger reconciliation when subscription annotation is updated
Signed-off-by: Daniel Fan <[email protected]>
  • Loading branch information
Daniel-Fan committed Nov 20, 2024
commit ea741ca686796ec9ac4cbf30892b857d2149c958
4 changes: 3 additions & 1 deletion controllers/operandrequest/operandrequest_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,9 @@ func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error {
oldObject := e.ObjectOld.(*olmv1alpha1.Subscription)
newObject := e.ObjectNew.(*olmv1alpha1.Subscription)
if oldObject.Labels != nil && oldObject.Labels[constant.OpreqLabel] == "true" {
return (oldObject.Status.InstalledCSV != "" && newObject.Status.InstalledCSV != "" && oldObject.Status.InstalledCSV != newObject.Status.InstalledCSV)
statusToggle := (oldObject.Status.InstalledCSV != "" && newObject.Status.InstalledCSV != "" && oldObject.Status.InstalledCSV != newObject.Status.InstalledCSV)
metadataToggle := !reflect.DeepEqual(oldObject.Annotations, newObject.Annotations)
return statusToggle || metadataToggle
}
return false
},
Expand Down