mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue (batch tested with PRs 57211, 56150, 56368, 56271, 55957). 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>. Skip pods that refer to PVCs that are being deleted **What this PR does / why we need it**: New check was added to `Schedule()` to make sure that a scheduled pod refers to existing PVCs that are not being deleted. In 1.9 we plan to add a new feature that uses finalizers on PVC to protect PVCs that are used by a running pod from being deleted. This finalizer will be removed when all pods that use a PVC are finished or deleted. See https://github.com/kubernetes/community/blob/master/contributors/design-proposals/storage/postpone-pvc-deletion-if-used-in-a-pod.md for details. I needed to pass `pvcLister` to `GenericScheduler`. UX: ``` $ kubectl describe pod ... Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedScheduling 5s (x4 over 8s) default-scheduler persistentvolumeclaim "myclaim" is being deleted Warning FailedScheduling 1s (x2 over 1s) default-scheduler persistentvolumeclaim "myclaim" not found ``` **Release note**: ```release-note Scheduler skips pods that use a PVC that either does not exist or is being deleted. ``` /sig scheduling /kind feature |
||
---|---|---|
.. | ||
cmd/kube-scheduler | ||
pkg | ||
BUILD | ||
OWNERS |