weave-gitops icon indicating copy to clipboard operation
weave-gitops copied to clipboard

Update `UpdateClusters` to notify watchers with the added and removed clusters

Open sarataha opened this issue 3 years ago • 0 comments

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 UpdateClusters to 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.

sarataha avatar Aug 19 '22 16:08 sarataha