-
k8s-merge-robot authored
Automatic merge from submit-queue Kubelet: Set PruneChildren when removing image. This is a bug introduced during switching to engine-api. https://github.com/kubernetes/kubernetes/issues/23563. When removing image, there is an option `noprune`: ``` If prune is true, ancestor images will each attempt to be deleted quietly. ``` In go-dockerclient, the default value of the option is ["noprune=false"](https://github.com/fsouza/go-dockerclient/blob/master/image.go#L171), which means that ancestor images should be also removed. This is the expected behaviour. However in engine-api, the option is changed to `PruneChildren`, and the default value is `PruneChildren=false`, which means that ancestor images won't be removed. This makes `ImageRemove` only remove the first layer of the image, which causes the image garbage collection not working as expected. This should be fixed in 1.3. And thanks to @ronnielai for finding the bug! :) /cc @kubernetes/sig-node
e2a697db