diff --git a/agent/proxycfg/state.go b/agent/proxycfg/state.go index b30db1b305..71e2182e29 100644 --- a/agent/proxycfg/state.go +++ b/agent/proxycfg/state.go @@ -336,6 +336,7 @@ func (s *state) initWatchesConnectProxy(snap *ConfigSnapshot) error { // Store defaults keyed under wildcard so they can be applied to centrally configured upstreams if u.DestinationName == structs.WildcardSpecifier { snap.ConnectProxy.UpstreamConfig[u.DestinationID().String()] = &u + continue } // This can be true if the upstream is a synthetic entry populated from centralized upstream config. diff --git a/agent/structs/structs.go b/agent/structs/structs.go index 55f5e68751..ec1082cc7c 100644 --- a/agent/structs/structs.go +++ b/agent/structs/structs.go @@ -1153,7 +1153,7 @@ func (s *NodeService) Validate() error { "Proxy.DestinationServiceName must be non-empty for Connect proxy "+ "services")) } - if strings.TrimSpace(s.Proxy.DestinationServiceName) == WildcardSpecifier { + if s.Proxy.DestinationServiceName == WildcardSpecifier { result = multierror.Append(result, fmt.Errorf( "Proxy.DestinationServiceName must not be a wildcard for Connect proxy "+ "services"))