Skip to content

Commit

Permalink
Merge pull request #82848 from yutedz/node-ctrl-hostname
Browse files Browse the repository at this point in the history
Break out of loop when NodeHostName is found
  • Loading branch information
k8s-ci-robot committed Sep 20, 2019
2 parents 605687d + 68d8a5a commit db1f8da
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controller/cloud/node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ func (cnc *CloudNodeController) updateNodeAddress(node *v1.Node, instances cloud
for i := range nodeAddresses {
if nodeAddresses[i].Type == v1.NodeHostName {
hostnameExists = true
break
}
}
// If hostname was not present in cloud provided addresses, use the hostname
Expand Down

0 comments on commit db1f8da

Please sign in to comment.