diff --git a/manager/orchestrator/updater.go b/manager/orchestrator/updater.go index 97cb2fe328..1b9b285eb4 100644 --- a/manager/orchestrator/updater.go +++ b/manager/orchestrator/updater.go @@ -49,7 +49,7 @@ func (u *UpdateSupervisor) Update(ctx context.Context, cluster *api.Cluster, ser id := service.ID if update, ok := u.updates[id]; ok { - if !update.isServiceDirty(service) { + if reflect.DeepEqual(service.Spec, update.newService.Spec) { // There's already an update working towards this goal. return } @@ -375,11 +375,6 @@ func (u *Updater) isTaskDirty(t *api.Task) bool { (t.Endpoint != nil && !reflect.DeepEqual(u.newService.Spec.Endpoint, t.Endpoint.Spec)) } -func (u *Updater) isServiceDirty(service *api.Service) bool { - return !reflect.DeepEqual(u.newService.Spec.Task, service.Spec.Task) || - !reflect.DeepEqual(u.newService.Spec.Endpoint, service.Spec.Endpoint) -} - func (u *Updater) isSlotDirty(slot slot) bool { return len(slot) > 1 || (len(slot) == 1 && u.isTaskDirty(slot[0])) }