Commit Graph

372 Commits (f34a24e98e7c837b567b78be3af958ac1156cd80)

Author SHA1 Message Date
supereagle adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
Kubernetes Submit Queue c1c7193b4d Merge pull request #46514 from ravisantoshgudimetla/scheduler_taints_refactor
Automatic merge from submit-queue (batch tested with PRs 49420, 49296, 49299, 49371, 46514)

Refactoring taint functions to reduce sprawl

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #45060

**Special notes for your reviewer**:
@gmarek @timothysc @k82cn @jayunit100 - I moved some fn's to helpers and some to utils. LMK, if you are ok with this change.

**Release note**:

```release-note
NONE
```
2017-07-21 22:23:24 -07:00
ravisantoshgudimetla b01a1c3881 Build files generated 2017-07-19 18:36:12 -04:00
ravisantoshgudimetla 9dbf1a5644 Refactoring taints to reduce sprawl 2017-07-19 18:36:07 -04:00
Kubernetes Submit Queue 36ade22a5a Merge pull request #49116 from sttts/sttts-authorative-api-v1-ref
Automatic merge from submit-queue (batch tested with PRs 49116, 49095)

Move pkg/api/v1/ref -> client-go/tools/reference

`pkg/api/v1/ref` is the only remaining package copied from pkg/api/v1 to client-go via staging/copy.sh.
2017-07-19 03:21:25 -07:00
Dr. Stefan Schimanski 5925a0a1df Move pkg/api/v1/ref -> client-go/tools/reference 2017-07-18 22:45:43 +02:00
Kubernetes Submit Queue b0b0400516 Merge pull request #48983 from k82cn/set_network_inode_unknown
Automatic merge from submit-queue (batch tested with PRs 48983, 49013)

Added comments on not set node network/inode condition to unknown.

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #48982

**Release note**:
```release-note
None
```
2017-07-18 02:23:42 -07:00
Chao Xu 9d489c8504 manual changes 2017-07-17 15:05:38 -07:00
Jacob Simpson a765b8cfca Migrate api.Scheme to scheme.Scheme 2017-07-17 15:05:38 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Klaus Ma 7e28a2cfd1 Added comments on not set node network/inode condition to unknown. 2017-07-17 21:34:28 +08:00
Kubernetes Submit Queue 1170b7c2a1 Merge pull request #47087 from ravisantoshgudimetla/node_controller_flake
Automatic merge from submit-queue

Changes to fix the node eviction flake

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #39975

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-17 02:31:51 -07:00
Klaus Ma 01097dba02 Renamed nodeutil to v1node. 2017-07-16 15:11:17 +08:00
Klaus Ma 6d5e121292 Added pod evictors for new zone. 2017-07-10 22:53:14 +08:00
ravisantoshgudimetla 1ecc864f87 Changes for partial eviction flake 2017-07-07 10:42:03 -04:00
Kubernetes Submit Queue 8dabdf7081 Merge pull request #46955 from zjj2wry/nodecontroller_matrics
Automatic merge from submit-queue

Fix const naming in node/metrics

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-23 22:22:16 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
zhengjiajin 8c8089478e Fix const nameing in node/metrics 2017-06-05 16:36:09 +08:00
deads2k 954eb3ceb9 move labels to components which own the APIs 2017-05-31 10:32:06 -04:00
Michael Taufen f848756cff fix a comment and log message in the nodecontroller 2017-05-30 11:32:43 -07:00
ailusazh 6082b87ca3 fix typo in taint_controller 2017-05-26 13:58:31 +08:00
Kubernetes Submit Queue 8f9f412d2f Merge pull request #46162 from lixiaobing10051267/masterFound
Automatic merge from submit-queue (batch tested with PRs 45573, 46354, 46376, 46162, 46366)

break the loop when found true

break the loop when found true.
2017-05-25 03:14:03 -07:00
Clayton Coleman 3e095d12b4
Refactor move of client-go/util/clock to apimachinery 2017-05-20 14:19:48 -04:00
lixiaobing1 6949b5dbe7 break the loop when found true
Signed-off-by: lixiaobing1 <li.xiaobing1@zte.com.cn>
2017-05-20 15:22:07 +08:00
Bowei Du 3af1c0efcb Add bowei to OWNERS: e2e/test dns,network; cloud route, node, service controller 2017-05-19 14:49:43 -07:00
wlan0 45d2bc06b7 cloud initialize node in external cloud controller 2017-05-05 16:51:45 -07:00
gmarek 51c07147c8 Make taint manager harder to break before we move it out of NC 2017-05-05 15:48:44 +02:00
gmarek 8f86881d18 Extend timeouts in timed_workers_test 2017-05-05 13:18:14 +02:00
Kubernetes Submit Queue 44d5bf29e0 Merge pull request #45100 from sttts/sttts-deflake-TestUpdateNodeWithMultiplePods
Automatic merge from submit-queue (batch tested with PRs 45100, 45152, 42513, 44796, 45222)

node-controller: deflake TestUpdateNodeWithMultiplePods
2017-05-02 10:34:58 -07:00
Dr. Stefan Schimanski a426adcb2f node-controller: deflake TestUpdateNodeWithMultiplePods
Use absolute time and increase grace duration to 500ms for tests under load.
2017-05-02 08:01:52 +02:00
Dr. Stefan Schimanski 64aec01ac9 taint-controller-tests: double 'a bit of time' to avoid flakes 2017-04-28 17:42:35 +02:00
Kubernetes Submit Queue 9c17779924 Merge pull request #44571 from rpothier/cidr_set_indices
Automatic merge from submit-queue

Fixes an issue in cide_set.go

Function getBeginingAndEndIndices may return
end index too big



**What this PR does / why we need it**:
Fixes getBeginingAndEndIndices() in cidr_set.go
End index is off by one when s.clusterMaskSize >= maskSize

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #44558


**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-04-19 02:36:52 -07:00
Robert Pothier bde909c55b Fixes an issue in cide_set.go
Function getBeginingAndEndIndices may return
end index too big
2017-04-17 14:44:26 -04:00
Chao Xu 4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Chao Xu d4850b6c2b move pkg/api/v1/helpers.go to subpackage 2017-04-14 14:25:11 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Andy Goldstein e63fcf708d Make controller Run methods consistent
- startup/shutdown logging
- wait for cache sync logging
- defer utilruntime.HandleCrash()
- wait for stop channel before exiting
2017-04-14 07:27:45 -04:00
Kubernetes Submit Queue abd92fab1e Merge pull request #44296 from caesarxuchao/move-api-helpers.go
Automatic merge from submit-queue

Move api helpers.go to a subpackage

Part of https://github.com/kubernetes/kubernetes/issues/44065.

This PR moves the pkg/api/helpers.go to its own subpackage. It's mostly a mechanic move, except that
* I removed ConversionError in helpers.go, it's not used by anyone
* I moved the 3 methods of Taint and Toleration to pkg/api/methods.go, and left a TODO saying refactoring these methods to functions.

I'll send a few more PRs to make the k8s.io/kubernetes/pkg/api package only contains the code we want in the k8s.io/api repo, then we can run a [script](a0015fd1be (diff-7a2fbb4371972350ee414c6b88aee1c8)) to cut the new repo.
2017-04-11 23:46:04 -07:00
Chao Xu 08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
Bowei Du f61590c221 Adds support for PodCIDR allocation from the GCE cloud provider
If CIDRAllocatorType is set to `CloudCIDRAllocator`, then allocation
of CIDR allocation instead is done by the external cloud provider and
the node controller is only responsible for reflecting the allocation
into the node spec.

- Splits off the rangeAllocator from the cidr_allocator.go file.
- Adds cloudCIDRAllocator, which is used when the cloud provider allocates
  the CIDR ranges externally. (GCE support only)
- Updates RBAC permission for node controller to include PATCH
2017-04-11 14:07:54 -07:00
gmarek 576ad815c8 Allow swapping NotReady and Unschedulable Taints 2017-04-04 15:49:49 +02:00
Klaus Ma d0e04427d7 Fixed incorrect result of getMinTolerationTime. 2017-03-12 20:21:14 +08:00
Kubernetes Submit Queue 3f660a9779 Merge pull request #42913 from aveshagarwal/master-fix-taint-based-eviction-no-node-cidr
Automatic merge from submit-queue

Fix taint based pod eviction for clusters where controller manager is not running with allocate-node-cidrs set

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

In my cluster, I have not set allocate-node-cidr, and It is causing taint based pod eviction to fail. 

@gmarek @kubernetes/sig-scheduling-bugs @davidopp @derekwaynecarr
2017-03-11 14:02:45 -08:00
Avesh Agarwal c3a80719a2 Fix taint based pod eviction for clusters where controller manager
is not running with --allocate-node-cidrs set.
2017-03-10 15:39:21 -05:00
gmarek fddac63c27 Remove unused functions and make logs slightly better 2017-03-10 11:57:51 +01:00
Kubernetes Submit Queue 7002c53a9c Merge pull request #42808 from ravisantoshgudimetla/nodecontroller_eviction_flake
Automatic merge from submit-queue (batch tested with PRs 42024, 42780, 42808, 42640)

Node controller test flake 39975 with delay for try function

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #39975 

/cc @ncdc @gmarek @liggitt
2017-03-09 16:41:52 -08:00
ravisantoshgudimetla 7d444263a5 Change from Micro to Milli for introducing delay 2017-03-09 14:10:28 -05:00
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