mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue (batch tested with PRs 67709, 67556). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md. Fix volume scheduling issue with pod affinity and anti-affinity **What this PR does / why we need it**: The previous design of the volume scheduler had volume assume + bind done before pod assume + bind. This causes issues when trying to evaluate future pods with pod affinity/anti-affinity because the pod has not been assumed while the volumes have been decided. This PR changes the design so that volume and pod are assumed first, followed by volume and pod binding. Volume binding waits (asynchronously) for the operations to complete or error. This eliminates the subsequent passes through the scheduler to wait for volume binding to complete (although pod events or resyncs may still cause the pod to run through scheduling while binding is still in progress). This design also aligns better with the scheduler framework design, so will make it easier to migrate in the future. Many changes had to be made in the volume scheduler to handle this new design, mostly around: * How we cache pending binding operations. Now, any delayed binding PVC that is not fully bound must have a cached binding operation. This also means bind API updates may be repeated. * Waiting for the bind operation to fully complete, and detecting failure conditions to abort the bind and retry scheduling. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #65131 **Special notes for your reviewer**: **Release note**: ```release-note Fixes issue where pod scheduling may fail when using local PVs and pod affinity and anti-affinity without the default StatefulSet OrderedReady pod management policy ``` |
||
---|---|---|
.. | ||
api | ||
apis | ||
auth | ||
capabilities | ||
client | ||
cloudprovider | ||
controller | ||
credentialprovider | ||
features | ||
fieldpath | ||
generated | ||
kubeapiserver | ||
kubectl | ||
kubelet | ||
kubemark | ||
master | ||
printers | ||
probe | ||
proxy | ||
quota | ||
registry | ||
routes | ||
scheduler | ||
security | ||
securitycontext | ||
serviceaccount | ||
ssh | ||
util | ||
version | ||
volume | ||
watch/json | ||
windows/service | ||
.import-restrictions | ||
BUILD | ||
OWNERS |