Skip to content

Commit fe04ea4

Browse files
authored
Merge pull request #146 from ferryproxy/fix/update
Fixed multiple updates
2 parents 03ff26e + b29ff89 commit fe04ea4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/controllers/hub/hub_controller.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ func (c *HubController) updateClientset(hubName string) (client.Interface, error
212212

213213
if updated {
214214
c.enableCache(hubName, clientset)
215+
c.checkHealth(hubName)
215216
}
216217

217218
if IsEnabledMCS(hub) {
@@ -327,8 +328,6 @@ func (c *HubController) onAdd(obj interface{}) {
327328
"hub", objref.KRef(consts.FerryNamespace, f.Name),
328329
)
329330
}
330-
331-
c.checkHealth(f.Name)
332331
}
333332

334333
func IsEnabledMCS(f *trafficv1alpha2.Hub) bool {
@@ -428,8 +427,6 @@ func (c *HubController) onUpdate(oldObj, newObj interface{}) {
428427
"hub", objref.KRef(consts.FerryNamespace, f.Name),
429428
)
430429
}
431-
432-
c.checkHealth(f.Name)
433430
}
434431

435432
func (c *HubController) checkHealth(hubName string) {

0 commit comments

Comments
 (0)