File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,9 @@ func GetNodeHostIP(node *v1.Node) (net.IP, error) {
108
108
return nil , fmt .Errorf ("host IP unknown; known addresses: %v" , addresses )
109
109
}
110
110
111
- // GetNodeIP returns the ip of node with the provided hostname
112
- // If required, wait for the node to be defined .
113
- func GetNodeIP (client clientset.Interface , hostname string ) net.IP {
111
+ // GetNodeIP returns an IP (as with GetNodeHostIP) for the node with the provided name.
112
+ // If required, it will wait for the node to be created .
113
+ func GetNodeIP (client clientset.Interface , name string ) net.IP {
114
114
var nodeIP net.IP
115
115
backoff := wait.Backoff {
116
116
Steps : 6 ,
@@ -120,7 +120,7 @@ func GetNodeIP(client clientset.Interface, hostname string) net.IP {
120
120
}
121
121
122
122
err := wait .ExponentialBackoff (backoff , func () (bool , error ) {
123
- node , err := client .CoreV1 ().Nodes ().Get (context .TODO (), hostname , metav1.GetOptions {})
123
+ node , err := client .CoreV1 ().Nodes ().Get (context .TODO (), name , metav1.GetOptions {})
124
124
if err != nil {
125
125
klog .Errorf ("Failed to retrieve node info: %v" , err )
126
126
return false , nil
You can’t perform that action at this time.
0 commit comments