k3s/cmd
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
..
clicheck
cloud-controller-manager autogenerated 2018-09-02 14:11:11 +03:00
controller-manager [kube-controller-manager] auto-generated file 2018-09-04 19:40:10 +08:00
gendocs
genkubedocs Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
genman Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
genswaggertypedocs Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
genutils
genyaml
hyperkube Add Labels to various OWNERS files 2018-08-21 13:59:08 -04:00
importverifier
kube-apiserver Merge pull request #67798 from mbohlool/crd_refactoring 2018-08-31 06:16:28 -07:00
kube-controller-manager Make number of workers configurable 2018-09-04 14:21:14 -07:00
kube-proxy Merge pull request #64973 from nokia/k8s-sctp 2018-08-28 07:21:18 -07:00
kube-scheduler Add scheduler option for bind timeout 2018-09-04 17:25:23 -07:00
kubeadm Merge pull request #67944 from fabriziopandini/kubeadm-config-configMap 2018-09-04 10:24:43 -07:00
kubectl add labels to kubectl OWNERS files 2018-08-22 00:40:54 +03:00
kubelet autogenerated go code, godeps, bazel and gofmt 2018-09-02 14:38:59 +03:00
kubemark update bazel 2018-08-16 09:59:33 +08:00
linkcheck
BUILD
OWNERS