diff --git a/agent/structs/config_entry_gateways.go b/agent/structs/config_entry_gateways.go index aebb0a0f3..bad63294a 100644 --- a/agent/structs/config_entry_gateways.go +++ b/agent/structs/config_entry_gateways.go @@ -266,10 +266,7 @@ func (e *IngressGatewayConfigEntry) Validate() error { declaredHosts := make(map[string]bool) serviceNames := make(map[ServiceID]struct{}) - for i, s := range listener.Services { - if err := validateInnerEnterpriseMeta(&s.EnterpriseMeta, &e.EnterpriseMeta); err != nil { - return fmt.Errorf("services[%d]: %w", i, err) - } + for _, s := range listener.Services { sn := NewServiceName(s.Name, &s.EnterpriseMeta) if err := s.RequestHeaders.Validate(listener.Protocol); err != nil { return fmt.Errorf("request headers %s (service %q on listener on port %d)", err, sn.String(), listener.Port) diff --git a/api/config_entry_gateways.go b/api/config_entry_gateways.go index c3eb07f12..0792ad824 100644 --- a/api/config_entry_gateways.go +++ b/api/config_entry_gateways.go @@ -103,12 +103,14 @@ type IngressService struct { // using a "tcp" listener. Hosts []string - // Referencing other partitions is not supported. - // Namespace is the namespace where the service is located. // Namespacing is a Consul Enterprise feature. Namespace string `json:",omitempty"` + // Partition is the partition where the service is located. + // Partitioning is a Consul Enterprise feature. + Partition string `json:",omitempty"` + // TLS allows specifying some TLS configuration per listener. TLS *GatewayServiceTLSConfig `json:",omitempty"` diff --git a/api/config_entry_test.go b/api/config_entry_test.go index 699d4ddc7..04419ea37 100644 --- a/api/config_entry_test.go +++ b/api/config_entry_test.go @@ -964,7 +964,8 @@ func TestDecodeConfigEntry(t *testing.T) { "Services": [ { "Name": "web", - "Namespace": "foo" + "Namespace": "foo", + "Partition": "bar" }, { "Name": "db" @@ -1001,6 +1002,7 @@ func TestDecodeConfigEntry(t *testing.T) { { Name: "web", Namespace: "foo", + Partition: "bar", }, { Name: "db",