Skip to content

Commit

Permalink
add node address allocate check when init
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Feb 25, 2021
1 parent 215c8f4 commit 951e31e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (c *Controller) handleAddNode(key string) error {

var v4IP, v6IP, mac string
portName := fmt.Sprintf("node-%s", key)
if node.Annotations[util.IpAddressAnnotation] != "" && node.Annotations[util.MacAddressAnnotation] != "" {
if node.Annotations[util.AllocatedAnnotation] == "true" && node.Annotations[util.IpAddressAnnotation] != "" && node.Annotations[util.MacAddressAnnotation] != "" {
v4IP, v6IP = util.SplitStringIP(node.Annotations[util.IpAddressAnnotation])
mac = node.Annotations[util.MacAddressAnnotation]
} else {
Expand Down

0 comments on commit 951e31e

Please sign in to comment.