Commit Graph

372 Commits (33f873dbbee58caffcff9e7b44f174a32ec1df92)

Author SHA1 Message Date
gmarek 48d784272e Move taint eviction feature flag to feature-gates 2017-03-08 10:04:18 +01:00
Kubernetes Submit Queue c9d4e60131 Merge pull request #42634 from gmarek/nc_test_sleep
Automatic merge from submit-queue

Extend the sleep time in the NC unit test

Ref. https://github.com/kubernetes/kubernetes/issues/39975#issuecomment-284600278
2017-03-07 09:11:35 -08:00
gmarek 65f556788e Extend the sleep time in the NC unit test 2017-03-07 10:48:37 +01:00
gmarek 0db355a8ca Improve NodeControllers logs 2017-03-07 10:29:57 +01:00
Vishnu kannan 9a65640789 fix go vet issues
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-27 21:24:45 -08:00
gmarek 6637592b1d generated 2017-02-24 09:24:33 +01:00
gmarek d88af7806c NodeController sets NodeTaints instead of deleting Pods 2017-02-24 09:24:33 +01:00
Avesh Agarwal b4d3d24eaf Update tests. 2017-02-22 09:27:42 -05:00
Avesh Agarwal 9b640838a5 Change taint/toleration annotations to api fields. 2017-02-22 09:27:42 -05:00
gmarek 5fbb966e3e generated 2017-02-15 12:20:24 +01:00
gmarek 3c555f2ca4 apply comments 2017-02-15 12:20:24 +01:00
gmarek de6c9bd535 Apply davidopps comments to TaintController PR 2017-02-15 09:37:26 +01:00
deads2k fd34b11e13 react to informer updates 2017-02-13 09:18:32 -05:00
deads2k a86fabb9d2 regenerate informers 2017-02-13 07:59:34 -05:00
Kubernetes Submit Queue a7a74b56da Merge pull request #40355 from gmarek/nc-taint-handling
Automatic merge from submit-queue (batch tested with PRs 39418, 41175, 40355, 41114, 32325)

TaintController

```release-note
This PR adds a manager to NodeController that is responsible for removing Pods from Nodes tainted with NoExecute Taints. This feature is beta (as the rest of taints) and enabled by default. It's gated by controller-manager enable-taint-manager flag.
```
2017-02-10 04:50:42 -08:00
Kubernetes Submit Queue 85b4d2e5cf Merge pull request #36592 from andrewsykim/36273-set-all-node-conditions-unknown-when-node-unreachable
Automatic merge from submit-queue (batch tested with PRs 40917, 41181, 41123, 36592, 41183)

Set all node conditions to Unknown when node is unreachable

**What this PR does / why we need it**:
Sets all node conditions to Unknown when node does not report status/unreachable

**Which issue this PR fixes** 
fixes https://github.com/kubernetes/kubernetes/issues/36273
2017-02-09 23:10:47 -08:00
gmarek 004552f8a4 generated 2017-02-10 02:13:45 +01:00
gmarek 2f0e436677 Taint controller - first commit 2017-02-10 02:13:45 +01:00
gmarek c5258149c1 Fix bug in NC 2017-02-07 15:30:00 +01:00
Kubernetes Submit Queue 9abfa6b446 Merge pull request #40385 from ncdc/shared-informers-02-swap-existing
Automatic merge from submit-queue

Replace hand-written informers with generated ones

Replace existing uses of hand-written informers with generated ones.
Follow-up commits will switch the use of one-off informers to shared
informers.

This is a precursor to #40097. That PR will switch one-off informers to shared informers for the majority of the code base (but not quite all of it...).

NOTE: this does create a second set of shared informers in the kube-controller-manager. This will be resolved back down to a single factory once #40097 is reviewed and merged.

There are a couple of places where I expanded the # of caches we wait for in the calls to `WaitForCacheSync` - please pay attention to those. I also added in a commented-out wait in the attach/detach controller. If @kubernetes/sig-storage-pr-reviews is ok with enabling the waiting, I'll do it (I'll just need to tweak an integration test slightly).

@deads2k @sttts @smarterclayton @liggitt @soltysh @timothysc @lavalamp @wojtek-t @gmarek @sjenning @derekwaynecarr @kubernetes/sig-scalability-pr-reviews
2017-02-06 16:25:42 -08:00
Andy Goldstein 70c6087600 Replace hand-written informers with generated ones
Replace existing uses of hand-written informers with generated ones.
 Follow-up commits will switch the use of one-off informers to shared
 informers.
2017-02-06 13:49:27 -05:00
Kubernetes Submit Queue 010559ece6 Merge pull request #39321 from NickrenREN/controller-utils
Automatic merge from submit-queue (batch tested with PRs 39681, 39321, 41018, 40883)

remove never used var
2017-02-06 10:46:56 -08:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski 79adb99a13 pkg/api: move Semantic equality to k8s.io/apimachinery/pkg/api/equality 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Kubernetes Submit Queue aace5a7b87 Merge pull request #40449 from deads2k/client-15-types
Automatic merge from submit-queue (batch tested with PRs 40239, 40397, 40449, 40448, 40360)

move the discovery and dynamic clients

Moved the dynamic client, discovery client, testing/core, and testing/cache to `client-go`.  Dependencies on api groups we don't have generated clients for have dropped out, so federation, kubeadm, and imagepolicy.

@caesarxuchao @sttts 

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-26 14:23:42 -08:00
deads2k 9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
gmarek 045fb5a7c6 Modify OWNERS in some pkg/controller subdirectories 2017-01-26 16:28:08 +01:00
deads2k b0b156b381 make tools/cache authoritative 2017-01-25 08:29:45 -05:00
Clayton Coleman be6d2933df
refactor: Move *Options references to metav1 2017-01-24 13:41:51 -05:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
deads2k 1ce0637b27 move listers out of cache to reduce import tree 2017-01-20 15:01:38 -05:00
andrewsykim 27d8a4feef set all node conditions to Unknown when node is unreachable 2017-01-19 11:19:06 -05:00
deads2k 11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k f31ecdd0f7 generated changes 2017-01-17 08:32:05 -05:00
deads2k 26c46971f2 move PatchType to apimachinery 2017-01-17 08:32:05 -05:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
NickrenREN 0b94834b17 fix nodeStatusUpdateRetry count exceeding condition judgement
When tryUpdateNodeStatus() return err,err!=nil,  but nc.kubeClient.Core().Nodes().Get() return no err, err==nil,
And we run nodeStatusUpdateRetry times, when for loop ends, err == nil, we can not print error info and run continue, so the condition judgement is wrong.
2017-01-12 22:00:30 +08:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
NickrenREN 639572ac68 fix redundant alias and remove unused function 2017-01-09 17:13:09 +08:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
zdj6373 95e8d9d20c Log content is wrong, modify 2017-01-03 12:44:06 +08:00
NickrenREN 6e0dbad555 remove never used var
LargeClusterThreshold is never used now,remove it
2017-01-03 11:22:23 +08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Kubernetes Submit Queue 744876d13f Merge pull request #38798 from NickrenREN/nodecontroller-status
Automatic merge from submit-queue

delete continue in monitorNodeStatus
2016-12-21 10:35:25 -08:00
Wojciech Tyczynski 1b2d9eb2e7 NodeController listing nodes from cache instead of cache in apiserver 2016-12-20 13:13:14 +01:00
NickrenREN fab228a4ef delete continue in monitorNodeStatus
the continue will run at the end of the for loop, we do not need it
2016-12-15 13:41:24 +08:00
Kubernetes Submit Queue d8efc779ed Merge pull request #38154 from caesarxuchao/rename-release_1_5
Automatic merge from submit-queue (batch tested with PRs 38154, 38502)

Rename "release_1_5" clientset to just "clientset"

We used to keep multiple releases in the main repo. Now that [client-go](https://github.com/kubernetes/client-go) does the versioning, there is no need to keep releases in the main repo. This PR renames the "release_1_5" clientset to just "clientset", clientset development will be done in this directory.

@kubernetes/sig-api-machinery @deads2k 

```release-note
The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go
```
2016-12-14 14:21:51 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Kubernetes Submit Queue af23f40f82 Merge pull request #37272 from brendandburns/cleanup
Automatic merge from submit-queue

Remove 'minion' from the code in two places in favor of 'node'

Part of https://github.com/kubernetes/kubernetes/issues/1111
2016-12-14 00:09:43 -08:00
Dan Winship f369372dad Drop version-parsing from pkg/version
pkg/version is now just version constants, etc, not version parsing
2016-12-13 08:53:19 -05:00
Kubernetes Submit Queue 8abbedae54 Merge pull request #38315 from mikedanese/pin-gazel
Automatic merge from submit-queue

Pin gazel to a version and support cgo

This fixes the bazel build.

@krousey who is buildcop
2016-12-12 19:32:29 -08:00
Kubernetes Submit Queue f45e918b8b Merge pull request #35833 from apelisse/owners-pkg-controller
Automatic merge from submit-queue

Curating Owners: pkg/controller

cc @jsafrane @mikedanese @bprashanth @derekwaynecarr @thockin @saad-ali

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone **lgtms** and then someone
experienced in the project **approves**), we are adding new reviewers to
existing owners files.
## If You Care About the Process:

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
perfectly: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.
## TLDR:

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:
1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.
2. The pull-request is made editable, please edit the OWNERS file to add
   the names of people that should be reviewing code in the future in the **reviewers** section. You probably do NOT need to modify the **approvers** section.
3. Notify me if you want some OWNERS file to be removed.  Being an approver or reviewer
   of a parent directory makes you a reviewer/approver of the subdirectories too, so not all
   OWNERS files may be necessary.
4. Please use ALIAS if you want to use the same list of people over and
   over again (don't hesitate to ask me for help, or use the pull-request
   above as an example)
2016-12-12 18:51:33 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
gmarek 94f091ad03 Make NodeController test utils usable from outside 2016-12-05 10:56:06 +01:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu b50367cbdc remove v1.Semantics 2016-11-23 15:53:09 -08:00
Chao Xu 7eeb71f698 cmd/kube-controller-manager 2016-11-23 15:53:09 -08:00
Brendan Burns e68fe4d62e Remove 'minion' from the code in two places in favor of 'node' 2016-11-21 22:48:06 -08:00
gmarek 78bc6c2ecd Add logs near force deletions of Pods 2016-11-16 15:00:01 +01:00
Anirudh 6d7213dd39 Update bazel 2016-11-03 13:47:09 -07:00
Anirudh 8fd7de5f13 Added unit test for adding reason with termination. 2016-11-03 13:47:09 -07:00
Anirudh a5bdc5f509 Set reason and message on Pod during nodecontroller eviction
Pods which are evicted by the nodecontroller due to network
malfunction, or unresponsive kubelet should be differentiated
from termination initiated by other sources. The reason/message
are consumed by kubectl to provide a better summary using get/describe.
2016-11-03 13:47:03 -07:00
Antoine Pelisse e73a10fe46 Update OWNERS based on PR comments 2016-11-02 16:28:23 -07:00
Marek Grabowski e044b9fb01 Update OWNERS 2016-11-02 16:19:53 -07:00
Jan Chaloupka 69c2c34829 Update OWNERS 2016-11-02 16:19:30 -07:00
Antoine Pelisse db35acde19 Update OWNERS: Remove reviewers: pkg/controller 2016-11-02 16:19:19 -07:00
Antoine Pelisse c695a54c1c Update OWNERS approvers and reviewers: pkg/controller 2016-11-02 16:19:18 -07:00
Kubernetes Submit Queue 49e7d640d9 Merge pull request #35235 from foxish/node-controller-no-force-deletion
Automatic merge from submit-queue

Node controller to not force delete pods

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

- [x] e2e tests to test Petset, RC, Job.
- [x] Remove and cover other locations where we force-delete pods within the NodeController.

**Release note**:

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->

``` release-note
Node controller no longer force-deletes pods from the api-server.

* For StatefulSet (previously PetSet), this change means creation of replacement pods is blocked until old pods are definitely not running (indicated either by the kubelet returning from partitioned state, or deletion of the Node object, or deletion of the instance in the cloud provider, or force deletion of the pod from the api-server). This has the desirable outcome of "fencing" to prevent "split brain" scenarios.
* For all other existing controllers except StatefulSet , this has no effect on the ability of the controller to replace pods because the controllers do not reuse pod names (they use generate-name).
* User-written controllers that reuse names of pod objects should evaluate this change.
```
2016-11-01 20:08:57 -07:00
Anirudh 71941016c1 Fix old e2e tests, refactor and add new e2e tests. 2016-11-01 11:46:13 -07:00
Anirudh 5ccd7a325e Removing force deletion of pods from the node-controller 2016-11-01 11:44:34 -07:00
gmarek 8d766462e7 Initialize CIDR allocator before registering handle functions 2016-10-31 16:21:37 +01:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Anirudh 05365d7cb2 Moving deletion behavior from the NC into PodGC
This should be a NOP because we're just moving functionality
around and thanks to #35476, the podGC controller should always
run anyway.
2016-10-27 11:56:15 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Jan Chaloupka 6079053407 Update clientset generator to use RESTClient interface instead of the RESTClient data type 2016-10-21 10:13:51 +02:00
Kubernetes Submit Queue 4dbd657e67 Merge pull request #34342 from justinsb/fix_typo_initializing
Automatic merge from submit-queue

Fix typo: initilizing -> initializing
2016-10-15 09:31:53 -07:00
Andy Goldstein e7befa2a14 Only wait for cache syncs once in NodeController 2016-10-14 15:50:05 -04:00
gmarek e2b78ddadc NodeController waits for informer sync before doing anything 2016-10-14 15:52:57 +02:00
David Oppenheimer cd5779a2b1 Make NodeController recognize deletion tombstones. 2016-10-13 23:36:22 -07:00
Kubernetes Submit Queue 06c1f2ba2c Merge pull request #34707 from gmarek/master
Automatic merge from submit-queue

Bump log level in case of Node eviction
2016-10-13 05:37:10 -07:00
gmarek 41278b4c6b Bump log level in case of Node eviction 2016-10-13 13:26:16 +02:00
gmarek 8b7e9d303c Handle DeletedFinalStateUnknown in NodeController 2016-10-13 11:31:04 +02:00
Justin Santa Barbara dc2a9d6f5c Fix typo: initilizing -> initializing 2016-10-07 13:29:22 -04:00
deads2k 0961784a9b switch node controller to shared informers 2016-09-29 09:16:41 -04:00
gmarek cb0a13c1e5 Move orphaned Pod deletion logic to PodGC 2016-09-28 13:58:31 +02:00
Justin Santa Barbara 54195d590f Use strongly-typed types.NodeName for a node name
We had another bug where we confused the hostname with the NodeName.

To avoid this happening again, and to make the code more
self-documenting, we use types.NodeName (a typedef alias for string)
whenever we are referring to the Node.Name.

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName

Also clean up some of the (many) places where the NodeName is referred
to as a hostname (not true on AWS), or an instanceID (not true on GCE),
etc.
2016-09-27 10:47:31 -04:00
Kubernetes Submit Queue 6e25117891 Merge pull request #32655 from dshulyak/fix_node_fake_update
Automatic merge from submit-queue

Fix FakeNodeHandler Update behaviour

Two problems:
1. Get is always using Existing nodes slice, and you will for sure miss any updated data
2. Each Update adds a duplicate node entry to UpdatedNodes slice

For the 1st, we will try to find a node in UpdatedNodes slice (same as for the List).
2nd - append only if there is no node with same name as updated, if there is we will replace object in UpdatedNodes slice.
2016-09-22 07:43:18 -07:00
Mike Danese a765d59932 move informer and controller to pkg/client/cache
Signed-off-by: Mike Danese <mikedanese@google.com>
2016-09-15 12:50:08 -07:00
Dmitry Shulyak 0ddaa20bf1 Fix FakeNodeHandler Update behaviour
Two problems:
1. Get is always using Existing nodes slice, and you will for sure miss any
   updated data
2. Each Update duplicates node entry in UpdatedNodes slice

For the 1st, try to find a node in UpdatedNodes slice (same as for the List).
2nd - append only if there is no node with same name as updated, if there is
just replace object.

Change-Id: I9ef1cca2788ba946eee37fa1b037c124ad76074c
2016-09-14 12:34:37 +03:00
gmarek c40a36cab0 Change the eviction metric type and fix rate-limited-timed-queue 2016-09-08 12:20:51 +02:00
Kubernetes Submit Queue 9dfe8df7cd Merge pull request #32107 from xingzhou/km_bug
Automatic merge from submit-queue

Used goroutine to launch node controller's internalPodInformer.

Fixes #32103
2016-09-06 11:50:28 -07:00
Kubernetes Submit Queue afef4b6938 Merge pull request #32070 from gmarek/nodecontroller
Automatic merge from submit-queue

Sleep between NodeStatus update retries

Just a thing I found when looking into other problems.

This is pretty much no-risk change fixing wrong behavior. Do you think it should go in 1.4? @pwittrock
2016-09-06 03:51:20 -07:00
Xing Zhou 46c302b4c2 Used goroutine to launch node controller's internalPodInformer.
Node controller's internalPodInformer will block main thread
if it is not started as a go routine. This patch fixed this
by runing internalPodInformer as a go routine.
2016-09-06 15:39:13 +08:00
Wojciech Tyczynski b69d516763 NodeController listing nodes from apiserver cache 2016-09-05 16:52:57 +02:00
gmarek bac603afd6 Sleep between NodeStatus update retries 2016-09-05 12:29:28 +02:00
gmarek ea2d19f5d7 Remove unused argument to NodeController.Run 2016-08-30 14:24:56 +02:00
Kubernetes Submit Queue 6a1c63fd37 Merge pull request #30857 from better0332/master
Automatic merge from submit-queue

fix FakeNodeHandler List()
2016-08-22 17:40:34 -07:00
Kubernetes Submit Queue 9ebaf29295 Merge pull request #30624 from derekwaynecarr/node-controller-fix
Automatic merge from submit-queue

Node controller deletePod return true if there are pods pending deletion

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

If a node had a single pod in terminating state, and that node no longer reported healthy, the pod was never deleted by the node controller because it believed there were no pods remaining.

@smarterclayton @ncdc
2016-08-19 14:33:54 -07:00
gmarek 5d8cb17efa Add cluster health metrics to NodeController 2016-08-18 15:11:10 +02:00
better0332 2f837e7096 fix FakeNodeHandler List() 2016-08-18 17:30:26 +08:00
Kubernetes Submit Queue f9190ed61a Merge pull request #30138 from gmarek/flags
Automatic merge from submit-queue

Expose flags for new NodeEviction logic in NodeController

Fix #28832
Last PR from the NodeController NodeEviction logic series. 

cc @davidopp @lavalamp @mml
2016-08-18 00:41:28 -07:00
bprashanth 15c9826061 Nodecontroller doesn't flip readiness on pods if kubeletVersion < 1.2.0 2016-08-17 15:33:35 -07:00
gmarek 4cf698ef04 Expose flags for new NodeEviction logic in NodeController 2016-08-17 10:43:24 +02:00
derekwaynecarr 14a2b261a8 Node controller deletePod return true if there are pods pending deletion 2016-08-16 13:05:38 -04:00
AdoHe b2ab4c6d9b fix node controller event uid issue 2016-08-14 09:41:20 +08:00
Kubernetes Submit Queue 2537f66f0e Merge pull request #29230 from luxas/goimport
Automatic merge from submit-queue

Run goimport for the whole repo

While removing GOMAXPROC and running goimports, I noticed quite a lot of other files also needed a goimport format. Didn't commit `*.generated.go`, `*.deepcopy.go` or files in `vendor`

This is more for testing if it builds.
The only strange thing here is the gopkg.in/gcfg.v1 => github.com/scalingdata/gcfg replace.
cc @jfrazelle @thockin
2016-08-05 16:22:01 -07:00
Dominika Hodovska 816f6d32ca Collapse duplicate informer creation paths 2016-08-04 09:02:13 +02:00
gmarek 66224ce0bd Change eviction logic in NodeController and make it Zone-aware 2016-08-02 14:21:52 +02:00
Lucas Käldström c88a07ce1a Run goimports 2016-08-02 15:12:39 +03:00
k8s-merge-robot 59836d6dbd Merge pull request #24841 from sjenning/shared-informer
Automatic merge from submit-queue

update node controller to use shared pod informer

continuing work from #24470 and #23575
2016-08-02 03:45:01 -07:00
Matt T. Proud 76aab29ede pkg/controller/node/nodecontroller: simplify mutex
Similar to #29598, we can rely on the zero-value construction behavior
to embed `sync.Mutex` into parent structs.
2016-07-26 07:06:16 +02:00
Seth Jennings db6026c82a node controller use shared pod informer 2016-07-20 15:26:19 -05:00
Seth Jennings 6d77f53af4 refactor maybeDeleteTerminatingPod 2016-07-20 15:26:19 -05:00
k8s-merge-robot 8c6336b12a Merge pull request #29101 from gmarek/allocator2
Automatic merge from submit-queue

Retry assigning CIDRs

Fix #28879, ref #29064

cc @bgrant0607 @bprashanth @alex-mohr
2016-07-19 04:35:23 -07:00
gmarek 56006fac43 Retry assigning CIDRs 2016-07-18 17:06:04 +02:00
k8s-merge-robot fa174bcdaf Merge pull request #29042 from dims/fixup-imports
Automatic merge from submit-queue

Use Go canonical import paths

Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-18 07:23:38 -07:00
gmarek 579912d9d2 Re-check assigned CIDR during update 2016-07-18 10:57:58 +02:00
Prashanth Balasubramanian 2f9516db30 List all nodes and occupy cidr map before starting allocations 2016-07-16 13:54:01 -07:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
gmarek f6b1c316e9 Allow switching rate limiter inside RateLimitedQueue 2016-07-14 15:38:14 +02:00
k8s-merge-robot 6b6141f812 Merge pull request #28820 from caesarxuchao/patch-subresource
Automatic merge from submit-queue

[client-gen] Allow passing subresources in Patch method

Expand the Patch() method from:
```
Patch(name string, pt api.PatchType, data []byte)
```
to
```
Patch(name string, pt api.PatchType, data []byte, subresources ...string)
```

Continue on #27293. Fixes #26580.

cc @Random-Liu @lavalamp
2016-07-13 16:09:01 -07:00
gmarek 5677a9845e Split NodeController rate limiters between zones 2016-07-13 14:09:19 +02:00
Chao Xu dc2e12d2f8 manual changes to patch subresource 2016-07-12 11:09:27 -07:00
gmarek fd600ab65c Add hooks for cluster health detection 2016-07-12 15:10:58 +02:00
gmarek 7524da877e Reduce tightness of coupling in NodeController 2016-07-12 11:00:41 +02:00
gmarek 7f5f9d3a6f Move CIDR allocation logic away from nodecontroller.go 2016-07-12 09:40:43 +02:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Oleg Shaldybin a58b4cf59d Don't panic in NodeController if pod update fails
Previously it was trying to use a nil pod variable if error was returned
from the pod update call.
2016-06-28 11:54:13 -07:00
Oleg Shaldybin 3b15d5be19 Use correct namespace in unit tests that use fake clientset
Fake clientset no longer needs to be prepopulated with records: keeping
them in leads to the name conflict on creates. Also, since fake
clientset now respects namespaces, we need to correctly populate them.
2016-06-28 11:26:34 -07:00
k8s-merge-robot 93037844c1 Merge pull request #27293 from caesarxuchao/add-patch-to-clientset
Automatic merge from submit-queue

[client-gen]Add Patch to clientset

* add the Patch() method to the clientset. 
* I have to rename the existing Patch() method of `Event` to PatchWithEventNamespace() to avoid overriding.
* some minor changes to the fake Patch action.

cc @Random-Liu since he asked for the method
@kubernetes/sig-api-machinery 

ref #26580 

```release-note
Add the Patch method to the generated clientset.
```
2016-06-25 19:15:11 -07:00
saadali 926bb4cca0 Add patch status to Node internalclientset 2016-06-19 23:54:02 -07:00
goltermann 218645b346 Fix several spelling errors in comments. 2016-06-17 10:41:18 -07:00
Chao Xu a29f6aa8ae add Patch to clientsets 2016-06-17 10:30:58 -07:00
gmarek 7cac170214 AllocateOrOccupyCIDR returs quickly 2016-05-31 09:11:42 +02:00
k8s-merge-robot 577cdf937d Merge pull request #26415 from wojtek-t/network_not_ready
Automatic merge from submit-queue

Add a NodeCondition "NetworkUnavaiable" to prevent scheduling onto a node until the routes have been created 

This is new version of #26267 (based on top of that one).

The new workflow is:
- we have an "NetworkNotReady" condition
- Kubelet when it creates a node, it sets it to "true"
- RouteController will set it to "false" when the route is created
- Scheduler is scheduling only on nodes that doesn't have "NetworkNotReady ==true" condition

@gmarek @bgrant0607 @zmerlynn @cjcullen @derekwaynecarr @danwinship @dcbw @lavalamp @vishh
2016-05-29 03:06:59 -07:00
Alex Robinson d577550dd0 Merge pull request #26054 from gmarek/flags
Make service-range flag in controller-manager optional
2016-05-27 14:26:15 -07:00
gmarek 7bdf480340 Node is NotReady until the Route is created 2016-05-27 19:29:51 +02:00
Alex Robinson 7522389d8d Merge pull request #26207 from zmerlynn/fix-unneeded-updated
nodecontroller: Fix log message on successful update
2016-05-27 09:56:28 -07:00
Zach Loafman cb69960742 nodecontroller: Fix log message on successful update 2016-05-25 14:44:15 -07:00
k8s-merge-robot 4e8e4a574c Merge pull request #25636 from zhouhaibing089/delnode-fix
Automatic merge from submit-queue

use monotonic now in TestDelNode

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

Briefly, the rate_limited_queue uses a `container/heap` to store values, and use this data structure to ensure we can always fetch the value with the minimum `processAt`. However, in some extreme condition, the continuous call to `time.Now()` would get the same value, which causes some unpredictable order in the queue, this fix uses a monotonic `now()` to avoid that.

@smarterclayton please take a look.
2016-05-25 13:33:31 -07:00
gmarek 08385b2c5f Make service-range flag in controller-manager optional 2016-05-23 09:37:53 +02:00
gmarek 1d89d2f2d2 Add few log lines to NodeController 2016-05-23 08:49:11 +02:00