Second attempt: Plumb context to Kubelet CRI calls (#113591)
* plumb context from CRI calls through kubelet * clean up extra timeouts * try fixing incorrectly cancelled context
This commit is contained in:
@@ -191,8 +191,8 @@ func (kl *Kubelet) GetPods() []*v1.Pod {
|
||||
// container runtime cache. This function converts kubecontainer.Pod to
|
||||
// v1.Pod, so only the fields that exist in both kubecontainer.Pod and
|
||||
// v1.Pod are considered meaningful.
|
||||
func (kl *Kubelet) GetRunningPods() ([]*v1.Pod, error) {
|
||||
pods, err := kl.runtimeCache.GetPods()
|
||||
func (kl *Kubelet) GetRunningPods(ctx context.Context) ([]*v1.Pod, error) {
|
||||
pods, err := kl.runtimeCache.GetPods(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user