This adds context from for cloud calls for Kubelet.
It continues the propogation started in #59287.
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user