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:
David Ashpole
2022-11-05 09:02:13 -04:00
committed by GitHub
parent 27766455f1
commit 64af1adace
115 changed files with 1444 additions and 1190 deletions

View File

@@ -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
}