mirror of https://github.com/kubernetes/kops.git
ipv6: Tolerate multiple routes to the same NAT Gateway
This commit is contained in:
parent
c05bf4fdef
commit
49115bcc11
|
|
@ -211,9 +211,11 @@ func findNatGatewayFromRouteTable(cloud awsup.AWSCloud, routeTable *RouteTable)
|
||||||
|
|
||||||
if rt != nil {
|
if rt != nil {
|
||||||
var natGatewayIDs []*string
|
var natGatewayIDs []*string
|
||||||
|
natGatewayIDsSeen := map[string]bool{}
|
||||||
for _, route := range rt.Routes {
|
for _, route := range rt.Routes {
|
||||||
if route.NatGatewayId != nil {
|
if route.NatGatewayId != nil && !natGatewayIDsSeen[*route.NatGatewayId] {
|
||||||
natGatewayIDs = append(natGatewayIDs, route.NatGatewayId)
|
natGatewayIDs = append(natGatewayIDs, route.NatGatewayId)
|
||||||
|
natGatewayIDsSeen[*route.NatGatewayId] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue