Skip to content

Commit

Permalink
Merge pull request #146 from ferryproxy/fix/update
Browse files Browse the repository at this point in the history
Fixed multiple updates
  • Loading branch information
wzshiming authored Oct 8, 2022
2 parents 03ff26e + b29ff89 commit fe04ea4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/controllers/hub/hub_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ func (c *HubController) updateClientset(hubName string) (client.Interface, error

if updated {
c.enableCache(hubName, clientset)
c.checkHealth(hubName)
}

if IsEnabledMCS(hub) {
Expand Down Expand Up @@ -327,8 +328,6 @@ func (c *HubController) onAdd(obj interface{}) {
"hub", objref.KRef(consts.FerryNamespace, f.Name),
)
}

c.checkHealth(f.Name)
}

func IsEnabledMCS(f *trafficv1alpha2.Hub) bool {
Expand Down Expand Up @@ -428,8 +427,6 @@ func (c *HubController) onUpdate(oldObj, newObj interface{}) {
"hub", objref.KRef(consts.FerryNamespace, f.Name),
)
}

c.checkHealth(f.Name)
}

func (c *HubController) checkHealth(hubName string) {
Expand Down

0 comments on commit fe04ea4

Please sign in to comment.