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

Introduce an EndpointsWatcher cache structure #11190

Merged
merged 15 commits into from
Aug 4, 2023
6 changes: 4 additions & 2 deletions controller/api/destination/watcher/cluster_store.go
Original file line number Diff line number Diff line change
@@ -221,8 +221,10 @@ func (cs *ClusterStore) addCluster(clusterName string, secret *v1.Secret) error
stopCh,
}

remoteAPI.Sync(stopCh)
metadataAPI.Sync(stopCh)
go func() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could even go a step further and sync each of these in their own goroutine to sync them in parallel.

remoteAPI.Sync(stopCh)
metadataAPI.Sync(stopCh)
}()

cs.log.Tracef("Added cluster %s to ClusterStore", clusterName)