config-entry: fix a panic when registering a service or ingress gateway
This commit is contained in:
parent
5a0e6700c1
commit
6376141464
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
config-entry: fix a panic when creating an ingress gateway config-entry and a proxy service instance, where both provided the same upstream and downstream mapping.
|
||||||
|
```
|
|
@ -4016,6 +4016,7 @@ func insertGatewayServiceTopologyMapping(tx WriteTxn, idx uint64, gs *structs.Ga
|
||||||
mapping := upstreamDownstream{
|
mapping := upstreamDownstream{
|
||||||
Upstream: gs.Service,
|
Upstream: gs.Service,
|
||||||
Downstream: gs.Gateway,
|
Downstream: gs.Gateway,
|
||||||
|
Refs: make(map[string]struct{}),
|
||||||
RaftIndex: gs.RaftIndex,
|
RaftIndex: gs.RaftIndex,
|
||||||
}
|
}
|
||||||
if err := tx.Insert(tableMeshTopology, &mapping); err != nil {
|
if err := tx.Insert(tableMeshTopology, &mapping); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue