kubernetes/cmd
k8s-merge-robot c63ac4e664 Merge pull request #24331 from jsafrane/devel/refactor-binder
Automatic merge from submit-queue

Refactor persistent volume controller

Here is complete persistent controller as designed in https://github.com/pmorie/pv-haxxz/blob/master/controller.go

It's feature complete and compatible with current binder/recycler/provisioner. No new features, it *should* be much more stable and predictable.

Testing
--
The unit test framework is quite complicated, still it was necessary to reach reasonable coverage (78% in `persistentvolume_controller.go`). The untested part are error cases, which are quite hard to test in reasonable way - sure, I can inject a VersionConflictError on any object update and check the error bubbles up to appropriate places, but the real test would be to run `syncClaim`/`syncVolume` again and check it recovers appropriately from the error in the next periodic sync. That's the hard part.

Organization
---
The PR starts with `rm -rf kubernetes/pkg/controller/persistentvolume`. I find it easier to read when I see only the new controller without old pieces scattered around.
[`types.go` from the old controller is reused to speed up matching a bit, the code looks solid and has 95% unit test coverage].

I tried to split the PR into smaller patches, let me know what you think.

~~TODO~~
--

* ~~Missing: provisioning, recycling~~.
* ~~Fix integration tests~~
* ~~Fix e2e tests~~

@kubernetes/sig-storage

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24331)
<!-- Reviewable:end -->

Fixes #15632
2016-05-19 03:06:46 -07:00
..
genbashcomp insert space after comment character in cmd folder 2016-01-08 16:25:57 +05:30
gendocs Make kubectl bash completion namespace aware and add noun aliases 2016-04-03 16:25:56 +02:00
genkubedocs Make kubectl bash completion namespace aware and add noun aliases 2016-04-03 16:25:56 +02:00
genman insert space after comment character in cmd folder 2016-01-08 16:25:57 +05:30
genswaggertypedocs fix imported package names to not use under_scores 2015-10-16 16:37:03 +08:00
genutils Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
genyaml Create cmd to generate kubectl yaml docs 2016-04-11 17:07:45 -07:00
hyperkube cmd/hyperkube: add make-symlinks flag 2016-05-05 21:36:18 +00:00
integration rkt: Add tests for GarbageCollect(). 2016-05-13 15:13:52 -07:00
kube-apiserver Moving federation apiserver to use genericapiserver.ServerRunOptions 2016-05-11 23:42:55 -07:00
kube-controller-manager Merge pull request #24331 from jsafrane/devel/refactor-binder 2016-05-19 03:06:46 -07:00
kube-proxy Fix the rest of the code 2016-04-29 17:12:10 -04:00
kubectl Add kubectl to the hyperkube binary 2015-11-12 22:18:16 -08:00
kubelet Add kubelet flag for eviction max pod grace period 2016-05-13 11:19:05 -04:00
kubemark Allow setting content-type in binaries 2016-04-21 14:12:13 +02:00
kubernetes-discovery Adding a discovery summarizer server 2016-05-13 13:52:23 -07:00
libs/go2idl Merge pull request #25033 from smarterclayton/use_upstream_conversion 2016-05-15 04:54:54 -07:00
linkcheck linkchecker tool now visits the URL to determine if it's valid 2016-01-26 17:01:37 -08:00
mungedocs mungedocs should not assume upstream remote 2016-04-27 21:33:09 -04:00
OWNERS Remove myself from a bunch of OWNERS files, as I am too overloaded 2016-05-11 13:34:51 -07:00