Skip to content

Commit

Permalink
Merge pull request #319 from Poor12/improve-controller
Browse files Browse the repository at this point in the history
fix: do not need reconcile when member cluster do not have mcs api
  • Loading branch information
mrlihanbo authored Mar 27, 2024
2 parents 73ab25f + d57ab81 commit 733e4a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/controllers/mcs/service_export_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,11 @@ func (c *ServiceExportController) filterEndpointSlice(

svcName := eps.Labels[discoveryv1b1.LabelServiceName]
seListerInterface, synced, exists := c.fedInformerManager.GetResourceListerFromFactory(common.ServiceExportGVR, key.cluster)
if !exists || !synced() {
return true, fmt.Errorf("informer of serviceExport not exists or not synced for cluster %s", key.cluster)
if !exists {
return false, nil
}
if !synced() {
return true, fmt.Errorf("informer of serviceExport not synced for cluster %s", key.cluster)
}

seLister, ok := seListerInterface.(cache.GenericLister)
Expand Down

0 comments on commit 733e4a6

Please sign in to comment.