Commit Graph

3356 Commits (56dc8f9a6ab09debeddf5349ee26730d3e9107f8)

Author SHA1 Message Date
Tomas Nozicka f6af1904cd Make StatefulSet report an event when recreating failed pod 2017-11-09 12:23:37 +01:00
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski d13b936a2a pkg/apis/core: fixup conversion func names in dependencies 2017-11-09 12:14:07 +01:00
Kubernetes Submit Queue 3e315aa0f8
Merge pull request #49429 from enisoc/dedup-rc-rs
Automatic merge from submit-queue (batch tested with PRs 54773, 52523, 47497, 55356, 49429). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Deduplicate RC/RS controller code.

The code was already 99% similar between RC and RS. This is a wild idea to try to deduplicate the two controllers in a type-safe manner without adding tons of boilerplate, and without using code generation.

They are still separate resources and separate worker pools. This is a refactor that isn't intended to change any behavior.

```release-note
ReplicationController now shares its underlying controller implementation with ReplicaSet to reduce the maintenance burden going forward. However, they are still separate resources and there should be no externally visible effects from this change.
```

ref #49429
2017-11-08 22:12:03 -08:00
Josh Horwitz 26f9dd7b3e generated files 2017-11-08 21:57:56 -05:00
Josh Horwitz c8a12b8045 Fixes service controller update race condition 2017-11-08 21:57:51 -05:00
houjun f49634719c Should return when claim.Spec.VolumeName is null 2017-11-09 10:47:04 +08:00
Kubernetes Submit Queue a701a42a82
Merge pull request #49763 from supereagle/versioned-group-clients
Automatic merge from submit-queue (batch tested with PRs 55331, 55272, 55228, 49763, 55242). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

use versiond group clients from client-go

**What this PR does / why we need it**:
Some **Deprecated** group clients are still used, replace them with versioned group clients.

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

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

**Release note**:
```release-note
NONE
```
2017-11-08 17:13:27 -08:00
Kubernetes Submit Queue e9f7970caa
Merge pull request #51124 from huzhengchuan/clm-node-updateaddress
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Node which is not present not need update NodeAddress

**What this PR does / why we need it**:
when the node is not exist according to cloud provider. there is no need to update node address better. 
finally the node will be delete  in https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/cloud/node_controller.go#L240


**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
```
2017-11-08 12:18:44 -08:00
Bartlomiej Antoniak 2a457a941c #50598: Added NodeAffinity test case for nodeShouldRunDaemonPod 2017-11-08 13:35:12 +01:00
Bartlomiej Antoniak 2ee936a0ca #50598: Formatted code using gofmt 2017-11-08 09:33:09 +01:00
xiangpengzhao cf28da9987 Use go native func after upgrading to go1.9 2017-11-08 12:18:55 +08:00
Kubernetes Submit Queue 42d5dc709e
Merge pull request #55259 from ironcladlou/gc-partial-discovery
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Tolerate partial discovery in garbage collector

Allow the garbage collector to tolerate partial discovery failures. On a
partial failure, use whatever was discovered, log the failures, and
allow the resync logic to try again later.

Fixes #55022.

```release-note
API discovery failures no longer crash the kube controller manager via the garbage collector.
```

/cc @caesarxuchao
2017-11-07 18:53:51 -08:00
Anthony Yeh 97cef269bf
RC/RS dedup: Add protection against future RS versions. 2017-11-07 14:55:47 -08:00
Anthony Yeh eaa671727c
Add enisoc to RC/RS OWNERS. 2017-11-07 14:48:32 -08:00
Anthony Yeh 2c7ef5ad4f
Deduplicate RC/RS controller code.
The code was already 99% similar between RC and RS.
This is a wild idea to try to deduplicate the two controllers
in a type-safe manner without adding tons of boilerplate,
and without using code generation.

They are still separate resources. This is a refactor that isn't
intended to change any behavior.
2017-11-07 14:48:32 -08:00
Dan Mace c3dd82c30c Tolerate partial discovery in garbage collector
Allow the garbage collector to tolerate partial discovery failures. On a
partial failure, use whatever was discovered, log the failures, and
allow the resync logic to try again later.

Fixes #55022.
2017-11-07 16:54:49 -05:00
Kubernetes Submit Queue 576c9118a6
Merge pull request #53592 from frodenas/bootstrap-controller
Automatic merge from submit-queue (batch tested with PRs 53592, 52562, 55175, 55213). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Check RegisterMetricAndTrackRateLimiterUsage error when starting BootstrapSigner & TokenCleaner controllers

**What this PR does / why we need it**:
Prevent `BootstrapSigner` and `TokenCleaner` controllers to start if `metrics.RegisterMetricAndTrackRateLimiterUsage` returns an error.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-07 11:21:15 -08:00
Bartłomiej Antoniak f52ae0a68f
Update daemon_controller_test.go
Formatting
2017-11-07 19:48:18 +01:00
Bartlomiej Antoniak 6b47e444a0 #50598: Removed obsolete volume mount in TestNodeShouldRunDaemonPod 2017-11-07 14:01:42 +01:00
Bartlomiej Antoniak d290996e75 #50598: Added more test cases for nodeShouldRunDaemonPod 2017-11-07 13:31:20 +01:00
supereagle b694d51842 use versiond group clients from client-go 2017-11-07 14:47:22 +08:00
Di Xu 13a355c837 refactor method to pkg/util/node 2017-11-06 09:51:09 +08:00
Kubernetes Submit Queue 85877a5aa1
Merge pull request #54523 from jekohk/sync-rollout-status-add-unit-tests
Automatic merge from submit-queue (batch tested with PRs 55063, 54523, 55053). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

unit tests for syncRolloutStatus in pkg/controller/deployment

**What this PR does / why we need it**:
Adds unit tests for syncRolloutStatus func in controller/deployment package.

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

**Release note**:

```release-note
NONE
```
2017-11-03 10:00:12 -07:00
chenpengdev 3429d8950b
fix exported method run's comment 2017-11-03 22:40:03 +08:00
zhengchuan hu 8ef7265802 Nods which is not present not need updateAddress 2017-11-03 16:00:10 +08:00
Kubernetes Submit Queue 47e8c93e45
Merge pull request #54185 from crimsonfaith91/sync
Automatic merge from submit-queue (batch tested with PRs 54042, 54185, 54880). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

refactor ReplicaSet sync call tree

**What this PR does / why we need it**:
This PR refactors ReplicaSet sync call tree by refactoring `manageReplicas` and `syncReplicaSet` functions into smaller functions, and adding unit tests to each of the smaller functions.

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

**Release note**:

```release-note
NONE
```
**TODO**:
- `manageReplicas`
  - [x] move both outer and inner `batchSize` loops to a helper function named `slowStartBatch`, and test the function
  - [x] add a helper function returning a list named `podsToDelete`, test the function, and refactor `DeletePod` loop to use the list
  - [x] refactor skipped pod handling such that it happens after `slowStartBatch` returns

- `syncReplicaSet`
  - [x] add unit tests for `calculateStatus`
  - [x] move `canAdoptFunc` to a helper function
2017-11-01 19:38:13 -07:00
Kubernetes Submit Queue 27448b4611
Merge pull request #54828 from freehan/endpoint-controller-fix
Automatic merge from submit-queue (batch tested with PRs 54894, 54630, 54828, 54926, 54865). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

trigger endpoint update on pod deletion

Fixes #54723

cc: @joelsmith 

```release-note
Fix a bug where pod address is not removed from endpoints object while pod is in graceful termination.
```
2017-11-01 17:52:21 -07:00
Kubernetes Submit Queue 443908193d
Merge pull request #54652 from msau42/update-owners
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update volume OWNERS to reflect active sig-storage reviewers

**What this PR does / why we need it**:
Update sig-storage reviewers to add new members and remove those that don't have as much time to review storage PRs.   Approvers are unchanged.

**Special notes for your reviewer**:
For all those that have been removed, please approve.  If you want to remain as a reviewer, let me know and I will add you back.

**Release note**:
NONE
2017-11-01 16:30:32 -07:00
Jun Xiang Tee d25af7bb53 refactor replicaset sync call tree 2017-11-01 16:16:19 -07:00
John Kelly cb98157834 pkg/controller/deployment: syncRolloutStatus additional unit test case
Added additional test case that exercises fix #53614 or npe when scaling --replicas=0
Moved creation of clientset and deployment controller objects inside test loop since it's mutated every time an API action happens.

Signed-off-by: John Kelly <jekohk@gmail.com>
2017-11-01 16:17:24 -04:00
John Kelly 9bf61e72b8 pkg/controller/deployment: unit tests for syncRolloutStatus
Created unit tests for syncRolloutStatus function in the deployment package.
Tests for syncRolloutStatus have brought the overall test coverage of deployment/progress to 82.1%.

Signed-off-by: John Kelly <jekohk@gmail.com>
2017-11-01 16:17:24 -04:00
Ferran Rodenas d67898b875 Check RegisterMetricAndTrackRateLimiterUsage error when starting controllers
Signed-off-by: Ferran Rodenas <rodenasf@vmware.com>
2017-11-01 12:46:07 +01:00
guangxuli cb73ab2b07 The printing level for node updated failed info should be used WARNING type
just use Warning instead of Warningf
2017-11-01 16:54:49 +08:00
Kubernetes Submit Queue ed00d9c062
Merge pull request #54445 from crimsonfaith91/rem
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove created-by annotation

**What this PR does / why we need it**:
This PR removes `CreatedByAnnotation`.

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

**Release note**:

```release-note
The `kubernetes.io/created-by` annotation is no longer added to controller-created objects. Use the  `metadata.ownerReferences` item that has `controller` set to `true` to determine which controller, if any, owns an object.
```
2017-10-31 20:10:21 -07:00
Kubernetes Submit Queue 3c6ff87fa5
Merge pull request #52192 from liyinan926/ds-tests
Automatic merge from submit-queue (batch tested with PRs 54774, 54820, 52192, 54827). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Initial integration test setup for DaemonSet controller

**What this PR does / why we need it**:
This PR setup and added some initial integration tests for the DaemonSet controller. All tests included were ported from their unit test counterparts that currently use fake client, informers, reactor, etc. Future PRs will port more tests over once this PR is approved and merged.

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

**Special notes for your reviewer**:
@kow3ns 

**Release note**:
```release-note
NONE
```
2017-10-31 13:22:20 -07:00
Minhan Xia 5f4145f3de trigger endpoint update on pod deletion 2017-10-31 10:59:37 -07:00
Yinan Li 4dc42d078b Initial integration test setup for DaemonSet controller 2017-10-31 10:53:30 -07:00
Jun Xiang Tee efbfead4ef remove created-by annotation 2017-10-30 12:49:44 -07:00
Dr. Stefan Schimanski 2b201ead11 Fix and update comment with api.Scheme 2017-10-30 19:54:02 +01:00
Kubernetes Submit Queue cadcb62065
Merge pull request #54644 from brendandburns/node-label
Automatic merge from submit-queue (batch tested with PRs 54644, 53072). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Flag gate node exclusion for service load balancers.

@thockin @jdumars 

```release-note
Add a new feature gate for enabling an alpha annotation which, if present, excludes the annotated node from being added to a service load balancers.
```

Issue: https://github.com/kubernetes/kubernetes/issues/54743

Notes:
The original PR for this feature was: https://github.com/kubernetes/kubernetes/pull/53146

Which didn't include a gate (or the alpha label).

This was refined to add the `alpha` label in:
https://github.com/kubernetes/kubernetes/pull/53678

Then in the cherry-pick review:
https://github.com/kubernetes/kubernetes/pull/53656#issuecomment-335693646

@thockin requested a gate for an alpha feature, which is this PR.
2017-10-28 07:26:24 -07:00
Brendan Burns a71f757148 wqFlag gate node exclusion for service load balancers. 2017-10-28 03:44:46 +00:00
Kubernetes Submit Queue 27ef37a32d
Merge pull request #54320 from derekwaynecarr/quota-update
Automatic merge from submit-queue (batch tested with PRs 54331, 54655, 54320, 54639, 54288). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Ability to do object count quota for all namespaced resources

**What this PR does / why we need it**:
- Defines syntax for generic object count quota `count/<resource>.<group>`
- Migrates existing objects to support new syntax with old syntax
- Adds support to quota all standard namespace resources 
- Updates the controller to do discovery and replenishment on those resources
- Updates unit tests
- Tweaks admission configuration around quota
- Add e2e test for replicasets (demonstrate dynamic generic counting)

```
$  kubectl create quota test --hard=count/deployments.extensions=2,count/replicasets.extensions=4,count/pods=3,count/secrets=4
resourcequota "test" created
$ kubectl run nginx --image=nginx --replicas=2
$ kubectl describe quota
Name:                         test
Namespace:                    default
Resource                      Used  Hard
--------                      ----  ----
count/deployments.extensions  1     2
count/pods                    2     3
count/replicasets.extensions  1     4
count/secrets                 1     4
```

**Special notes for your reviewer**:
- simple object count quotas no longer require writing code
- deferring support for custom resources pending investigation about how to share caches with garbage collector.  in addition, i would like to see how this integrates with downstream quota usage in openshift.

**Release note**:
```release-note
Object count quotas supported on all standard resources using `count/<resource>.<group>` syntax
```
2017-10-27 15:42:24 -07:00
Robert Pothier ef8936ce6a Updating NewCIDRSet return value
for IPv6, NewCIDRSet was updated to return an error if the subnet mask size
is too big. In this case, NewCIDRSet will fail and return an error.
2017-10-27 13:52:12 -04:00
Kubernetes Submit Queue 4eadfbb30e
Merge pull request #52891 from hzxuzhonghu/cert-controller
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove duplicated code 

**What this PR does / why we need it**:
remove duplicated code

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

handler initiated twice.

```
	cc := &CertificateController{
		kubeClient: kubeClient,
		queue:      workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "certificate"),
		handler:    handler,
	}

      cc.handler = handler 
```
**Release note**:

```release-note
NONE
```
2017-10-27 09:11:21 -07:00
Derek Carr 7f88e91892 Update quota controller to monitor all types 2017-10-27 11:07:53 -04:00
hzxuzhonghu ddbbbfceff remove redundant code 2017-10-27 15:49:08 +08:00
Kevin 4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Michelle Au 7d1e279d3b Update volume OWNERS to reflect active sig-storage reviewers 2017-10-26 13:26:33 -07:00
Kubernetes Submit Queue 93e6f08772 Merge pull request #53946 from ghostcloud-cn/initializer
Automatic merge from submit-queue (batch tested with PRs 53946, 53993, 54315, 54143, 54532). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update many misspelled word initializer

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

fix misspelled word initalizer

**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
```
2017-10-25 21:20:25 -07:00
Kubernetes Submit Queue 38cb56900a Merge pull request #48996 from k82cn/remove_nc_old_code
Automatic merge from submit-queue (batch tested with PRs 53760, 48996, 51267, 54414). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Removed compatibality code for kubelet 1.2.

**What this PR does / why we need it**:
The next release is 1.8, it's time to remove the backward compatibility code for kubelet 1.2.

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

**Release note**:
```release-note
The NodeController will not support kubelet 1.2.
```
2017-10-25 17:37:04 -07:00
Kubernetes Submit Queue 8f505e4c86 Merge pull request #54341 from athampy/gh-54339
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove redundant call to StartLogging in service_controller. Fixes #5…

…4339



**What this PR does / why we need it**:
Removes redundant call to StartLogging introduced in 96b48d4#diff-1f7f903e25ab8bcbc514bb1e532e997e

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-10-25 13:22:50 -07:00
Kubernetes Submit Queue 01374839b0 Merge pull request #53196 from FengyunPan/lb-empty-node
Automatic merge from submit-queue (batch tested with PRs 52868, 53196, 54207). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Check the count of cloud node for LoadBalancer service

If there is no available node for LoadBalancer service, the LoadBlancer
service will become unavailable, we should update service status.
This is part of #53193
**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)*: 
xref #53193

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-10-25 12:32:18 -07:00
Kubernetes Submit Queue ee9983355e Merge pull request #54500 from MrHohn/service-controller-more-logging
Automatic merge from submit-queue (batch tested with PRs 54366, 54500). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Service controller / gce loadbalancer logging cleanup

**What this PR does / why we need it**:
From https://github.com/kubernetes/kubernetes/issues/52495, while looking into the potential scalability issue service controller may have, I found it really hard to debug as the log sometimes doesn't reference which LB it is for, or sometimes it just doesn't log at all. It get even harder that in correctness CIs we reduce verbose level to v1:
67bc30718f/jobs/env/ci-kubernetes-e2e-gce-scale-correctness.env (L16).

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

**Special notes for your reviewer**:
/assign @nicksardo @bowei 
cc @shyamjvs 

**Release note**:

```release-note
NONE
```
2017-10-24 16:54:02 -07:00
Kubernetes Submit Queue 4ca155cbc1 Merge pull request #54184 from MrHohn/fix-service-controller-retry
Automatic merge from submit-queue (batch tested with PRs 54107, 54184, 54377, 54094, 54111). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix retry logic in service controller

**What this PR does / why we need it**: Make service controller don't retry on doNotRetry service update failure.

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

**Special notes for your reviewer**:
/assign @nicksardo @bowei 

**Release note**:

```release-note
NONE
```
2017-10-24 15:59:06 -07:00
Kubernetes Submit Queue 039f1565e6 Merge pull request #54427 from bowei/owners
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Missed approvers for controller/service

```release-note
NONE
```
2017-10-24 14:16:48 -07:00
Zihong Zheng e3eac372f0 service_controller: Include service key in error messages 2017-10-24 10:51:15 -07:00
Kubernetes Submit Queue 8d3e39d1af Merge pull request #54401 from k82cn/node_ctrl_reviewer
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Volunteer to be reviewer of NodeController.

**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-10-24 07:39:19 -07:00
Klaus Ma 998e544d31 Removed compatibality code for kubelet 1.2. 2017-10-24 09:05:50 +08:00
Kubernetes Submit Queue 424c4b90d4 Merge pull request #54402 from k82cn/reviewer_of_daemonset
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Volunteer to be reviewer of DaemonSet

**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-10-23 17:16:09 -07:00
Kubernetes Submit Queue 9b8d70dc42 Merge pull request #54426 from mikedanese/csr1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

certs: remove always nil error from New signature

```release-note-none
```
2017-10-23 14:36:18 -07:00
Kubernetes Submit Queue ca8d97d673 Merge pull request #53743 from DirectXMan12/feature/polymorphic-scale-client
Automatic merge from submit-queue (batch tested with PRs 53743, 53564). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Polymorphic Scale Client

This PR introduces a polymorphic scale client based on discovery information that's able to scale scalable resources in arbitrary group-versions, as long as they present the scale subresource in their discovery information.

Currently, it supports `extensions/v1beta1.Scale` and `autoscaling/v1.Scale`, but supporting other versions of scale if/when we produce them should be fairly trivial.

It also updates the HPA to use this client, meaning the HPA will now work on any scalable resource, not just things in the `extensions/v1beta1` API group.

**Release note**:
```release-note
Introduces a polymorphic scale client, allowing HorizontalPodAutoscalers to properly function on scalable resources in any API group.
```

Unblocks #29698
Unblocks #38756
Unblocks #49504 
Fixes #38810
2017-10-23 13:39:07 -07:00
Mike Danese 1181a88cf2 certs: remove always nil error from New signature 2017-10-23 11:43:08 -07:00
Bowei Du 65e6e08f09 Missed approvers for controller/service 2017-10-23 11:34:49 -07:00
Klaus Ma 63fa1464a5 Volunteer to be reviewer of DaemonSet 2017-10-23 06:32:21 -05:00
Klaus Ma 28bd693487 Volunteer to be reviewer of NodeController. 2017-10-23 06:30:01 -05:00
Hardik Dodiya 11b1c373f1 Bugfix: Update AddNodeaHandler error logs 2017-10-23 13:29:01 +05:30
Akhil Thampy 572b1c2db9 Remove redundant call to StartLogging in service_controller. Fixes #54339 2017-10-21 11:45:48 -05:00
Kubernetes Submit Queue 912e6f86e4 Merge pull request #51402 from hzxuzhonghu/event-broadcaster
Automatic merge from submit-queue (batch tested with PRs 51402, 54283). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add event broadcaster logging for all contoller managers

**What this PR does / why we need it**:
add event broadcaster logging for controller -manager, and it help debug/trace resource status directly.
 
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #51400

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-20 08:06:14 -07:00
Kubernetes Submit Queue be606bc5a7 Merge pull request #53447 from yastij/nodecontroller-clean-backwards-newNodecontroller
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

cleaning newNodeController from unsupported kubelet version

**What this PR does / why we need it**: this part of the #52356 effort

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-10-20 04:19:28 -07:00
FengyunPan 3cf89a5de7 Check the count of cloud node for LoadBalancer service
If there is no available node for LoadBalancer service, the LoadBlancer
service will become unavailable, we should update service status.
This is part of #53193
2017-10-20 12:04:02 +08:00
Yassine TIJANI 27d80eb76c cleaning newNodeController from unsupported kubelet version 2017-10-19 22:27:50 +02:00
Kubernetes Submit Queue 44f898067b Merge pull request #54244 from gnufied/fix-log-spam-from-node-status
Automatic merge from submit-queue (batch tested with PRs 53809, 54244, 54142). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fixes spam from node status updates

Some of us are looking at reducing unncessary logging spam which happens in k8s.  This message is anyway logged by caller of the function and hence we should not log it again.

cc @kubernetes/sig-storage-pr-reviews @eparis
2017-10-19 11:50:03 -07:00
Solly Ross d2b41120ea Make HPA controller use polymorphic scale client
This updates the HPA controller to use the polymorphic scale client from
client-go.  This should enable HPAs to work with arbitrary scalable
resources, instead of just those in the extensions API group (meaning we
can deprecate the copy of ReplicationController in extensions/v1beta1).
It also means that the HPA controller now pays attention to the
APIVersion field in `scaleTargetRef` (more specifically, the group part
of it).

Note that currently, discovery information on which resources are
available where is only fetched once (the first time that it's
requested).  In the future, we may want a refreshing discovery REST
mapper.
2017-10-19 13:21:02 -04:00
Hemant Kumar e3f0c8bb2d Fixes spam from node status updates
The same error is logged in 2 places which is unncessary.
2017-10-19 09:37:07 -04:00
Kubernetes Submit Queue 3c46e67c14 Merge pull request #54209 from hzxuzhonghu/route
Automatic merge from submit-queue (batch tested with PRs 52753, 54034, 53982, 54209). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

stopCh should be passed to route-controller main goroutine

**What this PR does / why we need it**:
currently neverstop channel is used, stopCh should be used
```
	go wait.NonSlidingUntil(func() {
		if err := rc.reconcileNodeRoutes(); err != nil {
			glog.Errorf("Couldn't reconcile node routes: %v", err)
		}
	}, syncPeriod, wait.NeverStop)
```
**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-10-19 02:45:25 -07:00
hzxuzhonghu 152a0a83f8 pass stop channel to route-controller main goroutine 2017-10-19 11:01:05 +08:00
hzxuzhonghu 96b48d4386 add event broadcaster logging for all contoller managers 2017-10-19 09:18:43 +08:00
Zihong Zheng 72542f5b82 Fix retry logic in service controller 2017-10-18 16:58:19 -07:00
Kubernetes Submit Queue 2d914ee703 Merge pull request #53984 from sttts/sttts-legacyscheme
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

pkg/api: extract Scheme/Registry/Codecs into pkg/api/legacyscheme

This serves as

- a preparation for the pkg/api->pkg/apis/core move
- and makes the dependency to the scheme explicit when vizualizing
  left depenncies.

The later helps with our our efforts to split up the monolithic repo
into self-contained sub-repos, e.g. for kubectl, controller-manager
and kube-apiserver in the future.
2017-10-18 10:49:10 -07:00
Dr. Stefan Schimanski cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Kubernetes Submit Queue 505ccb88da Merge pull request #54041 from malc0lm/rm-replenishmentControllers-Run
Automatic merge from submit-queue (batch tested with PRs 54030, 54041). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adjust replenishmentControllers in resource quota controller

**What this PR does / why we need it**:
Since replenishmentControllers was generated by ctx.InformerFactory, remove "replenishmentControllers []cache.Controller" which is never used, and it is needless to run replenishmentControllers which has ran in "ctx.InformerFactory.Start(ctx.Stop)". 
**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
```
2017-10-17 21:26:03 -07:00
Kubernetes Submit Queue 1d8f1e268f Merge pull request #47699 from supereagle/fix-typos
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix typos: remove duplicated word in comments

**What this PR does / why we need it**: Remove the duplicated word `the` in comments

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

**Special notes for your reviewer**:

```release-note
NONE
```
2017-10-17 02:35:52 -07:00
Malcolm Lee efdf99d09a Since replenishmentControllers was generated by ctx.InformerFactory, remove "replenishmentControllers []cache.Controller" which is never used. 2017-10-17 14:05:55 +08:00
Kubernetes Submit Queue 03cb11f020 Merge pull request #52275 from mattjmcnaughton/mattjmcnaughton/18155-hpa-tolerance-should-be-flag
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make HPA tolerance a flag

**What this PR does / why we need it**:
Make HPA tolerance configurable as a flag. This change allows us to use
different tolerance values in production/testing.

**Which issue this PR fixes**: 
Fixes #18155

**Release note:**
```release-note
Control HPA tolerance through the `horizontal-pod-autoscaler-tolerance` flag.
```

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-10-16 16:47:43 -07:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Xingcai Zhang 70f47a7975 Update many misspelled word initializer 2017-10-15 22:09:26 +08:00
Kubernetes Submit Queue 0ba7c52b8c Merge pull request #53458 from dims/fix-pkg-cmd-dependencies
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix pkg/ depends on cmd/ problems

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

Partial fix for https://github.com/kubernetes/kubernetes/issues/53341

**Special notes for your reviewer**:
No logic changes, Just moving things around

**Release note**:

```release-note
NONE
```
2017-10-13 23:56:55 -07:00
Kubernetes Submit Queue dcac65ae42 Merge pull request #53831 from gnufied/fix-multiattach-error-flake
Automatic merge from submit-queue (batch tested with PRs 51840, 53542, 53857, 53831, 53702). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix possible flake in multiattach unit test

It is possible that by the time we check for multiattach
error on node, the reconciler loop may not have processed second
volume and hence we are going to retry for multiattach error
on node before giving up and marking the test as failed.

Fixes https://github.com/openshift/origin/issues/16836
2017-10-13 12:44:55 -07:00
Kubernetes Submit Queue ea5cd00958 Merge pull request #51840 from jcbsmpsn/cleanup-csrs
Automatic merge from submit-queue (batch tested with PRs 51840, 53542, 53857, 53831, 53702). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

New controller to GC CSRs.

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

```release-note
Adds a new controller which automatically cleans up Certificate Signing Requests that are
Approved and Issued, or Denied.
```
2017-10-13 12:44:47 -07:00
Kubernetes Submit Queue f1d9962fec Merge pull request #53720 from shyamjvs/test-kubemark
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Optimize random string generator to avoid multiple locks & use bit-masking

Ref https://github.com/kubernetes/kubernetes/issues/53327

We recently started seeing a 50% decrease in scheduling throughput (for e.g in kubemark-500 scale job) and turns out https://github.com/kubernetes/kubernetes/pull/53135 introduced it.
The reason is [this call](2caae38d32/plugin/pkg/scheduler/algorithm/predicates/predicates.go (L272)) to create a random 32-length string.
From the code of the `rand` utility (which is being heavily used throughout the system for randomizing object names), I noticed following performance issues:
- to create an n-length string, we are making n calls to `rand.Intn()` each of which does a lock+unlock operation on the RNG.. while just 1 lock+unlock operation is enough for all
- we're choosing one character (from an alphabet of 27 chars) per each random integer.. while we can select 10 characters using a single int63 (by masking and bit-shifting) as 1 character uses just 5 bits of randomness
- the character set is defined as a global slice (mutable), so the compiler needs to fetch length of the slice on each invocation to `len()` (we're making n of those).. while we can just use a const string (immutable) which will make len directly available as a cached constant (yes, go does it!)

This PR is making the above fixes. I'll try to add some benchmarking to measure the difference (as @wojtek-t suggested).

/cc @kubernetes/sig-scalability-misc @kubernetes/sig-scheduling-bugs @kubernetes/sig-api-machinery-misc @wojtek-t @smarterclayton
2017-10-13 06:11:09 -07:00
Davanum Srinivas eda7fbd16a Ignore .import-restrictions when checking against generated docs 2017-10-13 07:09:38 -04:00
Davanum Srinivas 6d5e1d2bea Drop cmd/gke-certificates-controller from bazel build script 2017-10-13 07:06:21 -04:00
Davanum Srinivas a4574bbb04 Make sure pkg/controller/service does not depend on cmd/kubeadm/app 2017-10-13 07:06:21 -04:00
Hemant Kumar 68d417d7d8 Fix possibly flake in multiattach unit test
It is possible that by the time we check for multiattach
error on node, the reconciler loop may not have processed second
volume and hence we are going to retry for multiattach error
on node before giving up and marking the test as failed.
2017-10-12 16:27:54 -04:00
Shyam Jeedigunta c279a53ca0 Optimize random string generator to avoid multiple locks & use bitmasking 2017-10-12 19:13:17 +02:00
Kubernetes Submit Queue 3aff54f345 Merge pull request #53589 from sttts/sttts-pkg-api-testing
Automatic merge from submit-queue (batch tested with PRs 53204, 53364, 53559, 53589, 53088). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

pkg/api: move *_test.go -> pkg/api/testing

Cleaning up pkg/api, one little step towards pkg/apis/core.
2017-10-11 15:14:45 -07:00
Kubernetes Submit Queue efd6e6a50d Merge pull request #53517 from andrewsykim/improve-ccm-logging
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Log when node is initialized in cloud controller manager

**What this PR does / why we need it**:
Always logs when a node is successfully initialized and raises log level for adding node labels to new nodes. This is useful since the only way to know if CCM is working properly is to check for the taint `node.cloudprovider.kubernetes.io/uninitialized`. 

**Release note**:

```release-note
Log when node is successfully initialized by Cloud Controller Manager
```

cc @luxas @wlan0 @jhorwit2
2017-10-11 10:43:58 -07:00
Kubernetes Submit Queue 93b3469a1f Merge pull request #53690 from mattjmcnaughton/mattjmcnaughton/53670-fix-hpa-scaling-above-max-replicas
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix hpa scaling above max replicas w/ scaleUpLimit

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

Fix a bug where `desiredReplicas` could be greater than `maxReplicas`
if the original value for `desiredReplicas > scaleUpLimit` and
`scaleUpLimit > maxReplicas`. Previously, when that happened, we would
scale up to `scaleUpLimit`, and then in the next auto-scaling run, scale
down to `maxReplicas`. Address this issue and introduce a regression
test.

**Which issue this PR fixes**

fixes #53670

**Release note**:
```release-note
Address a bug which allowed the horizontal pod autoscaler to allocate `desiredReplicas` > `maxReplicas` in certain instances.
```
2017-10-11 08:53:01 -07:00
Kubernetes Submit Queue bd5eeb1073 Merge pull request #52765 from lichen2013/chenli
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Using assertions in Unit tests

Using assertions:

1. cmd/kube-controller-manager/app/controller_manager_test.go
2. pkg/controller/bootstrap/jws_test.go
3. pkg/controller/cloud/node_controller_test.go
4. pkg/controller/controller_utils_test.go

Partially fix https://github.com/kubernetes/kubernetes/issues/43788
2017-10-11 07:42:45 -07:00
Dr. Stefan Schimanski 9488150762 SimpleNameGenerator: unify to use k8s.io/apiserver/pkg/storage/names 2017-10-11 16:05:52 +02:00
Kubernetes Submit Queue 7810eb8da0 Merge pull request #52402 from yastij/nodecontroller-clean-backwards
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

cleaning node controller from code for unsupported versions

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-10-11 06:10:54 -07:00
mattjmcnaughton 75c38777ad Fix hpa scaling above max replicas w/ scaleUpLimit
Fix #53670

Fix a bug where `desiredReplicas` could be greater than `maxReplicas`
if the original value for `desiredReplicas > scaleUpLimit` and
`scaleUpLimit > maxReplicas`. Previously, when that happened, we would
scale up to `scaleUpLimit`, and then in the next auto-scaling run, scale
down to `maxReplicas`. Address this issue and introduce a regression
test.
2017-10-11 08:35:31 -04:00
Kubernetes Submit Queue 7f418a011f Merge pull request #52033 from aanm/50395-removing-max-prefix-length-ipv6-cidr
Automatic merge from submit-queue (batch tested with PRs 52520, 52033, 53626, 50478). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Removed the IPv6 prefix size limit for cluster-cidr

Fixes #50395

/sig network
/area ipv6

cc @rpothier
2017-10-11 01:41:37 -07:00
Chen Li fb9b29dbb1 Using assertions
Using assertions for unit tests:

1. cmd/kube-controller-manager/app/controller_manager_test.go
2. pkg/controller/bootstrap/jws_test.go
3. pkg/controller/cloud/node_controller_test.go
4. pkg/controller/controller_utils_test.go
2017-10-10 22:44:12 -05:00
Kubernetes Submit Queue f3b6fb7add Merge pull request #53682 from gnufied/fix-lock-usage-desired-state-world
Automatic merge from submit-queue (batch tested with PRs 53678, 53677, 53682, 53673). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make sure we use rwlocks not just RLock

We need to use of rwlock for updating the desired state of world. I think `-race` flag doesn't detects this consistently.

Fixes #53590
2017-10-10 18:36:05 -07:00
Hemant Kumar 414c3104ca Make sure we use rwlocks not just RLock 2017-10-10 17:52:55 -04:00
Kubernetes Submit Queue 9bf83135ab Merge pull request #52354 from crimsonfaith91/rs-unit
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove replicaset unit tests that are converted to integration tests

**What this PR does / why we need it**:
This PR revamps existing replicaset unit tests by removing the tests that have been converted to integration tests.

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

**Release note**:

```release-note
NONE
```
2017-10-10 14:51:14 -07:00
Yassine TIJANI c446aa0e63 cleaning node controller from code that ensures backward compatibility for unsupported versions 2017-10-10 19:15:40 +02:00
Kubernetes Submit Queue 5f57dc8847 Merge pull request #53614 from dims/fix-npe-replicas-set-to-zero
Automatic merge from submit-queue (batch tested with PRs 53477, 53614). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix potential problem when scaling --replicas=0

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

We have defensive code for checking if newRS != nil for
DeploymentProgressing and DeploymentTimedOut but not for
DeploymentComplete. Let's add the check here as well as
this problem was seen in the wild.

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

Fixes #53613 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-10 10:01:41 -07:00
mattjmcnaughton dd5be2a882 Make unnecessary hpa public funcs private
Previously
`pkg.controller.podautoscaler.UnsafeConvertToVersion` was
exported. However, it was never used outside of the `podautoscaler`
package. Make it private to prevent confusion.

Additionally, move the two private functions in `horizontal.go` to be
with the other private functions at the bottom of the file - imho its
more readable than having them directly at the top of the file, before
the public type and function definitions.
2017-10-10 08:03:25 -04:00
Kubernetes Submit Queue 46c2bfe47d Merge pull request #52856 from yastij/nodecontroller-clean-backwards-tests
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

cleaning tests from deprecated usecases due to unsupported version

**What this PR does / why we need it**: this part of the #52356 effort

**Which issue this PR fixes**: 

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-10-10 04:32:14 -07:00
Davanum Srinivas 5690ba6241 Fix potential problem when scaling --replicas=0
We have defensive code for checking if newRS != nil for
DeploymentProgressing and DeploymentTimedOut but not for
DeploymentComplete. Let's add the check here as well as
this problem was seen in the wild.
2017-10-09 17:39:51 -04:00
Kubernetes Submit Queue e7c61da14f Merge pull request #52985 from mattjmcnaughton/mattjmcnaughton/improve-horizontal-documentation
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Improve `horizontal.go` documentation

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

Resolve the remaining `golint` errors in the
`pkg/controller/podautoscaler` package by improving the documentation
in `horizontal.go`. Now all public methods have comments.

**Special notes for your reviewer**:
Re discussions in [this pr](https://github.com/kubernetes/kubernetes/pull/52238).

**Release note**:
```release-note
NONE
```
2017-10-09 08:21:01 -07:00
Jun Xiang Tee e23d9f7a36 remove replicaset unit tests that are converted to integration tests 2017-10-06 18:03:19 -07:00
Kubernetes Submit Queue 182aa93be8 Merge pull request #53487 from oracle/for/upstream/master/service-event-logging
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Enable event logging in the service controller

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

This PR enables logging for the events in the service controller which keeps parity with the [node controller](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/cloud/node_controller.go#L83).

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/cc @luxas @wlan0 @jhorwit2
2017-10-06 09:56:19 -07:00
andrewsykim 2def443440 log when node is initialized in cloud controller manager 2017-10-06 00:59:11 -04:00
Jing Ai 5f40a4230e Merge branch 'master' into node_ipam_branch 2017-10-05 10:11:18 -07:00
André Martins 326754eea4 Removed the IPv6 prefix size limit for cluster-cidr
Signed-off-by: André Martins <aanm90@gmail.com>
2017-10-05 13:34:08 +02:00
Josh Horwitz 36ac3c8c31 Enable event logging in the service controller 2017-10-05 10:37:14 +01:00
Jacob Simpson 2a6099b8f9 New controller to GC CSRs. 2017-10-04 14:45:32 -07:00
Kubernetes Submit Queue 2aa0704c0e Merge pull request #51754 from huzhengchuan/fix/event_name
Automatic merge from submit-queue (batch tested with PRs 51754, 53261, 53450). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Rename the name of event source in controller-manager

**What this PR does / why we need it**: Make the event source 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 #51753

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-10-04 13:13:15 -07:00
Jing Ai 688dab7249 revert the comment change from Run to run 2017-10-04 11:01:04 -07:00
Kubernetes Submit Queue 776437c6f9 Merge pull request #53401 from gnufied/fix-multi-attach-spam
Automatic merge from submit-queue (batch tested with PRs 52832, 53401). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix spam of multiattach errors in event logs

We should be careful while generating multiattach errors.
We seem to be generating too many of them because old code
had minor bug.


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

I think that we should cherry-pick this to 1.8. 

cc @kubernetes/sig-storage-pr-reviews 

```release-note
Fix multi-attach error spam in logs and events
```
2017-10-04 09:26:34 -07:00
Yassine TIJANI 28dbab3bff cleaning tests from deprecated usecases due to unsupported version 2017-10-04 16:30:28 +02:00
Kubernetes Submit Queue 731f42172b Merge pull request #51266 from resouer/not-ready
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactor node taint conditions

**What this PR does / why we need it**:
We should use `not-ready` etc as node condition taint key.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Use `not-ready` to replace `notReady` in node condition taint keys.
```
2017-10-04 06:56:44 -07:00
Jing Ai 51172a587b Minior cleanup in pkg/controller/node/ipam/sync/sync.go 2017-10-03 16:55:36 -07:00
Hemant Kumar 67d4c40849 Fix spam of multiattach errors in event logs
We should be careful while generating multiattach errors.
We seem to be generating too many of them because old code
had minor bug.
2017-10-03 15:45:06 -04:00
Kubernetes Submit Queue 566364da49 Merge pull request #52951 from kargakis/remove-dead-code
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Simplify some deployment utilities

Sponsored by the recent refactoring that removed errors
from deep copies.

Signed-off-by: Michalis Kargakis <mkargaki@redhat.com>
2017-10-03 08:11:04 -07:00
Kubernetes Submit Queue 0c6970bf7b Merge pull request #52723 from k82cn/k8s_42001_5
Automatic merge from submit-queue (batch tested with PRs 52723, 53271). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Apply algorithm in scheduler by feature gates.

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

**Release note**:
```release-note
Apply algorithm in scheduler by feature gates.
```
2017-10-03 05:15:20 -07:00
Jan Safranek c3c2ed8b60 Send VolumeMismatch event to PVC
PV controller should send events to PVCs and not PVs when a PVC requests PV
that's either too small or has mismatching StorageClass.

Regular users can't see events on PVs so `kubectl describe pvc` is the only
way how to tell user that something is wrong.
2017-10-02 12:21:42 +02:00
Klaus Ma bd15efd3e5 Enhance scheduler for TaintNodeByCondition. 2017-10-01 08:26:35 +08:00
mattjmcnaughton abd46684d4 Make HPA tolerance a flag
Fix #18155

Make HPA tolerance configurable as a flag. This change allows us to use
different tolerance values in production/testing.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-09-28 22:01:51 -04:00
Kubernetes Submit Queue bfaaa77263 Merge pull request #53098 from gnufied/add-volume-expand-comments
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add documentation comments for volume expand controller

These comments help clear out some of the design choices made
in code.

cc @kubernetes/sig-storage-pr-reviews @NickrenREN
2017-09-28 10:12:20 -07:00
Kubernetes Submit Queue 6915fd5f20 Merge pull request #53146 from brendandburns/ignore
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add a label which prevents a node from being added to a cloud load balancer

There are a variety of reasons that you may not want a node in a cluster to participate in a cloud load balancer. For example workload isolation for security, or managing network throughput, or because the node is not in the appropriate virtual network (cluster's that span environments)

This PR adds a label so that you can select which nodes you want to participate.
2017-09-27 21:28:52 -07:00
Brendan Burns 422f5e37b9 Add a label which prevents a node from being added to a cloud load balancer. 2017-09-27 10:13:02 -07:00
Kubernetes Submit Queue 7d0977d89f Merge pull request #52238 from mattjmcnaughton/mattjmcnaughton/address-golint-errors-in-podautoscaler
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix golint errors in `pkg/controller/podautoscaler`

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

Address `golint` errors in `pkg/controller/podautoscaler`. Note,
I did not address issues around exported types/functions missing
comments, because I'm not sure what the convention within the k8s project is.

```release-note
NONE
```

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-09-27 03:54:43 -07:00
Kubernetes Submit Queue 5a721f5a02 Merge pull request #53065 from msau42/add-reviewers
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add more reviewers for volume components

**Release note**:

NONE
2017-09-26 23:52:02 -07:00
Kubernetes Submit Queue 1cffa70c0d Merge pull request #52221 from gnufied/fix-detach-delay-mount-node
Automatic merge from submit-queue (batch tested with PRs 52990, 53064, 52686, 52221, 53069). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Always populate volume status from node

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

As discussed offline with @jingxu97 

/sig storage
2017-09-26 23:12:30 -07:00
Hemant Kumar 0ad846cb18 Add documentation comments for volume expand controller
These comments help clear out some of the design choices made
in code.
2017-09-26 22:25:23 -04:00
Michelle Au e6687ad5c6 Add more reviewers for volume components 2017-09-26 10:24:21 -07:00
mattjmcnaughton fa56e879c7 Improve `horizontal.go` documentation
Resolve the remaining `golint` errors in the
`pkg/controller/podautoscaler` package by improving the documentation
in `horizontal.go`. Now all public methods have comments.
2017-09-25 09:25:05 -04:00
Kubernetes Submit Queue 5f8726e427 Merge pull request #52886 from surajnarwade/remove-unused
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Cleaning up unused functions in /pkg/controller/deployment/util
2017-09-24 06:19:55 -07:00
Kubernetes Submit Queue 7c9e614cbb Merge pull request #52873 from ixdy/bazel-cleanup
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

bazel: build/test almost everything

**What this PR does / why we need it**: Miscellaneous cleanups and bug fixes. The main motivating idea here was to make `bazel build //...` and `bazel test //...` mostly work. (There's a few reasons these still don't work, but we're a lot closer.)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @BenTheElder @mikedanese @spxtr
2017-09-24 00:04:36 -07:00
Kubernetes Submit Queue 3cab0c9ffa Merge pull request #52764 from fate-grand-order/fix-typo
Automatic merge from submit-queue (batch tested with PRs 52831, 52764, 52763, 52673, 52558). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

fix typo
2017-09-23 22:57:49 -07:00
Kubernetes Submit Queue d4237ec4db Merge pull request #52831 from caiyixiang/mis_spell
Automatic merge from submit-queue (batch tested with PRs 52831, 52764, 52763, 52673, 52558). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

correct a small spelling mistake
2017-09-23 22:57:47 -07:00
Kubernetes Submit Queue 2b24df3407 Merge pull request #51902 from zhangxiaoyu-zidif/fix-typo-cronjob-utils
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Refactor cronjob test case with sets.String

**What this PR does / why we need it**:
Refactor cronjob test case with sets.String

**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/51396

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-23 19:46:23 -07:00
Michalis Kargakis 086ab4291a
Simplify some deployment utilities
Sponsored by the recent refactoring that removed errors
from deep copies.

Signed-off-by: Michalis Kargakis <mkargaki@redhat.com>
2017-09-23 22:31:05 +02:00
Kubernetes Submit Queue fbf687c66c Merge pull request #52168 from mattjmcnaughton/mattjmcnaughton/49256-clear-status-message-when-zero-desired-pods
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Fix incorrect status msg in podautoscaler

**Which issue this PR fixes**

Fix #49256

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

When `ScalingLimited = true` for the `hpa`, there is an accompanying
status message, describing why scaling is limited. Previously if the desired
replica count was 0, and spec.minReplicas > 0, the status message
indicated "the desired replica count was less than the min replica
count". This was particularly confusing when `spec.MinReplicas = 1`. If
there was no `spec.minReplicas`, then the status message indicated "the
desired replica count was zero" which is more informative.

Update the calculation of status message so that if the desired replica
count is 0, we always display the clearer "the desired replica count was
zero" status message, even if spec.minReplicas > 0.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>

```release-note
NONE
```
2017-09-23 13:23:18 -07:00
Kubernetes Submit Queue 446daf02a5 Merge pull request #52240 from mattjmcnaughton/mattjmcnaughton/do-not-import-apimachinery-from-staging
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Modify `apimachinery` imports using `staging`

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

Currently some of the imports of `apimachinery` use
`k8s.io/kubernetes/staging/src/k8s.io/apimachinery...`. Replace
these with `k8s.io/apimachinery`, as is in use throughout the rest
of the code base.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>

**Release note**:
```release-note
NONE
```
2017-09-23 09:08:26 -07:00
Suraj Narwade 0082bd0061 Cleaning up unused functions in /pkg/controller/deployment/util 2017-09-23 15:55:22 +05:30
Kubernetes Submit Queue 815b894dd4 Merge pull request #51705 from enj/enj/i/panic_timed_workers_test/51704
Automatic merge from submit-queue (batch tested with PRs 51031, 51705, 51888, 51727, 51684). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Address panic in TestCancelAndReadd

This further increases the timeouts in `timed_workers_test` to reduce the chance of a race condition against the wait group.

Signed-off-by: Monis Khan <mkhan@redhat.com>

Fixes #51704

/assign @gmarek

cc @davidopp @timothysc

```release-note
NONE
```
2017-09-23 01:47:02 -07:00
Kubernetes Submit Queue ec382f3511 Merge pull request #50989 from wgliang/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

should use time.Since instead of time.Now().Sub

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

should use time.Since instead of time.Now().Sub

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
NONE
**Special notes for your reviewer**:
NONE
**Release note**:

```release-note
```
NONE
2017-09-23 00:24:35 -07:00
Kubernetes Submit Queue 1c0f22ea01 Merge pull request #43016 from liggitt/time-added-pointer
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Omit timeAdded from taint when empty

Fixes omitempty portion of https://github.com/kubernetes/kubernetes/issues/42394
2017-09-22 23:35:52 -07:00
Kubernetes Submit Queue cec8acf5e5 Merge pull request #52867 from liggitt/metric-name
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Remove GC ratelimiter metrics

Fixes #52801

The metrics were causing panics because the names weren't formatted correctly, there were concerns around the number of metrics series that resulted from registration per group/version, and the saturation metric being reported was of [questionable use](https://go-review.googlesource.com/c/time/+/29958#message-4caffc11669cadd90e2da4c05122cfec50ea6a22)
2017-09-21 18:47:05 -07:00
Jordan Liggitt a0f8a36e48
Remove GC rate limiter metrics 2017-09-21 19:23:27 -04:00
Jeff Grafton 02fb4200dc Use buildozer to delete licenses() rules 2017-09-21 15:53:22 -07:00
Jeff Grafton 532bd482df Use buildozer to remove deprecated automanaged tags 2017-09-21 15:53:22 -07:00
Kubernetes Submit Queue 6808e800c9 Merge pull request #51877 from kargakis/add-tnozicka
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Remove kargakis from OWNERS, add tnozicka

/assign @smarterclayton 
/cc @janetkuo @tnozicka
2017-09-21 13:03:49 -07:00
caiyixiang e59263e519 pkg/controller/node/scheduler/rate_limited_queue.go:correct a small spelling mistake 2017-09-21 14:26:14 +08:00
fate-grand-order c00fce0c60 fix typo 2017-09-20 04:42:27 +00:00
Kubernetes Submit Queue dc37cb005d Merge pull request #52285 from shyamjvs/cidr-allocation-swag
Automatic merge from submit-queue (batch tested with PRs 52679, 52285). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Improve cloud-cidr-allocator's performance

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

This makes the changes I suggested on that issue. Also it makes the cloud cidr allocator more similar to range allocator.

cc @kubernetes/sig-network-pr-reviews @kubernetes/sig-scalability-misc @wojtek-t @bowei
2017-09-19 18:27:47 -07:00
Kubernetes Submit Queue 7ca9ec7932 Merge pull request #51081 from diegs/typo
Automatic merge from submit-queue (batch tested with PRs 51081, 52725). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

daemon_controller: fix typo.

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

I found a small typo while implementing #48841.

With the existing code, some edge cases might lead to the wrong pods
being deleted.

**Release note**:
```release-note
NONE
```
2017-09-19 13:34:55 -07:00
Shyam Jeedigunta 5d864aa3c2 Add concurrency to cloud CIDR allocator & make it non-blocking on NodeSpec updates 2017-09-19 17:33:34 +02:00
Michail Kargakis a702742d31
Remove kargakis from OWNERS, add tnozicka
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-09-19 11:05:23 +02:00
Kubernetes Submit Queue 3277de69b4 Merge pull request #52176 from liggitt/heartbeat-timeout
Automatic merge from submit-queue (batch tested with PRs 52176, 43152). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Eliminate hangs/throttling of node heartbeat

Fixes https://github.com/kubernetes/kubernetes/issues/48638
Fixes #50304

Stops kubelet from wedging when updating node status if unable to establish tcp connection.

 Notes that this only affects the node status loop. The pod sync loop would still hang until the dead TCP connections timed out,  so more work is needed to keep the sync loop responsive in the face of network issues, but this change lets existing pods coast without the node controller trying to evict them

```release-note
kubelet to master communication when doing node status updates now has a timeout to prevent indefinite hangs
```
2017-09-16 09:45:29 -07:00
Kubernetes Submit Queue 5079186eb4 Merge pull request #52486 from oracle/for/upstream/master/cnc-recorder-fix
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Changes the node cloud controller to use its name for events

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

Updates the event recorder component to be the `cloud-node-controller` instead of `cloudcontrollermanager`, which aligns with how other controllers are setup like the daemonset controller which uses `daemonset-controller` and the ccm uses `cloud-controller-manager`.

**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
Use `cloud-node-controller` for cloud node controller events
```

/cc @luxas @wlan0 @jhorwit2
2017-09-16 06:13:25 -07:00
supereagle 87c29a08e1 fix typos: remove duplicated word in comments 2017-09-16 14:38:10 +08:00
Harry Zhang 2afab02349 Use NC to fix deprecated taint key name 2017-09-15 23:54:15 +08:00
Kubernetes Submit Queue ea22affd08 Merge pull request #51796 from Dirbaio/fix/pod-node-switch
Automatic merge from submit-queue (batch tested with PRs 51796, 52223)

Fix pod and node names switched around in error message.

**What this PR does / why we need it**: This PR fixes a pod name and a node name switched around in an error message from the daemon controller.

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

**Special notes for your reviewer**: -

**Release note**:

```release-note
NONE
```
2017-09-15 05:51:21 -07:00
Kubernetes Submit Queue 20a4112e88 Merge pull request #46542 from derekwaynecarr/quota-ignore-pod-whose-node-lost
Automatic merge from submit-queue (batch tested with PRs 52442, 52247, 46542, 52363, 51781)

Ignore pods for quota marked for deletion whose node is unreachable

**What this PR does / why we need it**:
Traditionally, we charge to quota all pods that are in a non-terminal phase.  We have a user report that noted the behavior change in kube 1.5 for the node controller to no longer force delete pods whose nodes have been lost.  Instead, the pod is marked for deletion, and the reason is updated to state that the node is unreachable.  The user expected the quota to be released.  If the user was at their quota limit, their application may not be able to create a new replica given the current behavior.  As a result, this PR ignores pods marked for deletion that have exceeded their grace period.

**Which issue this PR fixes**
xref https://bugzilla.redhat.com/show_bug.cgi?id=1455743
fixes https://github.com/kubernetes/kubernetes/issues/52436

**Release note**:
```release-note
Ignore pods marked for deletion that exceed their grace period in ResourceQuota
```
2017-09-15 00:11:10 -07:00
Jordan Liggitt f8f57d8959
Use separate client for node status loop 2017-09-14 15:56:22 -04:00
Josh Horwitz e2ccd5dcad Changes the node cloud controller to use its name for events 2017-09-14 13:41:12 +01:00
Kubernetes Submit Queue 1c55faf0bb Merge pull request #51387 from alrs/fix-storageos-swallowed-err
Automatic merge from submit-queue

Fix swallowed errors in various volume packages

**What this PR does / why we need it**: Fixes swallowed errors in various volume packages.

**Release note**:
```release-note NONE
```
2017-09-13 11:10:24 -07:00
mattjmcnaughton dc8df2701b Fix incorrect status msg in podautoscaler
Fix #49256

When `ScalingLimited = true` for the `hpa`, there is an accompanying
status message, describing why scaling is limited. Previously if the desired
replica count was 0, and spec.minReplicas > 0, the status message
indicated "the desired replica count was less than the min replica
count". This was particularly confusing when `spec.MinReplicas = 1`. If
there was no `spec.minReplicas`, then the status message indicated "the
desired replica count was zero" which is more informative.

Update the calculation of status message so that if the desired replica
count is 0, we always display the clearer "the desired replica count was
zero" status message, even if spec.minReplicas > 0.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-09-13 09:27:38 -04:00
Kubernetes Submit Queue 1f072babe8 Merge pull request #52169 from dims/remove-links-to-specific-cloud-providers
Automatic merge from submit-queue (batch tested with PRs 52007, 52196, 52169, 52263, 52291)

Remove links to GCE/AWS cloud providers from PersistentVolumeCo…

…ntroller




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

We should be able to build a cloud-controller-manager without having to
pull in code specific to GCE and AWS clouds. Note that this is a tactical
fix for now, we should have allow PVLabeler to be passed into the
PersistentVolumeController, maybe come up with better interfaces etc. Since
it is too late to do all that for 1.8, we just move cloud specific code
to where they belong and we check for PVLabeler method and use it where
needed.

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

Fixes #51629

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-12 08:46:12 -07:00
Hemant Kumar 8edae9b3fc Always populate volume status from node 2017-09-12 09:03:42 -04:00
Derek Carr da01c6d3a2 Ignore pods for quota that exceed deletion grace period 2017-09-11 13:31:52 -04:00
Shyam Jeedigunta 9be91e42c7 Extract config common across CIDR allocators 2017-09-11 18:35:26 +02:00
mattjmcnaughton 8323fb4b4f Modify `apimachinery` imports using `staging`
Currently some of the imports of `apimachinery` use
`k8s.io/kubernetes/staging/src/k8s.io/apimachinery...`. Replace
these with `k8s.io/apimachinery`, as is in use throughout the rest
of the code base.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-09-10 10:19:30 -04:00
mattjmcnaughton ff6fa92733 Fix golint errors in `pkg/controller/podautoscaler`
Address `golint` errors in `pkg/controller/podautoscaler`. Note,
I did not address issues around exported types/functions missing
comments, because I'm not sure what the convention within the k8s project is.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-09-09 14:53:34 -04:00
Davanum Srinivas d47bd26c4b Remove links to GCE/AWS cloud providers from PersistentVolumeController
We should be able to build a cloud-controller-manager without having to
pull in code specific to GCE and AWS clouds. Note that this is a tactical
fix for now, we should have allow PVLabeler to be passed into the
PersistentVolumeController, maybe come up with better interfaces etc. Since
it is too late to do all that for 1.8, we just move cloud specific code
to where they belong and we check for PVLabeler method and use it where
needed.

Fixes #51629
2017-09-08 15:28:08 -04:00
Michail Kargakis af0f5dcc88
Fix deployment timeout reporting
If the previous condition has been a successful rollout then we
shouldn't try to estimate any progress. Scenario:

* progressDeadlineSeconds is smaller than the difference between
  now and the time the last rollout finished in the past.
* the creation of a new ReplicaSet triggers a resync of the
  Deployment prior to the cached copy of the Deployment getting
  updated with the status.condition that indicates the creation
   of the new ReplicaSet.

The Deployment will be resynced and eventually its Progressing
condition will catch up with the state of the world.

Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-09-08 17:48:46 +02:00
Kubernetes Submit Queue 26d72847d0 Merge pull request #52091 from clamoriniere1A/bugfix/jobcontroller_backoff
Automatic merge from submit-queue (batch tested with PRs 52091, 52071)

Bugfix: Improve how JobController use queue for backoff

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

In some cases,  the backoff delay for a given Job is reset unnecessarily. 

the PR improves how JobController uses queue for backoff:
- Centralize the key "forget" and "re-queue" process in only on method.
- Change the signature of the syncJob method in order to return the
information if it is necessary to forget the backoff delay for a given
key.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-09-08 04:57:56 -07:00
Kubernetes Submit Queue eda3db550b Merge pull request #51876 from smarterclayton/disable_client_paging
Automatic merge from submit-queue (batch tested with PRs 48552, 51876)

Disable default paging in list watches

For 1.8 this will be off by default. In 1.9 it will be on by default.
Add tests and rename some fields to use the `chunking` terminology.

Note that the pager may be used for other things besides chunking.

Follow on to #48921, we left the field on to get some exercise in the normal code paths, but needs to be disabled for 1.8.

@liggitt let's merge on wednesday.
2017-09-07 23:08:17 -07:00
Kubernetes Submit Queue f4f21b3f06 Merge pull request #52054 from janetkuo/pause-dep-integra
Automatic merge from submit-queue (batch tested with PRs 52097, 52054)

Move paused deployment e2e tests to integration

**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)*: xref #52113

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-07 15:28:25 -07:00
Jordan Liggitt 3cf760c57e
Change TimeAdded to pointer 2017-09-07 14:13:09 -04:00
cedric lamoriniere 48116da0ec Improve how JobController use queue for backoff
Centralize the key "forget" and "requeue" process in only on method.
Change the signature of the syncJob method in order to return the
information if it is necessary to forget the backoff delay for a given
key.
2017-09-07 17:14:47 +02:00
Clayton Coleman 8b571bb63b
Disable default paging in list watches
For 1.8 this will be off by default. In 1.9 it will be on by default.
Add tests and rename some fields to use the `chunking` terminology.

Note that the pager may be used for other things besides chunking.
2017-09-06 23:10:59 -04:00
Janet Kuo 124344a1a4 Move paused deployment e2e tests to integration 2017-09-06 18:12:28 -07:00
Kubernetes Submit Queue 3168bd4b12 Merge pull request #50708 from DirectXMan12/versions/autoscaling-v2beta1
Automatic merge from submit-queue (batch tested with PRs 51956, 50708)

Move autoscaling/v2 from alpha1 to beta1

This graduates autoscaling/v2alpha1 to autoscaling/v2beta1.  The move is more-or-less just a straightforward rename.

Part of kubernetes/features#117

```release-note
v2 of the autoscaling API group, including improvements to the HorizontalPodAutoscaler, has moved from alpha1 to beta1.
```
2017-09-06 15:46:24 -07:00
Jan Safranek e054dd297a Fix panic in expand controller when checking PVs
Unbound PVs have their Spec.ClaimRef = nil, so we should not dereference it blindly.

In addition, increase AddPVCUpdate test coverage to 100%
2017-09-06 13:27:10 +02:00
Kubernetes Submit Queue 0076f02df0 Merge pull request #51653 from DirectXMan12/versions/metrics-v2beta1
Automatic merge from submit-queue (batch tested with PRs 51603, 51653)

Graduate metrics/v1alpha1 to v1beta1

This introduces v1beta1 of the resource metrics API, previously in alpha.
The v1alpha1 version remains for compatibility with the Heapster legacy version
of the resource metrics API, which is compatible with the v1alpha1 version.  It also
renames the v1beta1 version to `resource-metrics.metrics.k8s.io`.

The HPA controller's REST clients (but not the legacy client) have been migrated as well.

Part of kubernetes/features#118.

```release-note
Migrate the metrics/v1alpha1 API to metrics/v1beta1.  The HorizontalPodAutoscaler
controller REST client now uses that version.  For v1beta1, the API is now known as
resource-metrics.metrics.k8s.io.
```
2017-09-06 02:55:12 -07:00
Kubernetes Submit Queue ecfee6a9c9 Merge pull request #51603 from hzxuzhonghu/taint-controller-panic
Automatic merge from submit-queue (batch tested with PRs 51603, 51653)

fix taint controller panic

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-06 02:55:09 -07:00
Solly Ross c8690f367b Move consumers of autoscaling/v2alpha1 to v2beta1
This commit updates consumers (mainly the HPA controller, but also the
kubectl printers) of autoscaling/v2alpha1 to autoscaling/v2beta1.
2017-09-05 17:49:30 -04:00
Solly Ross 86f24eaf7a Update HPA REST metrics client to metrics/v1beta1
This commit updates the REST metrics client to use metrics/v1beta1.
The legacy client still uses metrics/v1alpha1.
2017-09-05 16:11:55 -04:00
David Ashpole 97ab99aaa0 remove OutOfDisk from controllers 2017-09-04 17:35:55 -07:00
zhengchuan hu 2b8891a59f rename the name of eventsource in controller-manager 2017-09-04 23:30:59 +08:00