mirror of https://github.com/status-im/consul.git
Update GatewayKeys deduplication
Federation states data is only keyed on datacenter, so it cannot be directly compared against keys for gateway groups.
This commit is contained in:
parent
90ce897456
commit
e3666b0bc4
|
@ -303,12 +303,13 @@ func (c *configSnapshotMeshGateway) GatewayKeys() []GatewayKey {
|
|||
}
|
||||
|
||||
keys := make([]GatewayKey, 0, sz)
|
||||
for key := range c.GatewayGroups {
|
||||
for key := range c.FedStateGateways {
|
||||
keys = append(keys, gatewayKeyFromString(key))
|
||||
}
|
||||
for key := range c.FedStateGateways {
|
||||
if _, ok := c.GatewayGroups[key]; !ok {
|
||||
keys = append(keys, gatewayKeyFromString(key))
|
||||
for key := range c.GatewayGroups {
|
||||
gk := gatewayKeyFromString(key)
|
||||
if _, ok := c.FedStateGateways[gk.Datacenter]; !ok {
|
||||
keys = append(keys, gk)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue