Commit Graph

2959 Commits (ff471913f9073e8c69dd5c5e87fee95857a20aba)

Author SHA1 Message Date
zhangxiaoyu-zidif b952bb1d19 delete redundant test para. 2017-08-09 11:52:59 +08:00
Bowei Du 61c43f6468 golint fixes 2017-08-08 17:04:50 -07:00
Bowei Du 27854fa0d8 Break up node controller into packages
This change does NO actual code changes other than moving constituent
parts into packages.
2017-08-08 15:33:56 -07:00
Yinan Li 2c1ada38d0 Merge branch 'master' of github.com:kubernetes/kubernetes into branch1 2017-08-08 12:13:22 -07:00
Kubernetes Submit Queue 6b99a007d3 Merge pull request #50179 from k82cn/mv_node_testutils
Automatic merge from submit-queue (batch tested with PRs 50254, 50174, 50179)

Moved node/testutil to upper dir.

**What this PR does / why we need it**:
Moved node/testutil to upper directory (`pkg/controller`); it's used by several controllers, and we need to test some helper func in `pkg/controller`.

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

**Release note**:

```release-note
N/A
```
2017-08-08 04:02:56 -07:00
Yassine TIJANI a532784189 simplify logic around LB deletion 2017-08-08 12:51:45 +02:00
Kubernetes Submit Queue 3900e36d62 Merge pull request #50124 from k82cn/k8s_49103
Automatic merge from submit-queue

Removed un-used InodePressure condition.

**What this PR does / why we need it**:
Removed un-used InodePressure condition; kubelet did not report it anymore, so remove it.

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

**Release note**:

```release-note
The node condition 'NodeInodePressure' was removed, as kubelet did not report it.
```
2017-08-07 21:36:48 -07:00
xiangpengzhao ce627f55be Update mrubin to matchstick in OWNERS 2017-08-08 11:52:53 +08:00
Klaus Ma 4fdb701e3c Moved node/testutil to upper dir. 2017-08-08 10:14:21 +08:00
Yinan Li 89fd3b0ebd Copy annotations from StatefulSet to ControllerRevisions it owns 2017-08-07 14:50:05 -07:00
Kubernetes Submit Queue 35eb03e3b4 Merge pull request #49524 from k82cn/k8s_49522
Automatic merge from submit-queue (batch tested with PRs 49524, 46760, 50206, 50166, 49603)

Handled taints on node in batch.

**What this PR does / why we need it**:
Enhanced helpers to handled taints on node in batch.

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

**Release note**:

```release-note
None
```
2017-08-07 13:51:54 -07:00
Kubernetes Submit Queue 8de72d21e8 Merge pull request #49952 from FengyunPan/repeat-check
Automatic merge from submit-queue (batch tested with PRs 49885, 49751, 49441, 49952, 49945)

There is no need to split service key repeatedly

**Release note**:
```release-note
NONE
```
2017-08-07 12:56:15 -07:00
Kubernetes Submit Queue dbc81febc1 Merge pull request #50184 from jinzhejz/jinzhejz_typo
Automatic merge from submit-queue

fix typo in replenishment_controller.go

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

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

**Release note**:
```release-note
None
```
2017-08-07 05:52:19 -07:00
FengyunPan 53742560cd There is no need to split service key repeatedly 2017-08-07 20:18:20 +08:00
Klaus Ma 2ebd743be8 Added toleration for node condition taints. 2017-08-07 19:53:40 +08:00
Klaus Ma 18ae1ba813 Handled taints on node in batch. 2017-08-07 19:29:39 +08:00
Dr. Stefan Schimanski 83895daed1 Fix printer hack to get a versioned client 2017-08-06 15:30:13 +02:00
Mikhail Mazurskiy 32b78aebf2
Migrate to IsControlledBy from meta/v1 package 2017-08-06 22:43:46 +10:00
Mikhail Mazurskiy 042b5642b9
Migrate to NewControllerRef from meta/v1 package 2017-08-06 22:43:46 +10:00
Mikhail Mazurskiy b28a83a4cf
Migrate to GetControllerOf from meta/v1 package 2017-08-06 22:41:58 +10:00
Kubernetes Submit Queue f75f49e7a0 Merge pull request #49915 from caesarxuchao/controller-ignore-initialize-timeout
Automatic merge from submit-queue (batch tested with PRs 49855, 49915)

Let controllers ignore initialization timeout when creating pods

Partially address https://github.com/kubernetes/kubernetes/issues/48893#issuecomment-318540129.

This only updates the controllers that create pods with `GenerateName`.

The controllers ignore the timeout error when creating the pods, depending on how the initialization progress:
* If the initialization is successful in less than 5 mins, the controller will observe the creation via the informer. All is good.
* If the initialization fails, server will delete the pod, but the controller won't receive any event. The controller will not create new pod until the Creation expectation expires in 5 min.
* If the initialization takes too long (> 5 mins), the Creation expectation expires and the controller will create extra pods.

I'll send follow-up PRs to fix the latter two cases, e.g., by refactoring the sharedInformer.
2017-08-05 19:07:53 -07:00
Malepati Bala Siva Sai Akhil 83603f0358 Fix typo in comment
Fix typo in comment in garbagecollector
2017-08-05 22:47:48 +05:30
Kubernetes Submit Queue 0b9aa05633 Merge pull request #48141 from ankon/patch-2
Automatic merge from submit-queue

Fix typo

**What this PR does / why we need it**: Fix trivial typo in comment.
2017-08-05 06:12:57 -07:00
Kubernetes Submit Queue ec424949c9 Merge pull request #49860 from zhangxiaoyu-zidif/fix-error-print-for-cronjob-utils-test
Automatic merge from submit-queue (batch tested with PRs 47416, 47408, 49697, 49860, 50162)

fix error message for cronjob

**What this PR does / why we need it**:
fix error message for cronjob
expected an error would be better than unexpected lack of error.
ref: https://github.com/kubernetes/kubernetes/blob/master/cmd/genutils/genutils_test.go#L33

**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-08-05 03:22:59 -07:00
Zhe Jin b2b3ae378e fix typo 2017-08-05 11:09:15 +08:00
Kubernetes Submit Queue 704cc7f9f6 Merge pull request #50070 from dixudx/remove_013_to_avoid_bad_words
Automatic merge from submit-queue (batch tested with PRs 46685, 49863, 50098, 50070, 50096)

Remove 0,1,3 from rand.String to avoid 'bad words'

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

Remove 0,1,3 from the runes to prevent accidental bad words profanity

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

**Special notes for your reviewer**:
/cc @mml  @jamesawebb1  @spiffxp 

**Release note**:

```release-note
Remove 0,1,3 from rand.String, to avoid 'bad words'
```
2017-08-04 00:20:57 -07:00
Klaus Ma ce826dcd78 Removed un-used InodePressure condition. 2017-08-04 11:29:51 +08:00
Kubernetes Submit Queue 063fc6a73a Merge pull request #43586 from rpothier/cidr_set_ipv6
Automatic merge from submit-queue (batch tested with PRs 50103, 49677, 49449, 43586, 48969)

Adding IPv6 to cidr_set and cidr_set_test

**What this PR does / why we need it**:
This allows IPv6 in cidr_set

Currently cidr_set only supports IPv4. This adds IPv6 compatibility and adds
IPv6 unit tests.

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

**Special notes for your reviewer**:
The IPv6 code here makes some assumptions.
The subnets should be at least /64. (maximum 64 bits of prefix)
The subnet mask size cannot be greater than 30 more than the cluster mask size.

**Release note**:

```release-note
```
2017-08-03 16:43:39 -07:00
Kubernetes Submit Queue 40d66b8e05 Merge pull request #49677 from dims/send-missing-uid-field-during-webhook-authorize
Automatic merge from submit-queue (batch tested with PRs 50103, 49677, 49449, 43586, 48969)

Add missing UID in SubjectAccessReviewSpec

**What this PR does / why we need it**:
WebhookAuthorizer's Authorize should send *all* the information
present in the user.Info data structure. We are not sending the
UID currently.


**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
The SubjectAccessReview API in the authorization.k8s.io API group now allows providing the user uid.
```
2017-08-03 16:43:34 -07:00
Chao Xu 97e07e5b52 Let controllers ignore initialization timeout error when creating a pod. 2017-08-03 15:28:08 -07:00
Robert Pothier 5e96523913 Adding IPv6 to cidr_set and cidr_set_test 2017-08-03 13:06:49 -04:00
Michail Kargakis 55339f30ac
Remove failure check from deployment controller
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-08-03 18:49:16 +02:00
Di Xu 9ed4395d3c Remove 0,1,3 from rand.String, to avoid 'bad words' 2017-08-03 15:52:33 +08:00
Klaus Ma c8ecd92269 Moved node condition check into Predicats. 2017-08-03 15:39:11 +08:00
Kubernetes Submit Queue cba21511bd Merge pull request #49980 from caesarxuchao/gc-minor
Automatic merge from submit-queue (batch tested with PRs 49237, 49656, 49980, 49841, 49899)

GC shouldn't send empty patch

The scope of the `if` statement was wrong, causing GC to sometimes send empty patch.

Found this bug while investigating https://github.com/kubernetes/kubernetes/issues/49966.
2017-08-02 19:11:13 -07:00
Kubernetes Submit Queue 84e0326eb1 Merge pull request #49782 from supereagle/update-generated-deepcopy
Automatic merge from submit-queue (batch tested with PRs 50029, 48517, 49739, 49866, 49782)

Update generated deepcopy code

**What this PR does / why we need it**:
In generated deepcopy code, the method names in comments do not match the real method names.

**Which issue this PR fixes**: fixes #49755

**Special notes for your reviewer**:
/assign @sttts @caesarxuchao 


**Release note**:
```release-note
NONE
```
2017-08-02 12:46:57 -07:00
Davanum Srinivas 9a761b16c1 Add missing UID in SubjectAccessReviewSpec
WebhookAuthorizer's Authorize should send *all* the information
present in the user.Info data structure. We are not sending the
UID currently.
2017-08-02 10:49:02 -04:00
dhilipkumars a1ba598130 Have a uniform format for filenames across controllers 2017-08-02 09:50:05 +05:30
Kubernetes Submit Queue 455d85a984 Merge pull request #49870 from k82cn/nc_rename_zone_tainer
Automatic merge from submit-queue (batch tested with PRs 49870, 49416, 49872, 49892, 49908)

Renamed zoneNotReadyOrUnreachableTainer to zoneNoExecuteTainer.

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

**Release note**:

```release-note
None
```
2017-08-01 19:52:57 -07:00
Kubernetes Submit Queue 23bb765498 Merge pull request #49491 from eparis/make-plus-append-is-bad
Automatic merge from submit-queue (batch tested with PRs 49898, 49897, 49919, 48860, 49491)

Fix usage a make(struct, len()) followed by append()

A couple of places in the code we allocate with make() but then use
append(), instead of copy() or direct assignment. This results in a
slice with len() zero elements at the front followed by the expected
data. The correct form for such usage is `make(struct, 0, len())`.

I found these by running:
```
$ git grep -EI -A7 'make\([^,]*, len\(' | grep 'append(' -B7 | grep -v vendor
```
And then manually looking through the results. I'm sure something better
could exist.

**Release note**:
```release-note
NONE
```
2017-08-01 17:57:20 -07:00
Kenneth Owens 5941f7b69f Merge pull request #49016 from jsafrane/pv-controller-no-resync
PV controller: resync informers manually
merging to unblock the submit queue
2017-08-01 16:39:40 -07:00
Chao Xu 3060e925f5 GC shouldn't send empty patch 2017-08-01 13:06:36 -07:00
zhangxiaoyu-zidif c984245f9b Delete redundant print 'got:' 2017-08-01 18:56:06 +08:00
Kubernetes Submit Queue 665db3b245 Merge pull request #49821 from MrHohn/routecontroller-error-event
Automatic merge from submit-queue (batch tested with PRs 46519, 49794, 49720, 49692, 49821)

[route_controller] Emit event when failed to create route

**What this PR does / why we need it**:
When route controller failed to create route for nodes, pod's networking is likely broken. We surface this situation through node condition (https://github.com/kubernetes/kubernetes/blob/v1.7.2/pkg/controller/route/routecontroller.go#L197-L231), but this might not be easily tracked when user have a large cluster with many nodes. Surface the error through event might make things more obvious.

**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**:
cc @bowei 

**Release note**:

```release-note
NONE
```
2017-08-01 03:04:49 -07:00
Kubernetes Submit Queue 897ad3585a Merge pull request #49794 from gnufied/log-pod-skip-event-with-higher-priority
Automatic merge from submit-queue (batch tested with PRs 46519, 49794, 49720, 49692, 49821)

Log attach detach controller skipping pods at higher priority

This will help us in tracking down problems related to pods
not getting added to desired state of world because of events
arriving out of order or some other problem related to that.

cc @kubernetes/sig-storage-pr-reviews
2017-08-01 03:04:41 -07:00
Eric Paris 5e22e149c5 Fix usage a make(struct, len()) followed by append()
A couple of places in the code we allocate with make() but then use
append(), instead of copy() or direct assignment. This results in a
slice with len() zero elements at the front followed by the expected
data. The correct form for such usage is `make(struct, 0, len())`.

I found these by running:
```
$ git grep -EI -A7 'make\([^,]*, len\(' | grep 'append(' -B7 | grep -v vendor
```
And then manually looking through the results. I'm sure something better
could exist.
2017-07-31 14:43:29 -04:00
supereagle a1c880ece3 update generated deepcopy code 2017-07-31 22:33:00 +08:00
Klaus Ma e89e01d063 Renamed doTaintingPass to doNoExecuteTaintingPass. 2017-07-31 19:47:57 +08:00
Klaus Ma 678947d431 Renamed zoneNotReadyOrUnreachableTainer to zoneNoExecuteTainer. 2017-07-31 19:39:34 +08:00
zhangxiaoyu-zidif 9ada6b37c5 fix error message for cronjob 2017-07-31 14:42:04 +08:00
jianglingxia 9e8d4b4188 Renamed packge name to apiv1 2017-07-29 16:47:14 +08:00
Zihong Zheng 28d2e67ff7 Emit event when failed to create route 2017-07-28 15:39:47 -07:00
Hemant Kumar f4e792ed42 Log attach detach controller skipping pods at higher priority
This will help us in tracking down problems related to pods
not getting added to desired state of world because of events
arriving out of order or some other problem related to that.
2017-07-28 13:23:28 -04:00
Dan Mace d08dfb92c7 Enable garbage collection of custom resources
Enhance the garbage collector to periodically refresh the resources it
monitors (via discovery) to enable custom resource definition GC.

This implementation caches Unstructured structs for any kinds not
covered by a shared informer. The existing meta-only codec only supports
compiled types; an improved codec which supports arbitrary types could
be introduced to optimize caching to store only metadata for all
non-informer types.
2017-07-28 10:00:10 -04:00
Kubernetes Submit Queue 07d7ac78a3 Merge pull request #49619 from jianglingxia/jlx72616
Automatic merge from submit-queue (batch tested with PRs 49619, 49598, 47267, 49597, 49638)

replicaset fix typo

**What this PR does / why we need it**:
reopen #47821
**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**:
@NickrenREN 
**Release note**:

```release-note
   NONE
```
2017-07-28 05:08:01 -07:00
Kubernetes Submit Queue 803cb9303b Merge pull request #49495 from deads2k/controller-12-toleration
Automatic merge from submit-queue (batch tested with PRs 49665, 49689, 49495, 49146, 48934)

make it possible to allow discovery errors for controllers

Update the discovery client to return partial discovery information *and* an error.  Since we can aggregate API servers, discovery of some resources can fail independently.  Callers of this function who want to tolerate the errors can, existing callers will still get an error and fail in normal blocks.

@kubernetes/sig-api-machinery-misc @sttts
2017-07-27 21:45:34 -07:00
deads2k b7286f3188 make it possible to allow discovery errors for controllers 2017-07-26 16:09:30 -04:00
Kubernetes Submit Queue 89525c62fd Merge pull request #49516 from caesarxuchao/parallel-patch
Automatic merge from submit-queue (batch tested with PRs 48360, 48469, 49576, 49516, 49558)

Let garbage collector send orphaning patches in parallel

Garbage collector sends orphaning patches in parallel now.
2017-07-26 13:02:43 -07:00
FengyunPan e4cb9a0824 Fix registered ownerName in prometheus
TokensController and ServiceAccountsController use same name to
register metric ownerName in prometheus.
2017-07-26 21:25:52 +08:00
jianglingxia 2eab9cfb68 replicaset fix typo 2017-07-26 17:00:28 +08:00
Kubernetes Submit Queue 9350afd772 Merge pull request #48976 from supereagle/cleanup-api-package
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Remove duplicated import and wrong alias name of api package

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

**Which issue this PR fixes**: fixes #48975

**Special notes for your reviewer**:
/assign @caesarxuchao

**Release note**:
```release-note
NONE
```
2017-07-25 12:14:38 -07:00
Kubernetes Submit Queue 393b1228c9 Merge pull request #45431 from DirectXMan12/feature/fake-dynamic-client
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

[client-go] Fake Dynamic Client

This commit converts `"k8s.io/client-go/dynamic".Client` to an interface, and implements fake versions of both `ClientPool` and `Client`.  This allows components which make uses of these clients to be tested in the same way that clientset-based components can be tested, using the standard `testing.Fake` machinery.

**Release note**:
```release-note
NONE
```
2017-07-25 11:06:49 -07:00
Kubernetes Submit Queue 9c3d0e8a96 Merge pull request #48224 from deads2k/controller-11-reflectormetrics
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

add reflector metrics

This adds metrics (optionally prometheus) to reflectors so that you can see when one reflector is behaving poorly and just how poorly its doing.

@eparis 

```release-note
Adds metrics for checking reflector health.
```
2017-07-25 11:06:47 -07:00
deads2k 151d39682e add reflector metrics 2017-07-25 09:01:37 -04:00
Kubernetes Submit Queue 144a4c2b74 Merge pull request #49358 from jianglingxia/jlx72113
Automatic merge from submit-queue

[trival] fix typo

**What this PR does / why we need it**:
some file word spell error that amend correct
**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-07-24 21:26:54 -07:00
supereagle adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
Chao Xu 5e7d7c00a2 let garbage collector send orphaning patches in parallel 2017-07-24 13:56:39 -07:00
Anthony Yeh 283211c1cf
StatefulSet: Remove `pod.alpha.kubernetes.io/initialized` annotation. 2017-07-24 10:18:47 -07:00
Kubernetes Submit Queue 1bcb381169 Merge pull request #49355 from dhilipkumars/UTDeployment
Automatic merge from submit-queue

deployment: SetNewReplicaSetAnnotations() should compare revisions as numbers than strings

**What this PR does / why we need it**: 
1) SetNewReplicaSetAnnotations() when deployment revision annotation is copied over to RS, it performs a string comparison instead of int comparison, due to this any revision beyond 9 might not get copied.
2) Slightly improves the coverage by adding UT for Annotation related functions
3) Upgrade the test suite to use go-langs sub-test, which is very useful while investigating UT related failures.

```
--- FAIL: TestAnnotationUtils (0.00s)
    --- FAIL: TestAnnotationUtils/SetNewReplicaSetAnnotations (0.00s)
        deployment_util_test.go:1283: Revision Expected=10 Obtained=9
        deployment_util_test.go:1283: Revision Expected=11 Obtained=9
        deployment_util_test.go:1283: Revision Expected=12 Obtained=9
        deployment_util_test.go:1283: Revision Expected=13 Obtained=9
        deployment_util_test.go:1283: Revision Expected=14 Obtained=9
        deployment_util_test.go:1283: Revision Expected=15 Obtained=9
        deployment_util_test.go:1283: Revision Expected=16 Obtained=9
        deployment_util_test.go:1283: Revision Expected=17 Obtained=9
        deployment_util_test.go:1283: Revision Expected=18 Obtained=9
        deployment_util_test.go:1283: Revision Expected=19 Obtained=9
        deployment_util_test.go:1283: Revision Expected=20 Obtained=9
    --- PASS: TestAnnotationUtils/SetReplicasAnnotations (0.00s)
    --- PASS: TestAnnotationUtils/IsSaturated (0.00s)
```

**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**: None

```release-note
```
cc: @kargakis
2017-07-22 10:56:55 -07: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
Solly Ross f78d61e7c2 [client-go] Add dynamic.Interface
This adds an interface form of dynamic.Client and
dynamic.ResourceClient, making those two follow the general client
conventions: `Interface` is an interface, and `Client` is the concrete
implementation.  `ClientPool` retains it's interface status.

This allows us to create a fake implemenation of dyanmic.Interface,
dynamic.ResourceInterface, and dynamic.ClientPool for testing.
2017-07-21 14:24:06 -04:00
Kubernetes Submit Queue 29cc1aab05 Merge pull request #49285 from mfojtik/fix-statefull-mutation
Automatic merge from submit-queue (batch tested with PRs 49328, 49285, 49307, 49127, 49163)

fix mutation in statefulset sync

Original issue: https://github.com/openshift/origin/issues/15324

Seems like something inside `UpdateStatefulSet` mutates the StatefulSet. We might need to dig deeper to find the exact location where the non-copy mutation happens.
2017-07-21 03:00:16 -07:00
jianglingxia 88828cc777 [trival] fix typo 2017-07-21 16:38:08 +08:00
dhilipkumars 4967bb7342 Review Comments 2017-07-21 13:42:13 +05:30
dhilipkumars 10af4fa9db Add UT and upgrade this test suite with go sub-test 2017-07-21 10:43:48 +05:30
dhilipkumars f17a572ece SetNewReplicaSetAnnotations() should compare revisions as numbers than strings 2017-07-21 10:43:48 +05:30
Michal Fojtik 4fa9b8778a
fix mutation in statefulset sync 2017-07-20 12:33:11 +02: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
deads2k 62157572cf tighten quota controller interface 2017-07-19 15:36:45 -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
Kubernetes Submit Queue 0dff56b4d8 Merge pull request #49109 from MaciekPytel/update_hpa_owners
Automatic merge from submit-queue

Add approvers to owners file for hpa

Currently none of hpa developers or people in sig-autoscaling has the right to approve PRs to hpa, meaning it needs to be approved at pkg/controller level by people not working on autoscaling.
2017-07-18 18:19:53 -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 5bbdfc6661 Merge pull request #48544 from sttts/sttts-typed-deepcopy-1.8
Automatic merge from submit-queue (batch tested with PRs 46094, 48544, 48807, 49102, 44174)

Static deepcopy – phase 1

This PR is the follow-up of https://github.com/kubernetes/kubernetes/pull/36412, replacing the
dynamic reflection based deepcopy with static DeepCopy+DeepCopyInto methods on API types.

This PR **does not yet** include the code dropping the cloner from the scheme and all the
porting of the calls to scheme.Copy. This will be part of a follow-up "Phase 2" PR.

A couple of the commits will go in first:
- [x] audit: fix deepcopy registration  https://github.com/kubernetes/kubernetes/pull/48599
- [x] apimachinery+apiserver: separate test types in their own packages #48601 
- [x] client-go: remove TPR example #48604
- [x] apimachinery: remove unneeded GetObjectKind() impls #48608 
- [x] sanity check against origin, that OpenShift's types are fine for static deepcopy https://github.com/deads2k/origin/pull/34

TODO **after** review here:
- [x] merge https://github.com/kubernetes/gengo/pull/32 and update vendoring commit
2017-07-18 11:20:51 -07:00
Maciej Pytel 78b955d312 Add approvers to owners file for hpa 2017-07-18 13:23: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
Dr. Stefan Schimanski 8dd0989b39 Update generated code 2017-07-18 09:28:49 +02:00
Dr. Stefan Schimanski 39d95b9b06 deepcopy: add interface deepcopy funcs
- add DeepCopyObject() to runtime.Object interface
- add DeepCopyObject() via deepcopy-gen
- add DeepCopyObject() manually
- add DeepCopySelector() to selector interfaces
- add custom DeepCopy func for TableRow.Cells
2017-07-18 09:28:47 +02:00
Kubernetes Submit Queue 96f7788f78 Merge pull request #48797 from FengyunPan/fix-empty-cidr
Automatic merge from submit-queue (batch tested with PRs 48231, 47377, 48797, 49020, 49033)

Fix parsing empty CIDR

Fix #48795
Checking ClusterCIDR and ServiceCIDR before parsing them.

**Release note**:
```release-note
NONE
```
2017-07-17 19:37:45 -07:00
Kubernetes Submit Queue 68fcc59214 Merge pull request #48231 from jcbsmpsn/update-kubelet-to-client-go
Automatic merge from submit-queue (batch tested with PRs 48231, 47377, 48797, 49020, 49033)

Migrate kubelet and linked code from clientset_generated to client-go

Ran a script in the kubernetes repo to migrate kubelet and linked code from clientset_generated package imports to client-go imports.

**NOTE:** There are also some manual changes that were made in order to accommodate some
differences between clientset_generated and client-go. The manual changes are isolated into a
single commit titled "Manual changes."

```sh
#! /bin/bash

for file in $(find . \( -name "clientset_generated" -o -name "informers_generated" \) -prune -o -type f -name "*.go"); do

  if [[ -d $file ]]; then
    continue
  fi

  if [[ $file == "./cmd/libs/go2idl/informer-gen/main.go" ]]; then
    continue
  fi

  sed -i '
      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset"|clientset "k8s.io/client-go/kubernetes"|;

      # Correct a couple of unique cases.
      s|clientset clientset "k8s.io/client-go/kubernetes"|clientset "k8s.io/client-go/kubernetes"|;
      s|cs clientset "k8s.io/client-go/kubernetes"|clientset "k8s.io/client-go/kubernetes"|;
      s|VersionedClientSetPackage: clientset "k8s.io/client-go/kubernetes"|VersionedClientSetPackage: "k8s.io/client-go/kubernetes"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1"|"k8s.io/client-go/kubernetes/typed/certificates/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1"|"k8s.io/client-go/kubernetes/typed/core/v1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1"|"k8s.io/client-go/kubernetes/typed/extensions/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1"|"k8s.io/client-go/kubernetes/typed/autoscaling/v1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1"|"k8s.io/client-go/kubernetes/typed/authentication/v1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1"|"k8s.io/client-go/kubernetes/typed/authorization/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1"|"k8s.io/client-go/kubernetes/typed/apps/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1"|"k8s.io/client-go/kubernetes/typed/rbac/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake"|"k8s.io/client-go/kubernetes/fake"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake"|"k8s.io/client-go/kubernetes/typed/core/v1/fake"|;

      s|k8s.io/kubernetes/pkg/client/clientset_generated/clientset|k8s.io/client-go/kubernetes|;



      s|informers "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions"|"k8s.io/client-go/informers"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/core/v1"|"k8s.io/client-go/informers/core/v1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/apps/v1beta1"|"k8s.io/client-go/informers/apps/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/extensions/v1beta1"|"k8s.io/client-go/informers/extensions/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/batch/v1"|"k8s.io/client-go/informers/batch/v1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/autoscaling/v1"|"k8s.io/client-go/informers/autoscaling/v1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/policy/v1beta1"|"k8s.io/client-go/informers/policy/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/certificates/v1beta1"|"k8s.io/client-go/informers/certificates/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/storage/v1"|"k8s.io/client-go/informers/storage/v1"|;



      s|"k8s.io/kubernetes/pkg/client/listers/core/v1"|"k8s.io/client-go/listers/core/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/apps/v1beta1"|"k8s.io/client-go/listers/apps/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1"|"k8s.io/client-go/listers/extensions/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/autoscaling/v1"|"k8s.io/client-go/listers/autoscaling/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/batch/v1"|"k8s.io/client-go/listers/batch/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1"|"k8s.io/client-go/listers/certificates/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/storage/v1"|"k8s.io/client-go/listers/storage/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/policy/v1beta1"|"k8s.io/client-go/listers/policy/v1beta1"|;


  ' $file
done

hack/update-bazel.sh

hack/update-gofmt.sh
```
2017-07-17 19:37:41 -07:00
Kubernetes Submit Queue e7cf03e0cf Merge pull request #45894 from tnozicka/export-base-controller-ref-manager
Automatic merge from submit-queue (batch tested with PRs 49017, 45440, 48384, 45894, 48808)

Export BaseControllerRefManager

**What this PR does / why we need it**:
It exports go struct `baseControllerRefManager`. This is needed so other distributions like OpenShift or TPR controllers can reuse that code for writing ref managers for other objects. 

**Release note**:
It is not worthy of a release note.
2017-07-17 16:26:57 -07:00
Jacob Simpson b565f53822 update-bazel.sh 2017-07-17 15:06:08 -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 2c70e5df35 Manual changes. 2017-07-17 15:05:37 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Tomas Nozicka a887cd3434 Export BaseControllerRefManager 2017-07-17 22:36:51 +02:00
Kubernetes Submit Queue e7dff4fd12 Merge pull request #48595 from bonowang/master
Automatic merge from submit-queue (batch tested with PRs 48997, 48595, 48898, 48711, 48972)

remove useless code in podautoscaler

**What this PR does / why we need it**:
code optimization,remove some useless code.

**Special notes for your reviewer:**
My first Kubernetes PR,please let me know if anything wrong on this one.

**Release note**:

```release-note
NONE
```
2017-07-17 13:23:49 -07:00
Kubernetes Submit Queue aed912bf63 Merge pull request #48997 from johanneswuerbach/hpa-min
Automatic merge from submit-queue (batch tested with PRs 48997, 48595, 48898, 48711, 48972)

hpa: Prevent scaling below MinReplicas if desiredReplicas is zero

**What this PR does / why we need it**:
Prevent a HPA scaling below `minReplicas` if `desiredReplicas` is calculated as `0`.

Example events of a HPA continuously scaling between `1` and `MinReplicas`:
```
2h        59s        22    horizontal-pod-autoscaler            Normal        SuccessfulRescale    New size: 1; reason: All metrics below target
2h        29s        22    horizontal-pod-autoscaler            Normal        SuccessfulRescale    New size: 15; reason: Current number of replicas below Spec.MinReplicas
```

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

**Special notes for your reviewer**:

**Release note**:

```release-note
hpa: Prevent scaling below MinReplicas if desiredReplicas is zero
```
2017-07-17 13:23:47 -07:00
Kubernetes Submit Queue ce91f2ab26 Merge pull request #48909 from caesarxuchao/owners
Automatic merge from submit-queue

Add approvers to pkg/controller/garbagecollector

cc @deads2k
2017-07-17 08:49:23 -07:00
Klaus Ma 7e28a2cfd1 Added comments on not set node network/inode condition to unknown. 2017-07-17 21:34:28 +08:00
Jan Safranek 0eface85e4 PV controller: resync informers manually
We want relatively short resync period of PV/PVCs and at the same time we
don't want to force such short resync to all shared informer consumers.
Therefore we need to make our own periodic resync.
2017-07-17 13:39:08 +02: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
Johannes Würbach a99d988e3b
hpa: Prevent scaling below MinReplicas if desiredReplicas is zero 2017-07-17 09:32:06 +02:00
Klaus Ma 01097dba02 Renamed nodeutil to v1node. 2017-07-16 15:11:17 +08:00
Kubernetes Submit Queue a0519dfa08 Merge pull request #48030 from kargakis/revert-deployment-cleanup
Automatic merge from submit-queue (batch tested with PRs 44129, 48030, 48906)

controller: cleanup complete deployments only

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

@kubernetes/sig-apps-pr-reviews
2017-07-15 17:13:39 -07:00
Chao Xu 503852a1b5 add approvers to pkg/controller/garbagecollector 2017-07-13 15:16:17 -07:00
Mike Danese c201553f27 remove some people from OWNERS so they don't get reviews anymore
These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- bprashanth
- rjnagal
- vmarmol
2017-07-13 10:02:21 -07:00
FengyunPan dfc8b667a2 Fix parsing empty CIDR
Fix #48795
Checking ClusterCIDR and ServiceCIDR before parsing them.
2017-07-13 21:08:43 +08:00
Kubernetes Submit Queue 0a44e5b5c7 Merge pull request #47042 from gyliu513/event-count
Automatic merge from submit-queue (batch tested with PRs 48594, 47042, 48801, 48641, 48243)

Validated expected event numbers for damoncontroller test.

**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 #46629

**Special notes for your reviewer**:

**Release note**:

```release-note
none
```
2017-07-12 14:08:04 -07:00
Kubernetes Submit Queue 6d6b93986c Merge pull request #47952 from k82cn/k8s_47791
Automatic merge from submit-queue (batch tested with PRs 48279, 48566, 48319, 48794, 47952)

Added pod evictors for new zone.

**What this PR does / why we need it**:
Added pod evictors for new zone which was added manually.

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

**Release note**:
```release-note-none
```
2017-07-12 11:52:23 -07:00
Kubernetes Submit Queue 9e22353929 Merge pull request #48757 from codablock/fix_flake_46244
Automatic merge from submit-queue (batch tested with PRs 48672, 47140, 48709, 48786, 48757)

Fix flaky test Test_Run_OneVolumeAttachAndDetachMultipleNodesWithReadWriteMany

Only relying on the NewAttacher/Detacher call counts is not enough as they
happen in parallel to the testing/verification code and thus the actual
attaching/detaching may not be done yet, resulting in flaky test results.

Fixes #46244
2017-07-12 09:03:00 -07:00
Kubernetes Submit Queue b66be98174 Merge pull request #39173 from caesarxuchao/include-leaderelection
Automatic merge from submit-queue (batch tested with PRs 47232, 48625, 48613, 48567, 39173)

Include leaderelection in client-go; 

Fix #39117
Fix https://github.com/kubernetes/client-go/issues/28

This PR:
* includes the leaderelection to the staging client-go
* to avoid conflict with golang's testing package, renames package /testing to /testutil, and renames cache/testing to cache/testframework

```release-note
client-go now includes the leaderelection package
```
2017-07-12 00:10:20 -07:00
Michail Kargakis da1ff1c38e
controller: cleanup complete deployments only
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-07-11 19:20:14 +02:00
Alexander Block 61275ad8d4 Fix flaky test Test_Run_OneVolumeAttachAndDetachMultipleNodesWithReadWriteMany
Only relying on the NewAttacher/Detacher call counts is not enough as they
happen in parallel to the testing/verification code and thus the actual
attaching/detaching may not be done yet, resulting in flaky test results.

Fixes #46244
2017-07-11 18:21:50 +02:00
Klaus Ma 6d5e121292 Added pod evictors for new zone. 2017-07-10 22:53:14 +08:00
Dr. Stefan Schimanski da3322c2d9 apimachinery: remove unneeded GetObjectKind() impls 2017-07-08 18:37:37 +02:00
Chao Xu 65cedeeb43 update bazel 2017-07-07 19:04:26 -07:00
Chao Xu 24d5279c59 move leaderelection package to client-go 2017-07-07 17:01:04 -07:00
ravisantoshgudimetla 1ecc864f87 Changes for partial eviction flake 2017-07-07 10:42:03 -04:00
bonowang bbb0365d8d remove useless code 2017-07-07 17:59:44 +08:00
Kubernetes Submit Queue 7df2bce1ec Merge pull request #48269 from FengyunPan/add-gc-metric
Automatic merge from submit-queue (batch tested with PRs 48518, 48525, 48269)

Update comment for garbagecollector

Update comment for garbagecollector, update not exist func.

**Release note**:
```release-note
NONE
```
2017-07-06 13:34:46 -07:00
FengyunPan 154ab548f9 Cleanup useless metrics.go for garbagecollector
The metrics of garbagecollector are already published with the
workqueue metrics, so metrics.go is useless, let's cleanup it.
See https://github.com/kubernetes/client-go/blob/master/util/workqueue/metrics.go.
2017-07-06 09:51:39 +08:00
Kubernetes Submit Queue 54e7755775 Merge pull request #48383 from gyliu513/refactor-daemon
Automatic merge from submit-queue

Factored out simulate from nodeShouldRunDaemonPod.

Addressed comments from https://github.com/kubernetes/kubernetes/pull/48189#issuecomment-312223162



**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
```

/sig apps
2017-07-05 01:53:04 -07:00
xiangpengzhao d59c128904 Pods which exits and won't restart should not be in the Endpoints.NotReadyAddresses 2017-07-05 13:42:59 +08:00
Guangya Liu 58dce96947 Validated expected event numbers for damoncontroller test. 2017-07-05 11:39:48 +08:00
Guangya Liu cb7d74c677 Factored out simulate from nodeShouldRunDaemonPod.
Addressed comments from https://github.com/kubernetes/kubernetes/pull/48189#issuecomment-312223162
2017-07-05 09:42:55 +08:00
Kubernetes Submit Queue c662e1d7d8 Merge pull request #46949 from xingzhou/typo
Automatic merge from submit-queue

Fixed a comment typo

Typo fix

Fixed #48414 

**Release note**:
```
None
```
2017-07-03 11:33:36 -07:00
Kubernetes Submit Queue eb2a560679 Merge pull request #48189 from mikedanese/fixds
Automatic merge from submit-queue

support NoSchedule taints correctly in DaemonSet controller

Fixes https://github.com/kubernetes/kubernetes/issues/48190
```release-note
Support NoSchedule taints correctly in DaemonSet controller.
```
cc @kubernetes/sig-apps-pr-reviews
2017-07-03 08:46:32 -07:00
Kubernetes Submit Queue 3854388987 Merge pull request #48261 from FengyunPan/fix-removeFinalizer
Automatic merge from submit-queue (batch tested with PRs 43558, 48261, 42376, 46803, 47058)

Fix removing finalizer for garbage collector

The loop should use 'continue' not 'break', otherwise removeFinalizer()
not only removes "orphaningFinalizer" from its finalizers list but
also removes others.

Fix #48363

**Release note**:
```release-note
NONE
```
2017-06-30 16:28:43 -07:00
Kubernetes Submit Queue fcf6eea71c Merge pull request #47250 from xiangpengzhao/fix-headless
Automatic merge from submit-queue (batch tested with PRs 47850, 47835, 46197, 47250, 48284)

Populate endpoints for headless service with no ports

**What this PR does / why we need it**:
- populate endpoints with headless service (thanks @fraenkel for the original PR!)
- allow ports with headless service
- nits

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #32796 https://github.com/kubernetes/kubernetes/issues/32796#issuecomment-270462724

**Special notes for your reviewer**:
/cc @thockin @fraenkel 
**Release note**:

```release-note
NONE
```
2017-06-29 15:16:44 -07:00
FengyunPan 468b97a746 Update comment for garbagecollector 2017-06-29 21:42:47 +08:00
FengyunPan 23a90a7679 Fix removing finalizer for garbage collector
The loop should use 'continue' not 'break', otherwise removeFinalizer()
not only removes "orphaningFinalizer" from its finalizers list but
also removes others.
2017-06-29 17:22:03 +08:00
Mike Danese 8e6c2ea4d0 support NoExecute and NoSchedule taints correctly in DaemonSet controller
And add some unit tests.
2017-06-29 10:16:36 +02:00
Mike Danese 1aede99aba fix #45780 slightly differently 2017-06-29 10:16:36 +02:00
Mike Danese d462b4cbc8 Partially revert "Do not fire InsufficientResourceError when there are intentional reasons."
This partially reverts commit 2b311fefba.
We drop the changes to the DaemonSet controller but leave the test. By
reverting the changes, we make it easier to return different values of
shouldContinueRunning for intentional predicate failures, rather then
lumping all intentional predicate failures together. The test should
continue to pass after the fix.
2017-06-29 10:16:36 +02:00
Kubernetes Submit Queue 37c9367abe Merge pull request #47014 from boingram/deletePod-handler-shouldnt-set-owner-refs
Automatic merge from submit-queue

deletePod handler in the deployment controller shouldn't set owner refs

**What this PR does / why we need it**:
This PR stops the deletePod handler in the deployment controller from adopting replica sets when determining if a deployment needs to be requeued. It leaves this logic to the replication loop, removing the replica set adoption side effect.

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

**Special notes for your reviewer**:
@kargakis PR for delete pod handler setting owner refs issue

**Release note**:

```release-note
```
2017-06-28 14:45:29 -07:00
xiangpengzhao 9e31eb280a Populate endpoints and allow ports with headless service 2017-06-28 11:15:51 +08:00
Kubernetes Submit Queue c30f5e1d3c Merge pull request #46761 from yastij/syncService-remove-copy
Automatic merge from submit-queue (batch tested with PRs 48106, 46761)

removing unnecessary shallow copy on SyncService

**What this PR does / why we need it**: remove shallow copy + avoid using same index name as the nested loop

**Which issue this PR fixes**: fixes #46703 

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-27 15:02:00 -07:00
Kubernetes Submit Queue d19a2841e3 Merge pull request #47645 from jsafrane/integration-test-speedup
Automatic merge from submit-queue (batch tested with PRs 48139, 48042, 47645, 48054, 48003)

Speed up attach/detach controller integration tests

Internal attach/detach controller timers should be configurable and tests should use much shorter values.

`reconcilerSyncDuration` is deliberately left out of `TimerConfig` because it's the only one that's not a constant one, it's configurable by user.

Fixes #47129 

Before:
```
--- PASS: TestPodDeletionWithDswp (63.21s)
--- PASS: TestPodUpdateWithWithADC (13.68s)
--- PASS: TestPodUpdateWithKeepTerminatedPodVolumes (13.55s)
--- PASS: TestPodAddedByDswp (183.01s)
--- PASS: TestPersistentVolumeRecycler (12.55s)
--- PASS: TestPersistentVolumeDeleter (12.54s)
--- PASS: TestPersistentVolumeBindRace (3.51s)
--- PASS: TestPersistentVolumeClaimLabelSelector (12.50s)
--- PASS: TestPersistentVolumeClaimLabelSelectorMatchExpressions (12.54s)
--- PASS: TestPersistentVolumeMultiPVs (3.05s)
--- PASS: TestPersistentVolumeMultiPVsPVCs (4.36s)
--- PASS: TestPersistentVolumeControllerStartup (7.29s)
--- PASS: TestPersistentVolumeProvisionMultiPVCs (5.02s)
--- PASS: TestPersistentVolumeMultiPVsDiffAccessModes (12.48s)
ok  	k8s.io/kubernetes/test/integration/volume	359.727s
```

After:
```
--- PASS: TestPodDeletionWithDswp (3.71s)
--- PASS: TestPodUpdateWithWithADC (3.63s)
--- PASS: TestPodUpdateWithKeepTerminatedPodVolumes (3.70s)
--- PASS: TestPodAddedByDswp (5.68s)
--- PASS: TestPersistentVolumeRecycler (12.54s)
--- PASS: TestPersistentVolumeDeleter (12.55s)
--- PASS: TestPersistentVolumeBindRace (3.55s)
--- PASS: TestPersistentVolumeClaimLabelSelector (12.50s)
--- PASS: TestPersistentVolumeClaimLabelSelectorMatchExpressions (12.52s)
--- PASS: TestPersistentVolumeMultiPVs (3.98s)
--- PASS: TestPersistentVolumeMultiPVsPVCs (3.85s)
--- PASS: TestPersistentVolumeControllerStartup (7.18s)
--- PASS: TestPersistentVolumeProvisionMultiPVCs (5.23s)
--- PASS: TestPersistentVolumeMultiPVsDiffAccessModes (12.48s)
ok  	k8s.io/kubernetes/test/integration/volume	103.267s
```

PV controller tests are the slowest ones now.

@kubernetes/sig-storage-pr-reviews 
/assign @gnufied 

```release-note
NONE
```
2017-06-27 14:08:17 -07:00
Andreas Kohn 9ea1220c6f Fix typo 2017-06-27 16:52:16 +02:00
Kubernetes Submit Queue 6d1da16456 Merge pull request #47731 from jsravn/use-endpoints-cache-for-endpoint-controller
Automatic merge from submit-queue

Use endpoints informer for the endpoint controller

This substantially reduces the number of API calls made by the endpoint
controller. Currently the controller makes an API call per endpoint for
each service that is synced. When the 30s resync is triggered, this
results in an API call for every single endpoint in the cluster. This
quickly exceeds the default qps/burst limit of 20/30 even in small
clusters, leading to delays in endpoint updates.

This change modifies the controller to use the endpoint informer cache
for all endpoint GETs. This means we only make API calls for changes in
endpoints. As a result, qps only depends on the pod activity in the
cluster, rather than the number of services.



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

Address endpoint update delays as described in https://github.com/kubernetes/kubernetes/issues/47597.

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

https://github.com/kubernetes/kubernetes/issues/47597

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-27 05:20:12 -07:00
James Ravn 9fc5a547ae Use endpoints informer for the endpoint controller
This substantially reduces the number of API calls made by the endpoint
controller. Currently the controller makes an API call per endpoint for
each service that is synced. When the 30s resync is triggered, this
results in an API call for every single endpoint in the cluster. This
quickly exceeds the default qps/burst limit of 20/30 even in small
clusters, leading to delays in endpoint updates.

This change modifies the controller to use the endpoint informer cache
for all endpoint GETs. This means we only make API calls for changes in
endpoints. As a result, qps only depends on the pod activity in the
cluster, rather than the number of services.
2017-06-27 10:17:09 +01:00
Kubernetes Submit Queue 6a28658ca1 Merge pull request #44058 from caesarxuchao/background-cascading
Automatic merge from submit-queue (batch tested with PRs 44058, 48085, 48077, 48076, 47823)

Make background garbage collection cascading

Fix #44046, fix #47843 where user reported that the garbage collector didn't delete pods when a deployment was deleted with PropagationPolicy=Background.

The cause is that when propagating background garbage collection request, the garbage collector deletes dependents with DeleteOptions.PropagationPolicy=nil, which means the default GC policy of a resource (defined by its REST strategy) and the existing GC-related finalizers will decide how the delete request is propagated further. Unfortunately, the default GC policy for RS is orphaning, so the pods are behind when a deployment is deleted.

This PR changes the garbage collector to delete dependents with DeleteOptions.PropagationPolicy=Background when the owner is deleted in background. This means the dependent's existing GC finalizers will be overridden, making orphaning less flexible (see this made-up [case](https://github.com/kubernetes/kubeadm/issues/149#issuecomment-278942012)). I think sacrificing the flexibility of orphaning is worthwhile, because making the behavior of background garbage collection matching users' expectation is more important.

cc @lavalamp @kargakis @krmayankk @enisoc 

```release-note
The garbage collector now cascades deletion properly when deleting an object with propagationPolicy="background". This resolves issue [#44046](https://github.com/kubernetes/kubernetes/issues/44046), so that when a deployment is deleted with propagationPolicy="background", the garbage collector ensures dependent pods are deleted as well.
```
2017-06-26 15:29:25 -07:00
Chao Xu 229ae59e73 garbage collector controller propagates DeletePropagationForeground
policy if the object doesn't already have finalizers.
2017-06-26 09:53:03 -07:00
Shyam Jeedigunta f0fb21e411 Retry service syncs with exponential backoff in endpoints-controller 2017-06-26 13:35:46 +02:00
Kubernetes Submit Queue e28f7b47da Merge pull request #47788 from shyamjvs/resync-period-ep-controller
Automatic merge from submit-queue

Get rid of 30s ResyncPeriod in endpoint controller

Ref: #47597 
This should fix one of the demons of endpoint controller.

/cc @smarterclayton @gmarek
2017-06-26 04:20:12 -07:00
Chao Xu 31d0869f83 revert 45764 2017-06-25 21:41:10 -07: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
Jun Xiang Tee ae4df9f573 deprecate created-by annotation for cronjob 2017-06-23 11:05:40 -07:00