Skip to content

Commit

Permalink
Backport of Use correct enterprise meta on wildcard service update in…
Browse files Browse the repository at this point in the history
…to release/1.16.x (#20727)

* backport of commit 94a0aa2

* backport of commit f0e1bad

* backport of commit 183dd2f

---------

Co-authored-by: Sarah Alsmiller <[email protected]>
  • Loading branch information
1 parent 9d20ac1 commit 4841196
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/_20721.txt
Original file line number Diff line number Diff line change
@@ -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.
```
2 changes: 1 addition & 1 deletion agent/consul/state/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4841196

Please sign in to comment.