weave-gitops
weave-gitops copied to clipboard
Update `UpdateClusters` to notify watchers with the added and removed clusters
Part of: https://github.com/weaveworks/weave-gitops-enterprise/issues/1282
What changed?
- Updated clientFactory to include a slice of watchers.
- Created a clientFactory method to create/remove watcher.
- Updated
UpdateClustersto notify watchers with the added and removed clusters.
Why was this change made?
This is part of the changes made to allow GetProfiles and GetProfileValues to work with any HelmRepository CR and on any cluster, in order to allow a user to select a Chart from a HelmRepository on a leaf cluster.
How did you validate the change? Added unit tests.