Commit Graph

29067 Commits (e5fbf86157bbad14668509eca01c7fe91fc5c952)

Author SHA1 Message Date
Clayton Coleman e5fbf86157
Allow StatusErrors to be modified after creation 2016-05-19 09:08:53 -04:00
Wojciech Tyczynski f204a9f399 Merge pull request #25783 from zhouhaibing089/indexer-fix
Fix the Store to be Indexer in test/component/scheduler/perf
2016-05-19 14:55:24 +02:00
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
k8s-merge-robot 4f09f51486 Merge pull request #24800 from thockin/validation_pt8-3
Automatic merge from submit-queue

Make name validators return string slices

Part of the larger validation PR, broken out for easier review and merge.  Builds on previous PRs in the series.
2016-05-19 02:15:27 -07:00
Daniel Smith f538d6019d Merge pull request #25857 from kubernetes/revert-25425-real-gci
Revert "Add support for running GCI on the GCE cloud provider"
2016-05-18 21:31:56 -07:00
Daniel Smith 40f53b1765 Revert "Add support for running GCI on the GCE cloud provider" 2016-05-18 21:31:28 -07:00
Daniel Smith 28333a0041 Merge pull request #25672 from ihmccreery/fix-link
Fix link to Jenkins
2016-05-18 17:56:08 -07:00
Daniel Smith c443329d67 Merge pull request #25607 from dagnello/vsphere-cpi-init-logging
Adding error check when read instance id failed
2016-05-18 17:31:44 -07:00
Daniel Smith 92f34ca83e Merge pull request #25365 from brendandburns/deps
update the go-restful dependency.
2016-05-18 17:30:14 -07:00
Daniel Smith 98c91b9787 Merge pull request #25733 from wojtek-t/metric_by_content_type
Split request_count metric by contentType
2016-05-18 17:29:57 -07:00
Daniel Smith aabc0a3df7 Merge pull request #25425 from andyzheng0831/real-gci
Add support for running GCI on the GCE cloud provider
2016-05-18 17:28:32 -07:00
Daniel Smith 0bda969cd5 Merge pull request #25261 from jayunit100/readySched
Support GetReadySchedulable pods for all node selecting tests.
2016-05-18 17:24:09 -07:00
Daniel Smith c4889dd826 Merge pull request #25781 from pwittrock/issue-25657
Clean up kubectl test to use the blessed e2e test redis configs and t…
2016-05-18 17:22:54 -07:00
David Oppenheimer 35c9ca853a Merge pull request #24134 from Huawei-PaaS/taints-tolerations
Implement taints and tolerations
2016-05-18 18:18:18 -05:00
Andy Zheng a737e1eba1 Add support for running GCI on the GCE cloud provider 2016-05-18 15:15:05 -07:00
Daniel Smith 01cf9869fc Merge pull request #25504 from andyzheng0831/binary
GCI: Ensure that the right version of kubelet is used
2016-05-18 15:04:32 -07:00
Daniel Smith 6dc1437015 Merge pull request #25671 from deads2k/fix-add-indexer
make addIndexers safe for sharedInformer
2016-05-18 14:48:43 -07:00
Daniel Smith ae27975300 Merge pull request #25743 from wojtek-t/test_upgrade_protobufs
Test storage upgrade to protobufs
2016-05-18 14:44:16 -07:00
k8s-merge-robot ff37fb6df8 Merge pull request #25785 from kubernetes/revert-25711-patch-1
Automatic merge from submit-queue

Revert "Update cassandra.list"

Reverts kubernetes/kubernetes#25711

https://github.com/kubernetes/kubernetes/pull/25711#issuecomment-219911835
2016-05-18 14:31:28 -07:00
k8s-merge-robot 0e03e83592 Merge pull request #24154 from caseydavenport/network-policy-proposal
Automatic merge from submit-queue

Network policy proposal

This proposal attempts to add a v1beta API for network policy to Kubernetes, as discussed and designed within the networking SIG.

<!-- 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/24154)
<!-- Reviewable:end -->
2016-05-18 13:30:29 -07:00
Casey Davenport 872d2b71c6 NetworkPolicy proposal 2016-05-18 10:14:33 -07:00
k8s-merge-robot 3a5d53d467 Merge pull request #23430 from huangyuqi/uber-cluster-manager
Automatic merge from submit-queue

Implement the cluster-controller of kubernetes federation

This PR is the cluster-controller of kubernetes federation.
This controller of federation phase 1 just collect the status of federated clusters.
2016-05-18 10:07:27 -07:00
Kevin 52fb89ff73 implement taints and tolerations 2016-05-18 15:06:23 +00:00
k8s-merge-robot 952e8302fb Merge pull request #25232 from XiaoningDing/federation-apiserver-service
Automatic merge from submit-queue

add service object without proxy

add service object without proxy

#23653

@nikhiljindal please review it, thanks.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-18 05:40:27 -07:00
k8s-merge-robot e4e6e46197 Merge pull request #24799 from thockin/validation_pt8-2
Automatic merge from submit-queue

Make IsValidLabelValue return error strings

Part of the larger validation PR, broken out for easier review and merge.  Builds on previous PRs in the series.
2016-05-18 04:08:15 -07:00
k8s-merge-robot 48c90f15c5 Merge pull request #24509 from caesarxuchao/primitive-gc
Automatic merge from submit-queue

Adding garbage collector controller

Adding the propagator and garbage processor of the gc.

Design doc is at https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/garbage-collection.md

<!-- 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/24509)
<!-- Reviewable:end -->
2016-05-18 03:14:25 -07:00
k8s-merge-robot 5ffebfa303 Merge pull request #24016 from XiaoningDing/federation-kubectl
Automatic merge from submit-queue

Federation kubectl for clusters

add federation/clusters resource to kubectl
#23653, requires #23847

<!-- 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/24016)
<!-- Reviewable:end -->
2016-05-18 02:23:07 -07:00
Jan Safranek 01b20d8e77 Generate shorter provisioned PV names.
GCE PD names are generated out of provisioned PV.Name, therefore it should be
as short as possible and still unique.
2016-05-18 10:06:51 +02:00
Jan Safranek 79b91b9ee0 Refactor persistent volume initialization
There should be only one initialization function, shared by the real
controller and unit tests.
2016-05-18 10:06:51 +02:00
Jan Safranek 7f549511e2 Big move and rename
- remove persistentvolume_ prefix from all files
- split controller.go into controller.go and controller_base.go (to have them
  under 1500 lines for github)
2016-05-18 10:06:51 +02:00
Jan Safranek c5fe1f943c Fixed binder logging
- we need the original volume/claim in error paths
- don't report version conflicts as errors (they happen pretty often and we
  recover from them)
2016-05-18 10:06:51 +02:00
Jan Safranek 440b4bc6ba Fix integration tests. 2016-05-18 10:06:51 +02:00
Jan Safranek 41adcc5496 Speed up binding of provisioned volumes
This fixes e2e test for provisioning - it expects that provisioned volumes
are bound quickly.

Majority of this patch is update of test framework needs to initialize the
controller appropriately.
2016-05-18 10:06:51 +02:00
Jan Safranek c6f05c8056 provisioning: Add unit testso for provisioning errors. 2016-05-18 10:06:51 +02:00
Jan Safranek c24b33793c unit test: Add possibility to inject kubeclient errors. 2016-05-18 10:06:51 +02:00
Jan Safranek 92dc159ab6 Delete provisioned volumes that are not needed.
We should delete volumes that are provisioned for a claim and the claim
gets bound to different volume during the provisioning.
2016-05-18 10:06:51 +02:00
Jan Safranek 9fb0f7a3fd provisioning: Unit tests 2016-05-18 10:06:51 +02:00
Jan Safranek 514d595881 provisioning: Implement provisioner 2016-05-18 10:06:51 +02:00
Jan Safranek 75b0e2ad63 provisioning: Refactor volume plugins.
NewPersistentVolumeTemplate() and Provision() are merged into one call.
2016-05-18 10:06:51 +02:00
Jan Safranek dd7890c362 delete: Implement Deleter 2016-05-18 10:06:51 +02:00
Jan Safranek 22e68d4622 recycler: unit tests
- Add reclaim policy to newVolume() call.
- Implement reactor Volumes().Get().
- Implement mock volume plugin.
- Add recycler tests.
- Add a synchronization condition to controller.scheduleOperation
  - we need to pause the controller here, let the test to do some bad things
    to the controller and test error cases in recycleVolumeOperation.

Test framework gets more and more complicated... But this is the last piece,
I promise.
2016-05-18 10:06:24 +02:00
Jan Safranek a08d826ca5 Make a separate functions to emit events and change status.
These two seem to be always used together.
2016-05-18 10:06:24 +02:00
Jan Safranek 1feb346830 recycler: implement recycler
Also update the old unit test to pass. New unit tests will be added in
subsequent commit.
2016-05-18 10:06:24 +02:00
Jan Safranek 56cae2dc20 unit test framework: Wait for all running operations to finish during all tests. 2016-05-18 10:06:24 +02:00
Jan Safranek cf68370371 recycler: Maintain a list of long-running operations.
We need to keep list of running recyclers, deleters and provisioners in
memory in order not to start a new recycling/deleting/provisioning twice
for the same volume/claim.

This will be eventually replaced by GoRoutineMap from PR #24838.
2016-05-18 10:06:24 +02:00
Jan Safranek 4e47f69cba recycler: Implement volume host interfaces.
We need the controller to implement volume.VolumeHost interface to be able
to call recycle plugins.
2016-05-18 10:06:24 +02:00
Jan Safranek a17f0d5949 Move release logic to standalone function. 2016-05-18 10:06:23 +02:00
Jan Safranek 7b73384fda Add controller method tests. 2016-05-18 10:05:14 +02:00
k8s-merge-robot bf4f84167f Merge pull request #23567 from smarterclayton/init_containers
Automatic merge from submit-queue

Add init containers to pods

This implements #1589 as per proposal #23666

Incorporates feedback on #1589, creates parallel structure for InitContainers and Containers, adds validation for InitContainers that requires name uniqueness, and comments on a number of implications of init containers.

This is a complete alpha implementation.

<!-- 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/23567)
<!-- Reviewable:end -->
2016-05-18 00:53:30 -07:00
Tim Hockin 152c86ab06 Make name validators return string slices 2016-05-18 00:48:01 -07:00