Skip to content

Commit

Permalink
check if externalIds map is nil when add node as gw for centralized s…
Browse files Browse the repository at this point in the history
…ubnet (#2088)
  • Loading branch information
hongzhen-ma authored Nov 28, 2022
1 parent 47d3872 commit 88500fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,9 @@ func (c *Controller) addPolicyRouteForCentralizedSubnetOnNode(nodeName, nodeIP s
continue
}
nextHops = append(nextHops, nextHop)
if nameIpMap == nil {
nameIpMap = make(map[string]string, 1)
}
nameIpMap[nodeName] = nextHop

if err = c.updatePolicyRouteForCentralizedSubnet(subnet.Name, cidrBlock, nextHops, nameIpMap); err != nil {
Expand Down

0 comments on commit 88500fa

Please sign in to comment.