Commit Graph

31497 Commits (4ee877c2267f92308b53986f1a3fa3491eac9e08)

Author SHA1 Message Date
k8s-merge-robot 4ee877c226 Merge pull request #28379 from deads2k/allow-late-joins
Automatic merge from submit-queue

allow handler to join after the informer has started

This allows an event handler to join after a SharedInformer has started.  It can't add any indexes, but it can add its reaction functions.

This works by 
 1. stopping the flow of events from the reflector (thus stopping updates to our store)
 1. registering the new handler
 1. sending synthetic "add" events to the new handler only
 1. unblocking the flow of events

It would be possible to 
 1. block
 1. list
 1. add recorder
 1. unblock
 1. play list to as-yet unregistered handler
 1. block
 1. remove recorder
 1. play recording
 1. add new handler
 1. unblock

But that is considerably more complicated.  I'd rather not start there since this ought to be the exception rather than the rule.

@wojtek-t who requested this power in the initial review
@smarterclayton @liggitt I think this resolves our all-in-one ordering problem.
@hongchaodeng since this came up on the call
2016-07-05 06:49:10 -07:00
k8s-merge-robot b60de6c497 Merge pull request #28495 from lixiaobing10051267/mastermover
Automatic merge from submit-queue

"Mover" should be "Moreover"

In file docs/proposals/apiserver-watch.md, line #108, "Mover, this will not require any changes in other parts of the code.", here "Mover" should be "Moreover".
2016-07-05 06:07:51 -07:00
k8s-merge-robot 65c29daf19 Merge pull request #28179 from deads2k/dedup-workqueue-requeue
Automatic merge from submit-queue

dedup workqueue requeuing

Updates `workqueue.AddAfter` to only perform the add for the earliest requested requeue operation.  An earlier time inserts in the earlier slot and removes the old one.  A later time is ignored.

When using this conjunction with an `AddRateLimited` method, you get charged for the additional retry even though you're only queue once.  

This keeps requeues from multiplying for every add.

@liggitt
2016-07-05 06:07:45 -07:00
k8s-merge-robot 61a92ef75a Merge pull request #28441 from smarterclayton/reflect_check
Automatic merge from submit-queue

ObjectReflectDiff has an incorrect array index comparison

Is comparing the wrong field for bounds.

@deads2k
2016-07-05 05:33:28 -07:00
k8s-merge-robot a75cb46e5b Merge pull request #25463 from asalkeld/master
Automatic merge from submit-queue

Add command "kubectl config get-contexts"

```release-note
* A new command "kubectl config get-contexts" has been added.
```

fixes #25383
2016-07-05 05:33:23 -07:00
deads2k 56598898e1 dedup workqueue requeuing 2016-07-05 07:44:52 -04:00
lixiaobing10051267 4608539c39 "Mover" should be "Moreover" 2016-07-05 19:39:48 +08:00
deads2k 099b7f8fb2 allow handler to join after the informer has started 2016-07-05 07:38:08 -04:00
k8s-merge-robot b4ee63f6a1 Merge pull request #28468 from wojtek-t/integration_namespace_2
Automatic merge from submit-queue

Migrate some integration tests to run in dedicated namespace.
2016-07-05 02:56:32 -07:00
Angus Salkeld e0ce987f4e Add command "kubectl config get-contexts"
Note: Context is not a runtime object (doesn't have Kind and Version) so
      we can't use the resource_printer
2016-07-05 11:24:00 +02:00
k8s-merge-robot b37a5ded3c Merge pull request #27539 from gmarek/graceful
Automatic merge from submit-queue

Fix logic of consecutive DELETE calls when gracefull deletion is enabled

Previously it was possible to extend delete timestamp to infinity by issuing repeated DELETE calls. This PR prevents that. Ref. discussion in #27422

cc @wojtek-t @smarterclayton @lavalamp @piosz @dchen1107
2016-07-05 02:16:41 -07:00
gmarek 2a5914d61c Fix logic of consecutive DELETE calls when gracefull deletion is enabled 2016-07-05 10:42:50 +02:00
k8s-merge-robot ef3f2fb157 Merge pull request #26860 from xiang90/cvar
Automatic merge from submit-queue

cacher: replace usable lock with conditional variable

Perviously we use a rwlock to indicate the ready information of the cacher. I feel it is not straightforward. Also it requires a few comments to explain. The pull request tries to replace the lock with a conditional variable for readability reason.

/cc @lavalamp @wojtek-t
2016-07-05 00:58:22 -07:00
k8s-merge-robot 35a345269e Merge pull request #28471 from smarterclayton/reflect_diff
Automatic merge from submit-queue

Handle more cases in diff.ObjectReflectDiff

Interfaces and nested map values were not being recursed.

@karkagis since @wojtek-t is out
2016-07-05 00:26:08 -07:00
Clayton Coleman b765203a91
Handle more cases in diff.ObjectReflectDiff
Interfaces and nested map values were not being recursed.
2016-07-04 15:05:43 -04:00
k8s-merge-robot cd7a56ba46 Merge pull request #28287 from kargakis/bump-timeout-for-deleting-deployments
Automatic merge from submit-queue

e2e: increase timeout when waiting for deployment pods to be deleted

Use the same timeout as the one used for waiting for the deployment
reaper to complete.

Takes a stab at https://github.com/kubernetes/kubernetes/issues/28067

@kubernetes/deployment  PTAL
2016-07-04 11:06:43 -07:00
Xiang Li aa472ff734 cacher: replace usable lock with conditional variable 2016-07-04 08:57:59 -07:00
Wojciech Tyczynski 925ba42507 Avoid annoying logs in integration tests 2016-07-04 16:52:55 +02:00
Wojciech Tyczynski 0523e54ea6 Cleanup integration auth tests 2016-07-04 16:38:22 +02:00
Wojciech Tyczynski bee29b59d2 Cleanup integration RunAMaster 2016-07-04 15:53:56 +02:00
k8s-merge-robot 11211a49e3 Merge pull request #28464 from wojtek-t/cleanup_matchers
Automatic merge from submit-queue

Simplify registries initialization
2016-07-04 06:48:43 -07:00
k8s-merge-robot c068e441e5 Merge pull request #28463 from mwielgus/more-time-gke
Automatic merge from submit-queue

Increase timeouts in multiple node pool e2e tests for cluster autoscaler

cc: @piosz @fgrzadkowski @jszczepkowski
2016-07-04 06:16:26 -07:00
k8s-merge-robot 1b5cf22de6 Merge pull request #27938 from wojtek-t/integration_namespaces
Automatic merge from submit-queue

Unify DeleteAllEtcdKeys in integration tests & start using namespaces in some tests

Getting rid of DeleteAllEtcdKeys() and running all tests in separate namespace is necessary to run integration tests in parallel.

Aside from that, this is first step of reducing amount of annoying logs in integration tests...
2016-07-04 06:16:22 -07:00
Wojciech Tyczynski 3f288e365d Simplify registries initialization 2016-07-04 14:20:29 +02:00
Marcin Wielgus 09033ee6a3 Increase timeouts in multiple node pool e2e tests for cluster autoscaler 2016-07-04 14:10:37 +02:00
k8s-merge-robot de0e6de82b Merge pull request #28430 from smarterclayton/fix_empty_deep_copy
Automatic merge from submit-queue

WIP - Handle map[]struct{} in DeepCopy

Deep copy was not properly handling the empty struct case we use for Sets.

@lavalamp I need your expertise when you have some time - the go2idl parser is turning sets.String into the following tree:

    type:         sets.String           kind: Alias
      underlying: map[string]sets.Empty kind: Map
        key:      string                kind: Builtin
        elem:     set.Empty             kind: Struct
                                              ^
                                              should be Alias

Looking at tc.Named, I'm not sure what the expected outcome would be and why you flatten there.
2016-07-04 04:34:54 -07:00
Wojciech Tyczynski ac270b66b7 Move first few integration tests to use dedicated namespaces 2016-07-04 13:21:26 +02:00
Wojciech Tyczynski 08f17fef27 Unify DeleteAllEtcdKeys in integration tests. 2016-07-04 12:01:09 +02:00
k8s-merge-robot 37edcc8242 Merge pull request #27921 from smarterclayton/conversion_bugs
Automatic merge from submit-queue

Make generated build tag parameterizable for go2idl

Downstream generators that want to reuse the upstream generated types
need to be able to define a different ignore tag (so that they can see
the already generated types).

@wojtek-t allows third parties to reuse conversions in api/v1 (for instance) because otherwise they are hidden when go2idl parses the dependency packages.
2016-07-04 00:45:26 -07:00
k8s-merge-robot bff330a4db Merge pull request #25525 from thockin/no-sudo-in-protobuf
Automatic merge from submit-queue

Run builds as the calling user

This means no 'sudo' is needed to copy files out.

@wojtek-t @smarterclayton
2016-07-03 23:58:14 -07:00
Clayton Coleman ee56123634
ObjectReflectDiff has an incorrect array index comparison
Is comparing the wrong field for bounds.
2016-07-03 20:09:41 -04:00
Tim Hockin 55eaa38036 Allow non-root build to write go code. 2016-07-03 00:39:59 -07:00
Tim Hockin c3f4fb53ed Set hostname on build container 2016-07-03 00:38:32 -07:00
Tim Hockin 4959c2c76f Clean up logging in build container 2016-07-03 00:38:32 -07:00
Tim Hockin ac75bd11cf Run builds as the calling user
This means no 'sudo' is needed to copy files out.
2016-07-03 00:36:20 -07:00
k8s-merge-robot feea382960 Merge pull request #28421 from thockin/cleanup-godeps-transition
Automatic merge from submit-queue

Cleanup a TODO from godeps -> vendor change

This logs a false "error" message, so it's time to go.  It was needed to ensure
nobody has stale build images laying around, but that was quite a while ago, so
it's probably safe now.
2016-07-02 22:02:51 -07:00
Clayton Coleman 6eb04ae592 Handle map[]struct{} special 2016-07-03 00:44:25 -04:00
k8s-merge-robot 2f9feef9a6 Merge pull request #27048 from kargakis/ignore-only-409-in-scaler
Automatic merge from submit-queue

kubectl: ignore only update conflicts in the scaler

@kubernetes/kubectl is there any reason to retry any other errors?
2016-07-02 21:28:37 -07:00
Clayton Coleman 534075f828
Deep copy should always use existing functions that are not ignored
While testing this fix in OpenShift it was discovered that the
PackageConstraint was overly aggressive - types that declare a public
copy function should always return true.  PackageConstraint is intended
to limit packages where we might generate deep copy function, rather
than to prevent external packages from being consumed.
2016-07-03 00:12:13 -04:00
Clayton Coleman 903a2db90a
Make generated build tag parameterizable for go2idl
Downstream generators that want to reuse the upstream generated types
need to be able to define a different ignore tag (so that they can see
the already generated types).
2016-07-03 00:12:10 -04:00
k8s-merge-robot 4e046a8dc5 Merge pull request #24802 from thockin/validation_pt8-10
Automatic merge from submit-queue

Make validators return error strings

Part of the larger validation PR, broken out for easier review and merge.  Builds on previous PRs in the series.  This is a group of smaller commits, so I don't waster precious PR numbers.
2016-07-02 20:00:23 -07:00
Tim Hockin 37786e0e77 Make IsHTTPHeaderName return error strings 2016-07-02 17:34:32 -07:00
Tim Hockin 3ad6c397d7 Make IsValid{User,Group}Id return error strings 2016-07-02 17:34:32 -07:00
Tim Hockin bb208a02b3 Make IsValidPercent return error strings 2016-07-02 17:34:32 -07:00
Tim Hockin 87c1fc50a8 Make IsValidIP return error strings
Also treat 0.0.0.0 as special, like loopback and multicast.
2016-07-02 17:32:05 -07:00
Tim Hockin 14bece550f Make IsValidPortNum/Name return error strings 2016-07-02 17:32:05 -07:00
Tim Hockin 189d4a5159 Make CIdentifier return error strings 2016-07-02 17:32:05 -07:00
Tim Hockin 8fe8ec980e Cleanup a TODO from godeps -> vendor change
This logs a false "error" message, so it's time to go.  It was needed to ensure
nobody has stale build images laying around, but that was quite a while ago, so
it's probably safe now.
2016-07-02 15:15:39 -07:00
k8s-merge-robot d07328dc4a Merge pull request #28259 from timstclair/node-e2e-build
Automatic merge from submit-queue

Only build essential targets for node e2e

Roll-forward of https://github.com/kubernetes/kubernetes/pull/26830 (added ginkgo to targets)
2016-07-02 11:27:08 -07:00
k8s-merge-robot 7de5e87135 Merge pull request #28068 from kargakis/refactor-deployment-controller
Automatic merge from submit-queue

Break deployment controller into separate self-contained files

Fixes https://github.com/kubernetes/kubernetes/issues/25867

* rolling.go (has all the logic for rolling deployments)
* recreate.go (has all the logic for recreate deployments)
* sync.go (has all the logic for getting and scaling replica sets)
* rollback.go (has all the logic for rolling back a deployment)
* util.go (contains all the utilities used throughout the controller)

Leave back at deployment_controller.go all the necessary bits for
creating, setting up, and running the controller loop.

Also add package documentation.

@kubernetes/deployment @mfojtik this is an honest refactoring of the controller. In the long term, I believe it will help a lot with maintainance.
2016-07-02 02:16:49 -07:00