Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Watches in Multiple Clusters #4

Open
saahildhulla opened this issue May 11, 2021 · 0 comments
Open

Multiple Watches in Multiple Clusters #4

saahildhulla opened this issue May 11, 2021 · 0 comments

Comments

@saahildhulla
Copy link

saahildhulla commented May 11, 2021

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.

	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)
		}
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant