mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue Delete all dead containers and sandboxes when under disk pressure. This PR modifies the eviction manager to add dead container and sandbox garbage collection as a resource reclaim function for disk. It also modifies the container GC logic to allow pods that are terminated, but not deleted to be removed. It still does not delete containers that are less than the minGcAge. This should prevent nodes from entering a permanently bad state if the entire disk is occupied by pods that are terminated (in the state failed, or succeeded), but not deleted. There are two improvements we should consider making in the future: - Track the disk space and inodes reclaimed by deleting containers. We currently do not track this, and it prevents us from determining if deleting containers resolves disk pressure. So we may still evict a pod even if we are able to free disk space by deleting dead containers. - Once we can track disk space and inodes reclaimed, we should consider only deleting the containers we need to in order to relieve disk pressure. This should help avoid a scenario where we try and delete a massive number of containers all at once, and overwhelm the runtime. /assign @vishh cc @derekwaynecarr ```release-note Disk Pressure triggers the deletion of terminated containers on the node. ``` |
||
---|---|---|
.. | ||
api | ||
apimachinery/tests | ||
apis | ||
auth | ||
bootstrap/api | ||
capabilities | ||
client | ||
cloudprovider | ||
controller | ||
conversion | ||
credentialprovider | ||
features | ||
fieldpath | ||
fields | ||
generated | ||
hyperkube | ||
kubeapiserver | ||
kubectl | ||
kubelet | ||
kubemark | ||
labels | ||
master | ||
metrics | ||
printers | ||
probe | ||
proxy | ||
quota | ||
registry | ||
routes | ||
runtime | ||
security | ||
securitycontext | ||
serviceaccount | ||
ssh | ||
types | ||
util | ||
version | ||
volume | ||
watch | ||
BUILD | ||
OWNERS |