Skip to content
Closed
Changes from all commits
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
3 changes: 3 additions & 0 deletions pkg/operator/controller/status/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ func New(mgr manager.Manager, config Config) (controller.Controller, error) {
if err != nil {
return nil, err
}
if err := c.Watch(&source.Kind{Type: &configv1.ClusterOperator{}}, &handler.EnqueueRequestForObject{}); err != nil {
return nil, err
}
Comment on lines +68 to +70
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only care about the ingress clusteroperator, and the reconciler reconciles ingresscontrollers, so this new watch should filter clusteroperators by name and then enqueue an ingresscontroller object (the default ingresscontroller should always exist, so we could use that) rather than the clusteroperator object to so as to maintain a homogeneous workqueue (reconciling the ingresscontroller will ultimately update or recreate the clusteroperator as needed).

We did something similar for the cluster-dns-operator a while back: openshift/cluster-dns-operator#261

if err := c.Watch(&source.Kind{Type: &operatorv1.IngressController{}}, &handler.EnqueueRequestForObject{}); err != nil {
return nil, err
}
Expand Down