• Kubernetes Submit Queue's avatar
    Merge pull request #58229 from sjenning/exempt-sandbox-image · 5d9f1f82
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 58422, 58229, 58421, 58435, 58475). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    kubelet: imagegc: exempt sandbox image
    
    The image GC logic currently does not consider the sandbox image to be in-use by pods, since it isn't explicitly listed in the pod spec.  However, it is trivially in-use if there are any pods running on the node.
    
    This change adds logic to exempt the sandbox image from GC by always considering it as in-use.
    
    **Reviewer Note**
    I am changing `(m *kubeGenericRuntimeManager) GetImageRef` to return the ID always rather than the first tag if it exists.  Seemed ok to me.  Makes some error messages a little less readable in that the ID will be printed and not the tag.  Just wanted to see what reviewers think about this.
    
    @derekwaynecarr @dashpole
    5d9f1f82
Name
Last commit
Last update
..
logs Loading commit data...
BUILD Loading commit data...
doc.go Loading commit data...
fake_kuberuntime_manager.go Loading commit data...
helpers.go Loading commit data...
helpers_test.go Loading commit data...
instrumented_services.go Loading commit data...
instrumented_services_test.go Loading commit data...
kuberuntime_container.go Loading commit data...
kuberuntime_container_test.go Loading commit data...
kuberuntime_gc.go Loading commit data...
kuberuntime_gc_test.go Loading commit data...
kuberuntime_image.go Loading commit data...
kuberuntime_image_test.go Loading commit data...
kuberuntime_logs.go Loading commit data...
kuberuntime_manager.go Loading commit data...
kuberuntime_manager_test.go Loading commit data...
kuberuntime_sandbox.go Loading commit data...
kuberuntime_sandbox_test.go Loading commit data...
labels.go Loading commit data...
labels_test.go Loading commit data...
legacy.go Loading commit data...
legacy_test.go Loading commit data...
security_context.go Loading commit data...
security_context_test.go Loading commit data...