This adds context from for cloud calls for Kubelet.

It continues the propogation started in #59287.
This commit is contained in:
walter
2019-10-14 22:01:22 -07:00
parent 46a29a0cc3
commit d9e57861e5
2 changed files with 8 additions and 7 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package kubelet
import (
"context"
"fmt"
"io/ioutil"
"net"
@@ -225,7 +226,7 @@ func (kl *Kubelet) getRuntime() kubecontainer.Runtime {
// GetNode returns the node info for the configured node name of this Kubelet.
func (kl *Kubelet) GetNode() (*v1.Node, error) {
if kl.kubeClient == nil {
return kl.initialNode()
return kl.initialNode(context.TODO())
}
return kl.nodeInfo.GetNodeInfo(string(kl.nodeName))
}
@@ -241,7 +242,7 @@ func (kl *Kubelet) getNodeAnyWay() (*v1.Node, error) {
return n, nil
}
}
return kl.initialNode()
return kl.initialNode(context.TODO())
}
// GetNodeConfig returns the container manager node config.