Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #90554: kubelet: fix /stats/summary endpoint on Windows when #91103

Commits on May 14, 2020

  1. kubelet: fix /stats/summary endpoint on Windows when init-container…

    …s are present on the node
    
    Following changes in kubernetes#87730, Kubelet is directly hcsshim to gather stats.
    However, unlike `docker stats` API that was used before, hcsshim does not
    keep information about exited containers.
    
    When the Kubelet lists containers (`docker_container.go:ListContainers()`),
    it sets `All: true`, retrieving non-running containers.
    
    When docker stats is called with such container id, it'll return a valid JSON
    with all values set to 0. The non-running containers are filtered later on in the process.
    
    When the hcsshim is called with such container id, it'll return an error, effectively
    stopping the stats retrieval for all containers.
    vboulineau committed May 14, 2020
    Configuration menu
    Copy the full SHA
    b1fe9ab View commit details
    Browse the repository at this point in the history