diff --git a/.changelog/_20721.txt b/.changelog/_20721.txt new file mode 100644 index 000000000000..e8f45bd280d6 --- /dev/null +++ b/.changelog/_20721.txt @@ -0,0 +1,3 @@ +```release-note:bug +ingress-gateway: **(Enterprise Only)** Fix a bug where on update, Ingress Gateways lost all upstreams for listeners with wildcard services in a different namespace. +``` \ No newline at end of file diff --git a/agent/consul/state/catalog.go b/agent/consul/state/catalog.go index e5778f5b6140..aa11754c297c 100644 --- a/agent/consul/state/catalog.go +++ b/agent/consul/state/catalog.go @@ -3557,7 +3557,7 @@ func updateGatewayServices(tx WriteTxn, idx uint64, conf structs.ConfigEntry, en for _, svc := range gatewayServices { // If the service is a wildcard we need to target all services within the namespace if svc.Service.Name == structs.WildcardSpecifier { - if err := updateGatewayNamespace(tx, idx, svc, entMeta); err != nil { + if err := updateGatewayNamespace(tx, idx, svc, &svc.Service.EnterpriseMeta); err != nil { return fmt.Errorf("failed to associate gateway %q with wildcard: %v", gateway.String(), err) } // Skip service-specific update below if there was a wildcard update