Skip to content

Commit 32096fe

Browse files
committed
ClusterHostedDNS: Add a watch to detect MCO becoming ready
This will allow the addition of Ingress LB IPs to the Infra PlatformStatus as soon as MCO becomes ready. This is a follow-up based on feedback received on PR 1411.
1 parent 2b3ed93 commit 32096fe

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pkg/operator/controller/ingress/controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ func New(mgr manager.Manager, config Config) (controller.Controller, error) {
167167
)); err != nil {
168168
return nil, err
169169
}
170+
// Watch for changes to machine-config ClusterOperator to know when MCO is ready.
171+
if err := c.Watch(source.Kind[client.Object](operatorCache, &configv1.ClusterOperator{}, handler.EnqueueRequestsFromMapFunc(reconciler.ingressConfigToIngressController),
172+
predicate.NewPredicateFuncs(hasName("machine-config")),
173+
)); err != nil {
174+
return nil, err
175+
}
170176
return c, nil
171177
}
172178

0 commit comments

Comments
 (0)