diff --git a/agent/agent.go b/agent/agent.go index 6d688b804f..ae549c1618 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -1912,7 +1912,7 @@ func (a *Agent) addServiceLocked(req AddServiceRequest) error { return err } - if a.config.EnableCentralServiceConfig { + if a.config.EnableCentralServiceConfig && (req.Service.IsSidecarProxy() || req.Service.IsGateway()) { return a.serviceManager.AddService(req) } diff --git a/agent/service_manager.go b/agent/service_manager.go index 5badb3a263..b0d1f30bec 100644 --- a/agent/service_manager.go +++ b/agent/service_manager.go @@ -122,15 +122,6 @@ func (s *ServiceManager) registerOnce(args addServiceInternalRequest) error { // // NOTE: the caller must hold the Agent.stateLock! func (s *ServiceManager) AddService(req AddServiceRequest) error { - req.Service.EnterpriseMeta.Normalize() - - // For now only proxies have anything that can be configured - // centrally. So bypass the whole manager for regular services. - if !req.Service.IsSidecarProxy() && !req.Service.IsGateway() { - req.persistServiceConfig = false - return s.agent.addServiceInternal(addServiceInternalRequest{AddServiceRequest: req}) - } - // TODO: replace serviceRegistration with AddServiceRequest reg := &serviceRegistration{ service: req.Service,