I'm trying to understand how to use multicluster-controller to set watches on resources in multiple clusters + multiple namespaces.
It seems like if I call WatchResourceReconcileObject multiple times in succession that the controller only takes the last one. Any help would be appreciated!
Ex.
for _, c := range clients {
log.Printf("Starting Service Watch over namespaces: %v\n with client %s", realizedConfig.Namespaces, c.name)
if err := ctrl.WatchResourceReconcileObject(ctx, c.cluster, &v1.Service{}, controller.WatchOptions{Namespaces: realizedConfig.Namespaces}); err != nil {
return nil, fmt.Errorf("cannot create Service watch in %s cluster: %w", c.name, err)
}
}
Hi there!
I'm trying to understand how to use multicluster-controller to set watches on resources in multiple clusters + multiple namespaces.
It seems like if I call
WatchResourceReconcileObject
multiple times in succession that the controller only takes the last one. Any help would be appreciated!Ex.