From 670ee90a772b7a6917b75380c9dcfcfd9a611654 Mon Sep 17 00:00:00 2001 From: sarahalsmiller <100602640+sarahalsmiller@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:03:08 -0600 Subject: [PATCH] Use correct enterprise meta on wildcard service update (#20721) * use correct enterprise meta on wildcard service update * changelog * rename changelog file --- .changelog/_20721.txt | 3 +++ agent/consul/state/catalog.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/_20721.txt diff --git a/.changelog/_20721.txt b/.changelog/_20721.txt new file mode 100644 index 0000000000..e8f45bd280 --- /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 8973381f2b..b89f2c727e 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