k3s/pkg
Kubernetes Submit Queue 2fdd328d05
Merge pull request #67556 from msau42/fix-assume
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
```
2018-09-04 23:19:37 -07:00
..
api make update 2018-08-30 18:24:23 -04:00
apis Validate Job .spec.ttlSecondsAfterFinished; clear it when feature disabled 2018-09-04 14:21:14 -07:00
auth Improve multi-authorizer errors 2018-07-06 10:55:17 -04:00
capabilities
client Deprecate ListWatchUntil, fix it and call places 2018-08-15 13:34:31 +02:00
cloudprovider Merge pull request #67736 from cheftako/GetClusters 2018-09-04 12:51:32 -07:00
controller Merge pull request #67556 from msau42/fix-assume 2018-09-04 23:19:37 -07:00
credentialprovider Merge pull request #65043 from brendandburns/todo4 2018-08-26 14:07:04 -07:00
features Merge pull request #68159 from saad-ali/csiClusterRegFix 2018-09-04 20:49:39 -07:00
fieldpath fieldpath: Add tests for missing cases 2018-07-12 10:26:18 +02:00
generated [kube-controller-manager] auto-generated file 2018-09-04 19:40:10 +08:00
kubeapiserver Merge pull request #64149 from sttts/sttts-ctrl-mgr-secure-ports 2018-08-31 09:06:31 -07:00
kubectl Merge pull request #68132 from soltysh/deprecate_run 2018-09-04 10:24:47 -07:00
kubelet Merge pull request #67709 from feiskyer/inodes-clean 2018-09-04 23:08:30 -07:00
kubemark autogenerated 2018-08-29 20:21:17 +03:00
master cloud-controller-manager: enable secure ports 10258, deprecate insecure port 2018-08-31 20:52:22 +02:00
printers Merge pull request #65074 from wgliang/master.describe-pv 2018-09-04 08:03:35 -07:00
probe Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
proxy Merge pull request #68075 from riverzhang/fix-ipvs-readme 2018-08-31 14:16:16 -07:00
quota Add sig/api-machinery label to apimachinery OWNERS files 2018-08-20 18:46:47 +05:30
registry Validate Job .spec.ttlSecondsAfterFinished; clear it when feature disabled 2018-09-04 14:21:14 -07:00
routes
scheduler Add scheduler option for bind timeout 2018-09-04 17:25:23 -07:00
security Merge pull request #68105 from tallclair/psp-test 2018-08-31 19:25:39 -07:00
securitycontext ProcMount: add api options and feature gate 2018-08-30 11:40:02 -04:00
serviceaccount svcacct: pass pod information in user.Info.Extra() when available 2018-08-31 11:54:50 -07:00
ssh Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
util fix UT errors and add new UTs 2018-09-03 13:35:17 +08:00
version Set gazelle:importmap_prefix for everything under staging/src 2018-06-22 16:22:57 -07:00
volume Integration and e2e tests 2018-09-04 16:30:14 -07:00
watch/json Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
windows/service Update to gazelle 0.12.0 and run hack/update-bazel.sh 2018-06-22 16:22:18 -07:00
.import-restrictions
BUILD make update 2018-08-30 18:24:23 -04:00
OWNERS