Reconcile value of controller-managed attach-detach annotation on existing nodes in Kubelet startup

This commit is contained in:
Paul Morie
2016-08-30 13:40:25 -04:00
parent a3b17f5e53
commit 1805d30b67
3 changed files with 290 additions and 46 deletions

View File

@@ -189,7 +189,7 @@ func (kl *Kubelet) GetRuntime() kubecontainer.Runtime {
// GetNode returns the node info for the configured node name of this Kubelet.
func (kl *Kubelet) GetNode() (*api.Node, error) {
if kl.standaloneMode {
return kl.initialNodeStatus()
return kl.initialNode()
}
return kl.nodeInfo.GetNodeInfo(kl.nodeName)
}
@@ -205,7 +205,7 @@ func (kl *Kubelet) getNodeAnyWay() (*api.Node, error) {
return n, nil
}
}
return kl.initialNodeStatus()
return kl.initialNode()
}
// GetNodeConfig returns the container manager node config.
@@ -222,7 +222,8 @@ func (kl *Kubelet) GetHostIP() (net.IP, error) {
return nodeutil.GetNodeHostIP(node)
}
// getHostIPAnyway attempts to return the host IP from kubelet's nodeInfo, or the initialNodeStatus
// getHostIPAnyway attempts to return the host IP from kubelet's nodeInfo, or
// the initialNode.
func (kl *Kubelet) getHostIPAnyWay() (net.IP, error) {
node, err := kl.getNodeAnyWay()
if err != nil {