k3s/pkg/controller
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
..
daemon Merge pull request #24908 from pmorie/daemon-controller-loc 2016-05-12 15:51:55 -07:00
deployment move server client shared annotations to new api/annotations package 2016-05-09 11:10:44 -07:00
endpoint Endpoints controller respects unready service annotation 2016-05-10 14:20:10 -07:00
framework Merge pull request #25671 from deads2k/fix-add-indexer 2016-05-18 14:48:43 -07:00
garbagecollector the garbage collector controller 2016-05-15 16:04:19 -07:00
gc implement AddIndexers for SharedIndexInformer 2016-05-06 21:23:18 +08:00
job implement AddIndexers for SharedIndexInformer 2016-05-06 21:23:18 +08:00
namespace the garbage collector controller 2016-05-15 16:04:19 -07:00
node implement AddIndexers for SharedIndexInformer 2016-05-06 21:23:18 +08:00
persistentvolume Generate shorter provisioned PV names. 2016-05-18 10:06:51 +02:00
petset Merge pull request #25284 from bprashanth/service_unready 2016-05-12 12:05:27 -07:00
podautoscaler horizontal pod autoscaler tolerance breaching verifier 2016-05-12 22:27:42 -04:00
replicaset add namespace index to rc and pod 2016-05-06 17:12:36 +08:00
replication Explicitly enqueue controllers on failures and increase resync period 2016-05-16 08:52:01 +02:00
resourcequota Fix resource quota controller shutting down its worker threads 2016-05-10 19:50:36 -04:00
route Generated clients can return their RESTClients, RESTClient can return its RateLimiter 2016-04-27 22:15:10 +02:00
service Merge pull request #24220 from gmarek/metrics 2016-04-27 19:25:38 -07:00
serviceaccount Generated clients can return their RESTClients, RESTClient can return its RateLimiter 2016-04-27 22:15:10 +02:00
volume Corrects some misspellings in comments 2016-05-11 08:16:13 +01:00
OWNERS Remove myself from a bunch of OWNERS files, as I am too overloaded 2016-05-11 13:34:51 -07:00
controller_utils.go Make name validators return string slices 2016-05-18 00:48:01 -07:00
controller_utils_test.go Fix the rest of the code 2016-04-29 17:12:10 -04:00
doc.go Refactor package controller 2015-07-29 09:54:35 -07:00
lookup_cache.go Update lookup_cache.go 2016-05-16 15:26:30 +08:00