diff --git a/pkg/store/events.go b/pkg/store/events.go index 9e10ea4a..a7849d54 100644 --- a/pkg/store/events.go +++ b/pkg/store/events.go @@ -31,10 +31,10 @@ func (k *K8s) EventNamespace(ns *Namespace, data *Namespace) (updateRequired boo updateRequired = true case MODIFIED: nsStore := k.GetNamespace(data.Name) - if updateRequired = nsStore.Equal(data); !updateRequired { - return updateRequired + updateRequired = !EqualMap(nsStore.Labels, data.Labels) + if updateRequired { + nsStore.Labels = utils.CopyMap(data.Labels) } - nsStore.Labels = utils.CopyMap(data.Labels) case DELETED: _, ok := k.Namespaces[data.Name] if ok { @@ -334,11 +334,13 @@ func (k *K8s) EventPublishService(ns *Namespace, data *Service) (updateRequired oldService.Addresses = newService.Addresses k.PublishServiceAddresses = newService.Addresses k.UpdateAllIngresses = true + updateRequired = true case ADDED: if service, ok := ns.Services[data.Name]; ok { k.PublishServiceAddresses = data.Addresses service.Addresses = data.Addresses k.UpdateAllIngresses = true + updateRequired = true return } logger.Errorf("Publish service '%s/%s' not found", data.Namespace, data.Name) @@ -348,6 +350,7 @@ func (k *K8s) EventPublishService(ns *Namespace, data *Service) (updateRequired k.PublishServiceAddresses = nil service.Addresses = nil k.UpdateAllIngresses = true + updateRequired = true } else { logger.Warningf("Publish service '%s/%s' not registered with controller, cannot delete !", data.Namespace, data.Name) }