Commit Graph

3356 Commits (56dc8f9a6ab09debeddf5349ee26730d3e9107f8)

Author SHA1 Message Date
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
zhangxiaoyu-zidif b5c88b4e56 Refactor cronjob test case with sets.String 2017-09-04 22:02:27 +08:00
zhangxiaoyu-zidif d0982ba539 fix comment for cronjob utils.go 2017-09-04 21:49:45 +08:00
wangguoliang c2ed2bc21c should use time.Since instead of time.Now().Sub 2017-09-04 15:57:33 +08:00
Hemant Kumar 84029c2c1a Update generated files - api, bazel, json
Update all generated files json, protocolbuffers,
documentation
2017-09-04 09:02:35 +02:00
Hemant Kumar cd2a68473a Implement controller for resizing volumes 2017-09-04 09:02:34 +02:00
Kubernetes Submit Queue 0dedd13ad7 Merge pull request #51734 from soltysh/cronjobs_beta
Automatic merge from submit-queue

Enable batch/v1beta1.CronJobs by default

This PR re-applies the cronjobs->beta back (https://github.com/kubernetes/kubernetes/pull/51720)  with the fix from @shyamjvs.

Fixes #51692

@apelisse @dchen1107 @smarterclayton ptal
@janetkuo @erictune fyi
2017-09-03 18:22:27 -07:00
cedric lamoriniere 1dbef2f113
Job failure policy support in JobController
Job failure policy integration in JobController. From the
JobSpec.BackoffLimit the JobController will define the backoff
duration between Job retry.

It use the ```workqueue.RateLimitingInterface``` to store the number of
"retry" as "requeue" and the default Job backoff initial duration is set
during the initialization of the ```workqueue.RateLimiter.

Since the number of retry for each job is store in a local structure
"JobController.queue" if the JobController restarts the number of retries
will be lost and the backoff duration will be reset to 0.

Add e2e test for Job backoff failure policy
2017-09-03 12:07:12 +02:00
Maciej Szulik 6962427b35
Enable batch/v1beta1.CronJobs by default 2017-09-03 11:17:33 +02:00
Kubernetes Submit Queue 28857a2f02 Merge pull request #49142 from joelsmith/slowstart
Automatic merge from submit-queue (batch tested with PRs 50602, 51561, 51703, 51748, 49142)

Slow-start batch pod creation of rs, rc, ds, jobs

Prevent too-large replicas from generating enormous numbers
of events by creating only a few pods at a time, then increasing
the batch size when pod creations succeed. Stop creating batches
of pods when any pod creation errors are encountered.

Todo:

- [x] Add automated tests
- [x] Test ds

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

**Release note**:
```release-note
controllers backoff better in face of quota denial
```
2017-09-03 01:12:14 -07:00
Kubernetes Submit Queue 6c60a73f8a Merge pull request #49829 from zhangxiaoyu-zidif/add-test-item-for-job-util
Automatic merge from submit-queue (batch tested with PRs 51666, 49829, 51058, 51004, 50938)

Add test items for job utils

**What this PR does / why we need it**:
Add test item for job util

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

**Release note**:

```release-note
NONE
```
2017-09-02 22:52:04 -07:00
Kubernetes Submit Queue 0ff4ca9815 Merge pull request #51666 from davidz627/storage_capacity
Automatic merge from submit-queue (batch tested with PRs 51666, 49829, 51058, 51004, 50938)

Fixed integer overflow when matching PVPVC claims

Fixes #49911

Fixed integer overflow when matching PVPVC claims. Added test to guard this behavior.
2017-09-02 22:52:00 -07:00
Kubernetes Submit Queue 52e3fdacbb Merge pull request #51538 from kow3ns/less-ugly-names
Automatic merge from submit-queue (batch tested with PRs 51553, 51538, 51663, 51069, 51737)

Consistent Names for ControllerRevisions, ReplicaSets, and objects using GenerateName

**What this PR does / why we need it**:
Adds the rand.SafeEncodeString function and uses this function to generate names for ReplicaSets and ControllerRevisions.

```release-note
The names generated for ControllerRevision and ReplicaSet are consistent with the GenerateName functionality of the API Server and will not contain "bad words".
```
2017-09-02 21:57:59 -07:00
Kubernetes Submit Queue dceff77669 Merge pull request #51374 from bowei/ip-alias-v2
Automatic merge from submit-queue (batch tested with PRs 51583, 51283, 51374, 51690, 51716)

Add IPAM controller for synchronizing node pod CIDR range allocations between the cluster and the cloud (alpha feature)

```release-note
IPAM controller unifies handling of node pod CIDR range allocation.
It is intended to supersede the logic that is currently in range_allocator 
and cloud_cidr_allocator. (ALPHA FEATURE)

Note: for this change, the other allocators still exist and are the default.

It supports two modes:
* CIDR range allocations done within the cluster that are then propagated out to the cloud provider.
* Cloud provider managed IPAM that is then reflected into the cluster.
```

Fixes https://github.com/kubernetes/kubernetes/issues/51826
2017-09-02 20:35:24 -07:00
Kubernetes Submit Queue 35ffb5c6cf Merge pull request #48921 from smarterclayton/paging_prototype
Automatic merge from submit-queue (batch tested with PRs 50832, 51119, 51636, 48921, 51712)

Alpha list paging implementation

Design in kubernetes/community#896

Support `?limit=NUMBER`, `?continue=CONTINUATIONTOKEN`, and a `continue` field
on ListMeta and pass through to etcd. Perform minor validation as an example.

```
# first out of three
$ curl http://127.0.0.1:8080/api/v1/namespaces?limit=1
{
  "kind": "NamespaceList",
  "apiVersion": "v1",
  "metadata": {
    "selfLink": "/api/v1/namespaces",
    "resourceVersion": "146",
    "next": "ZGVmYXVsdA"
  },
  "items": [
    {
      "metadata": {
        "name": "default",
        "selfLink": "/api/v1/namespaces/default",
        "uid": "f95e1390-6852-11e7-ab03-7831c1b76042",
        "resourceVersion": "4",
        "creationTimestamp": "2017-07-14T05:12:03Z"
      },
      "spec": {
        "finalizers": [
          "kubernetes"
        ]
      },
      "status": {
        "phase": "Active"
      }
    }
  ]
}
...
# last
$ curl "http://127.0.0.1:8080/api/v1/namespaces?limit=1&continue=a3ViZS1wdWJsaWM"
{
  "kind": "NamespaceList",
  "apiVersion": "v1",
  "metadata": {
    "selfLink": "/api/v1/namespaces",
    "resourceVersion": "145"
  },
  "items": [
    {
      "metadata": {
        "name": "kube-system",
        "selfLink": "/api/v1/namespaces/kube-system",
        "uid": "f95e9484-6852-11e7-ab03-7831c1b76042",
        "resourceVersion": "5",
        "creationTimestamp": "2017-07-14T05:12:03Z"
      },
      "spec": {
        "finalizers": [
          "kubernetes"
        ]
      },
      "status": {
        "phase": "Active"
      }
    }
  ]
}
```
2017-09-02 19:26:29 -07:00
Kubernetes Submit Queue d375e1595f Merge pull request #50920 from DirectXMan12/versions/custom-metrics-v2beta1
Automatic merge from submit-queue (batch tested with PRs 51335, 51364, 51130, 48075, 50920)

Graduate custom metrics API to v1beta1

This graduates custom-metrics.metrics.k8s.io/v1alpha1 to custom-metrics.metrics.k8s.io/v1beta1.  The move is more-or-less just a straightforward rename.

Part of kubernetes/features#117 and kubernetes/features#118

```release-note
the custom metrics API (custom-metrics.metrics.k8s.io) has moved from v1alpha1 to v1beta1
```
2017-09-02 18:18:57 -07:00
Kubernetes Submit Queue fc9e214a84 Merge pull request #51519 from hzxuzhonghu/cronjob
Automatic merge from submit-queue

update deprecated interface and fix bug not return when list pod failed in cronjob_controller.go

**What this PR does / why we need it**:
remove some unused redundant code, and fix bug: when list pod failed, 
job still deleted but pod may still exist  in func `deleteJob`

**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-09-02 12:58:07 -07:00
Bowei Du 428b8a4132 (ALPHA GCP FEATURE) Add IPAM controller
IPAM controller unifies handling of node pod CIDR range allocation.  It
is intended to supersede the logic that is currently in range_allocator
and cloud_cidr_allocator.

Note: for this change, the other allocators still exist and are the
default.

It supports two modes:
* CIDR range allocations done within the cluster that are then
propagated out to the cloud provider.
* Cloud provider managed IPAM that is then reflected into the cluster.
2017-09-01 12:58:40 -07:00
Solly Ross 89a56a3cee Move HPA to use custom-metrics/v1beta1
This commit migrates the HPA metrics clients to use the beta version of
the custom metrics API.
2017-09-01 15:08:31 -04:00
David Zhu a60965337c Fixed integer overflow when matching PVPVC claims. Added tests to guard this behavior. 2017-09-01 10:10:13 -07:00
Joel Smith 1889a6ef52 Slow-start batch pod creation of rs, rc, ds, jobs
Prevent too-large replicas from generating enormous numbers
of events by creating only a few pods at a time, then increasing
the batch size when pod creations succeed. Stop creating batches
of pods when any pod creation errors are encountered.
2017-09-01 09:23:43 -06:00
Clayton Coleman 8952a0cb72
Server side implementation of paging for etcd3
Add a feature gate in the apiserver to control whether paging can be
used. Add controls to the storage factory that allow it to be disabled
per resource. Use a JSON encoded continuation token that can be
versioned. Create a 410 error if the continuation token is expired.

Adds GetContinue() to ListMeta.
2017-09-01 10:47:01 -04:00
Dario Nieuwenhuis af94c4e689 Fix pod and node names switched around in error message. 2017-09-01 16:12:49 +02:00
xilabao f14c138438 add selfsubjectrulesreview api 2017-09-01 19:09:43 +08:00
Kubernetes Submit Queue 6a845c67f0 Merge pull request #48287 from thockin/json-iterator
Automatic merge from submit-queue

Use json-iterator instead of ugorji for JSON.

@smarterclayton @wojtek-t

Fixes #36120
xref #18762

```release-note
Switch JSON marshal/unmarshal to json-iterator library.  Performance should be close to previous with no generated code.
```
2017-09-01 02:04:56 -07:00
Kubernetes Submit Queue 8beb39d07e Merge pull request #51279 from kow3ns/daemonset-respects-termination
Automatic merge from submit-queue (batch tested with PRs 51628, 51637, 51490, 51279, 51302)

Ensure that DaemonSet respects termination

**What this PR does / why we need it**:
#43077 correctly prevents the DaemonSet controller from adopting deleted Pods, but, as pointed out in #50477, the controller now has no sensitivity to the termination lifecycle (i.e TerminationGracePeriodSeconds) of the Pods it creates. This PR attempts to balance the two. DaemonSet controller will now consider deleted Pods owned by a DaemonSet during creation, but it will not consider deleted Pods as targets for adoption.

fixes #50477

```release-note
#43077 introduced a condition where DaemonSet controller did not respect the TerminationGracePeriodSeconds of the Pods it created. This is now corrected.
```
2017-09-01 00:11:20 -07:00
Tim Hockin 9e2fccd1de Remove generated JSON code 2017-08-31 23:31:12 -07:00
Kubernetes Submit Queue 43a40f7ab5 Merge pull request #44680 from rrati/pvl-controller
Automatic merge from submit-queue (batch tested with PRs 51574, 51534, 49257, 44680, 48836)

Add a persistent volume label controller to the cloud-controller-manager

Part of https://github.com/kubernetes/features/issues/88

Outstanding concerns needing input:
- [x] Why 5 threads for controller processing?
- [x] Remove direct linkage to aws/gce cloud providers [#51629]
- [x] Modify shared informers to allow added event handlers ability to include uninitialized objects/using unshared informer #48893
- [x] Use cache.MetaNamespaceKeyFunc in event handler?

I'm willing to work on addressing the removal of the direct linkage to aws/gce after this PR gets in.
2017-08-31 23:13:23 -07:00
Kubernetes Submit Queue b832992fc6 Merge pull request #49257 from k82cn/k8s_42001
Automatic merge from submit-queue (batch tested with PRs 51574, 51534, 49257, 44680, 48836)

Task 1: Tainted node by condition.

**What this PR does / why we need it**:
Tainted node by condition for MemoryPressure, OutOfDisk and so on.

**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
Tainted nodes by conditions as following:
  * 'node.kubernetes.io/network-unavailable=:NoSchedule' if NetworkUnavailable is true
  * 'node.kubernetes.io/disk-pressure=:NoSchedule' if DiskPressure is true
  * 'node.kubernetes.io/memory-pressure=:NoSchedule' if MemoryPressure is true
  * 'node.kubernetes.io/out-of-disk=:NoSchedule' if OutOfDisk is true
```
2017-08-31 23:13:20 -07:00
Kubernetes Submit Queue b5fad6eb1b Merge pull request #50846 from FengyunPan/change-log-level
Automatic merge from submit-queue (batch tested with PRs 51480, 49616, 50123, 50846, 50404)

Use 'Infof' instead of 'Errorf' for a debug log

Outputing error log for a debug is confused.

**Release note**:
```release-note
NONE
```
2017-08-31 20:08:42 -07:00
Kubernetes Submit Queue 4af900b43f Merge pull request #51633 from deads2k/controller-03-wait
Automatic merge from submit-queue (batch tested with PRs 51707, 51662, 51723, 50163, 51633)

update GC controller to wait until controllers have been initialized …

fixes #51013

Alternative to https://github.com/kubernetes/kubernetes/pull/51492 which keeps those few controllers (only one) from starting the informers early.
2017-08-31 18:43:41 -07:00
Kenneth Owens 8ad18bf2ec Ensures that the DaemonSet controller does not launch a Pod on a Node while waiting for a Pod that it has previously created to terminate. 2017-08-31 10:29:03 -07:00
Antoine Pelisse d7eec6b51d Revert "Enable batch/v1beta1.CronJobs by default" 2017-08-31 09:54:16 -07:00
Monis Khan 6a62f7f483
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>
2017-08-31 09:49:57 -04:00
David Eads 253b047d89 update GC controller to wait until controllers have been initialized once 2017-08-31 09:01:38 -04:00
hzxuzhonghu b80a8db6d3 update Deprecated code and fix bug not return when list pod failed 2017-08-31 14:14:51 +08:00
zhangxiaoyu-zidif 056d586840 make these tests table-driven 2017-08-31 14:08:46 +08:00
Kubernetes Submit Queue ffcd6d1dce Merge pull request #51465 from soltysh/cronjob_beta
Automatic merge from submit-queue (batch tested with PRs 50775, 51397, 51168, 51465, 51536)

Enable batch/v1beta1.CronJobs by default

This PR moves to CronJobs beta entirely, enabling `batch/v1beta1` by default.

Related issue: #41039 

@erictune @janetkuo ptal

```release-note
Promote CronJobs to batch/v1beta1.
```
2017-08-30 15:14:32 -07:00
Kenneth Owens 313a8b304a Adds the rand.SafeEncodeString function and uses this function to
generate names for ReplicaSets and ControllerRevisions.
2017-08-30 14:01:11 -07:00
hzxuzhonghu 928ac582e5 fix taint controller panic 2017-08-30 15:01:45 +08:00
Kubernetes Submit Queue 583c4a442a Merge pull request #51228 from wongma7/mount-options-sc
Automatic merge from submit-queue

Add storageClass.mountOptions and use it in all applicable plugins

split off from https://github.com/kubernetes/kubernetes/pull/50919 and still dependent on it. cc @gnufied


issue: https://github.com/kubernetes/features/issues/168

```release-note
Add mount options field to StorageClass. The options listed there are automatically added to PVs provisioned using the class.
```
2017-08-29 23:48:32 -07:00
Kubernetes Submit Queue b4a2c09ede Merge pull request #50738 from sttts/sttts-deepcopy-calls-controllers
Automatic merge from submit-queue (batch tested with PRs 49961, 50005, 50738, 51045, 49927)

controllers: simplify deepcopy calls
2017-08-29 21:43:35 -07:00
Dr. Stefan Schimanski 1d053c4f7c controllers: simplify deepcopy calls 2017-08-29 19:21:24 +02:00
Matthew Wong 5e772b8e4b Add storageClass.mountOptions and use it in all applicable plugins 2017-08-29 11:37:36 -04:00
Kubernetes Submit Queue 25da6e64e2 Merge pull request #48454 from weiwei04/check-job-activeDeadlineSeconds
Automatic merge from submit-queue (batch tested with PRs 44719, 48454)

check job ActiveDeadlineSeconds

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

enqueue a sync task after ActiveDeadlineSeconds

**Which issue this PR fixes** *: 

fixes #32149

**Special notes for your reviewer**:

**Release note**:

```release-note
enqueue a sync task to wake up jobcontroller to check job ActiveDeadlineSeconds in time
```
2017-08-29 08:25:06 -07:00
Kubernetes Submit Queue c98959e770 Merge pull request #44719 from jsafrane/fix-apiserver-crash
Automatic merge from submit-queue (batch tested with PRs 44719, 48454)

Fix handling of APIserver errors when saving provisioned PVs.

When API server crashes *after* saving a provisioned PV and before sending
200 OK, the controller tries to save the PV again. In this case, it gets
AlreadyExists error, which should be interpreted as success and not as error.

Especially, a volume that corresponds to the PV should not be deleted in the
underlying storage.

Fixes #44372

```release-note
NONE
```

@kubernetes/sig-storage-pr-reviews
2017-08-29 08:25:03 -07:00
Wei Wei 46239ea30b check job ActiveDeadlineSeconds 2017-08-29 20:15:11 +08:00
Kubernetes Submit Queue ecc752153d Merge pull request #50099 from kargakis/clean-d-controller
Automatic merge from submit-queue (batch tested with PRs 50919, 51410, 50099, 51300, 50296)

Remove failure check from deployment controller

@kubernetes/sig-apps-pr-reviews this check is useless w/o automatic rollback so I am removing it.
2017-08-29 03:20:05 -07:00
Jan Safranek 195d5c1546 Fix handling of APIserver errors when saving provisioned PVs.
When API server crashes *after* saving a provisioned PV and before sending
200 OK, the controller tries to save the PV again. In this case, it gets
AlreadyExists error, which should be interpreted as success and not as error.

Especially, a volume that corresponds to the PV should not be deleted in the
underlying storage.
2017-08-29 09:47:32 +02:00
Maciej Szulik 2de214b044
Enable batch/v1beta1.CronJobs by default 2017-08-29 09:31:39 +02:00
Kubernetes Submit Queue 520eab779e Merge pull request #51356 from wongma7/pv-cap-resize
Automatic merge from submit-queue (batch tested with PRs 51441, 51356, 51460)

Don't update pvc.status.capacity if pvc is already Bound

As discussed here https://github.com/kubernetes/community/pull/657#discussion_r128008128, in order for `pvc.status.Capacity < pv.Spec.Capcity` to be the mechanism for volume filesystem* resize, the pv controller should stop updating pvc.status.Capacity every resync period.

/assign @jsafrane
/sig storage
```release-note
NONE
```
2017-08-28 06:41:25 -07:00
Kubernetes Submit Queue 169de991c9 Merge pull request #51441 from wackxu/fixbadcomt
Automatic merge from submit-queue (batch tested with PRs 51441, 51356, 51460)

fix the bad position of code comment

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

The position of code comment is wrong and move it to the right position

**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-08-28 06:41:22 -07:00
Kubernetes Submit Queue 2a2f499455 Merge pull request #50036 from wongma7/metrics
Automatic merge from submit-queue

Add volume operation metrics to operation executor and PV controller

This PR implements the proposal for high level volume metrics https://github.com/kubernetes/community/pull/809

**Special notes for your reviewer**:

~Differences from proposal:~ all resolved

~"verify_volume" is now "verify_volumes_are_attached" + "verify_volumes_are_attached_per_node" + "verify_controller_attached_volume." Which of them do we want?~

~There is no "mount_device" metric because the MountVolume operation combines MountDevice and mount (plugin.Setup). Do we want to extract the mount_device metric or is it okay to keep mountvolume as one? For attachable volumes, MountDevice is the actual mount and Setup is a bindmount + setvolumeownership. For unattachable, mountDevice does not occur and Setup is an actual mount + setvolumeownership.~

~PV controller metrics I did not implement following the proposal at all. I did not change goroutinemap nor scheduleOperation. Because provisionClaimOperation does not return an error, so it's impossible for the caller to know if there is actually a failure worth reporting. So I manually create a new metric inside the function according to some conditions.~

@gnufied 

I have tested the operationexecutor metrics but not provision & delete. Sample: 
![screen shot 2017-08-02 at 15 01 08](https://user-images.githubusercontent.com/13111288/28889980-a7093526-7793-11e7-9aa9-ad7158be76fa.png)


**Release note**:

```release-note
Add error count and time-taken metrics for storage operations such as mount and attach, per-volume-plugin.
```
2017-08-28 04:20:49 -07:00
Robert Rati 53856420e8 Replicate the persistent volume label admission plugin in a controller in
the cloud-controller-manager
2017-08-28 03:12:18 -04:00
Kubernetes Submit Queue ecd910ea6c Merge pull request #49861 from krmayankk/disrupt
Automatic merge from submit-queue

simplify disruption controller finder logic

**What this PR does / why we need it**:
Address some comments from https://github.com/kubernetes/kubernetes/pull/45003 and simplify the PDB controller logic as part of issue https://github.com/kubernetes/kubernetes/issues/42284

@enisoc @kargakis @caesarxuchao 

Also it feels like we can get rid of the finders all together since with controller ref, each pod has only controller. Let me know if i should remove that finders all together ?
2017-08-27 21:45:17 -07:00
wackxu bd6a071345 fix the bad position of code comment 2017-08-28 10:49:05 +08:00
Lars Lehtonen 7fb3dbabdd
Merge branch 'fix-attachdetach-swallowed-error' into fix-storageos-swallowed-err 2017-08-26 14:50:46 -07:00
mtanino 5ff9dc0b3b WaitForAttach refactoring for iSCSI attacher/detacher
This change is prerequisite for implementing iSCSI attacher
and detacher.

In order to use chap authentication at iSCSI plugin after
implementing attacher and detacher, secret is needed at
AttachDisk() which is called from WaitForAttach().
To obtain secret, pod information is required, but
WaitForAttach() doesn't pass pod information inside.

This patch adds 'pod' as an argument of WaitForAttach()
and adds changes to drivers who implements WaitForAttach().

Fixes #48953
2017-08-26 17:21:34 -04:00
Kubernetes Submit Queue 7579bc835c Merge pull request #51340 from yan234280533/patch-3
Automatic merge from submit-queue (batch tested with PRs 51391, 51338, 51340, 50773, 49599)

add an starting info log of namespace controller.

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

add an starting info log of namespace controller.

**Release note**:
NA
2017-08-26 08:49:23 -07:00
Kubernetes Submit Queue 27fbb68f18 Merge pull request #51087 from oracle/for/upstream/master/ccm-instance-exists
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Add InstanceExistsByProviderID to cloud provider interface for CCM

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

Currently, [`MonitorNode()`](02b520f0a4/pkg/controller/cloud/nodecontroller.go (L240)) in the node controller checks with the CCM if a node still exists by calling `ExternalID(nodeName)`. `ExternalID` is supposed to return the provider id of a node which is not supported on every cloud. This means that any clouds who cannot infer the provider id by the node name from a remote location will never remove nodes that no longer exist. 


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

**Special notes for your reviewer**:

We'll want to create a subsequent issue to track the implementation of these two new methods in the cloud providers.

**Release note**:

```release-note
Adds `InstanceExists` and `InstanceExistsByProviderID` to cloud provider interface for the cloud controller manager
```

/cc @wlan0 @thockin @andrewsykim @luxas @jhorwit2

/area cloudprovider
/sig cluster-lifecycle
2017-08-26 06:43:30 -07:00
Kubernetes Submit Queue 932e07af53 Merge pull request #50031 from verult/ConnectedProbe
Automatic merge from submit-queue (batch tested with PRs 51054, 51101, 50031, 51296, 51173)

Dynamic Flexvolume plugin discovery, probing with filesystem watch.

**What this PR does / why we need it**: Enables dynamic Flexvolume plugin discovery. This model uses a filesystem watch (fsnotify library), which notifies the system that a probe is necessary only if something changes in the Flexvolume plugin directory.

This PR uses the dependency injection model in https://github.com/kubernetes/kubernetes/pull/49668.

**Release Note**:
```release-note
Dynamic Flexvolume plugin discovery. Flexvolume plugins can now be discovered on the fly rather than only at system initialization time.
```

/sig-storage

/assign @jsafrane @saad-ali 
/cc @bassam @chakri-nelluri @kokhang @liggitt @thockin
2017-08-26 02:05:34 -07:00
Kubernetes Submit Queue 21aa8cacc5 Merge pull request #50730 from andrewsykim/49836
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

Cloud Controller Manager now sets Node.Spec.ProviderID

**What this PR does / why we need it**:
Cloud Controller Manager now sets `Node.Spec.ProviderID`.

**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/49836. 

**Special notes for your reviewer**:
* As part of an effort to move cloud controller manager into beta https://github.com/kubernetes/kubernetes/issues/48690.
2017-08-25 20:43:37 -07:00
Kubernetes Submit Queue 9e69d5b8f0 Merge pull request #50595 from k82cn/k8s_50594
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

NodeConditionPredicates should return NodeOutOfDisk error.

**What this PR does / why we need it**:
In https://github.com/kubernetes/kubernetes/pull/49932 , I moved node condition check into a predicates; but it return incorrect error :(. 

We also need to add more cases to `TestNodeShouldRunDaemonPod` which is key function 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 #50594 

**Release note**:

```release-note
None
```
2017-08-25 20:43:35 -07:00
Josh Horwitz 82a69b2815 refactor method name as per comments 2017-08-25 16:25:19 -04:00
Josh Horwitz 3528ceb27f address test & doc comments 2017-08-25 16:15:55 -04:00
Matthew Wong 19ebaf2870 Don't update pvc.status.capacity if pvc is already Bound 2017-08-25 15:23:25 -04:00
Cheng Xing 396c3c7c6f Adding dynamic Flexvolume plugin discovery capability, using filesystem watch. 2017-08-25 11:42:32 -07:00
Kubernetes Submit Queue c19785cfea Merge pull request #49674 from crimsonfaith91/rollout
Automatic merge from submit-queue (batch tested with PRs 50033, 49988, 51132, 49674, 51207)

StatefulSet kubectl rollout command

**What this PR does / why we need it**: This PR implements StatefulSet kubectl rollout command, covering `history`, `status`, and `undo`.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
kubectl rollout `history`, `status`, and `undo` subcommands now support StatefulSets.
```
2017-08-25 11:07:15 -07:00
devinyan 8ab2110328 add an starting info log of namespace controller. 2017-08-26 00:25:37 +08:00
Klaus Ma e4c58a3c02 Added test case for Predicates. 2017-08-25 19:13:41 +08:00
Kubernetes Submit Queue 1d5b365ed5 Merge pull request #50213 from zhangxiaoyu-zidif/fix-comment-cronjob-utils
Automatic merge from submit-queue (batch tested with PRs 50213, 50707, 49502, 51230, 50848)

Fix comment of cronjob utils.go

**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 https://github.com/kubernetes/kubernetes/issues/50951

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-25 01:10:28 -07:00
andrewsykim 2cc3c33a4b Cloud Controller Manager now sets Node.Spec.ProviderID 2017-08-24 23:00:14 -04:00
andrewsykim bd3cc83110 cloudprovider.Zones should support external cloud providers 2017-08-24 21:05:49 -04:00
Josh Horwitz 2f1ea47c83 Add InstanceExists* methods to cloud provider interface for CCM 2017-08-24 20:41:28 -04:00
crimsonfaith91 ebdbafd2c5 statefulSet kubectl rollout command 2017-08-24 16:43:03 -07:00
Kubernetes Submit Queue 5a76d7ab63 Merge pull request #50539 from brendandburns/svc
Automatic merge from submit-queue (batch tested with PRs 51108, 51035, 50539, 51160, 50947)

Delete load balancers if the UIDs for services don't match.

An attempt to fix https://github.com/kubernetes/kubernetes/issues/43730

@thockin @djsly
2017-08-24 02:32:09 -07:00
Kubernetes Submit Queue b75d423979 Merge pull request #51066 from vmware/MultiAttachVolumeIssueVsphere
Automatic merge from submit-queue

Allow attach of volumes to multiple nodes for vSphere

This is a fix for issue #50944 which doesn't allow a volume to be attached to a new node after the node is powered off where the volume was previously attached.

Current behaviour:
One of the cluster worker nodes was powered off in vCenter.
Pods running on this node have been rescheduled on different nodes but got stuck in ContainerCreating. It failed to attach the volume on the new node with error "Multi-Attach error for volume pvc-xxx, Volume is already exclusively attached to one node and can't be attached to another" and hence the application running in the pod has no data available because the volume is not attached to the new node. Since the volume is still attached to powered off node, any attempt to attach the volume on the new node failed with error "Multi-Attach error". It's stuck for 6 minutes until attach/detach controller forcefully tried to detach the volume on the powered off node. After the end of 6 minutes when volume is detached on powered off node, the volume is now successfully attached on the new node and application has now the data available.

What is expected to happen:
I would want the attach/detach controller to go ahead with the attach of the volume on new node where the pod got provisioned instead of waiting for the volume to be detached on the powered off node. It is ok to eventually delete the volume on the powered off node after 6 minutes. This way the application downtime is low and pods are up as soon as possible.

The current fix ignore, vSphere volumes/persistent volume to check for multi-attach scenario in attach/detach controller.

@jingxu97 @saad-ali : Can you please take a look at it.

@tusharnt @divyenpatel @rohitjogvmw @luomiao 

```release-note
Allow attach of volumes to multiple nodes for vSphere
```
2017-08-23 14:32:31 -07:00
Matthew Wong 3ed34183d0 Add volume operation metrics to operation executor and PV controller 2017-08-23 14:27:47 -04:00
Kubernetes Submit Queue 2f00e6d72c Merge pull request #51116 from huzhengchuan/fix_comment_cm
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

Fix comment and typos in node_controller

**What this PR does / why we need it**: 
1. fix comment to more accurately
2. fix typos


**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-08-23 08:41:13 -07:00
Lars Lehtonen 3893e28b66
Fix swallowed error in attachdetach tests 2017-08-22 23:35:54 -07:00
Kubernetes Submit Queue f354857bfb Merge pull request #51020 from dunjut/master
Automatic merge from submit-queue (batch tested with PRs 50980, 46902, 51051, 51062, 51020)

fix confusion in service_controller

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

Fix code and comment confusion in `service_controller`.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-22 23:14:07 -07:00
Kubernetes Submit Queue 57ab7c6a64 Merge pull request #51062 from alrs/fix-statefulset-test-swallowed-errors
Automatic merge from submit-queue (batch tested with PRs 50980, 46902, 51051, 51062, 51020)

Fix swallowed errors in statefulset tests

**What this PR does / why we need it**: Fixes errors that were being swallowed in the tests of the statefulset package.

```release-note NONE
```
2017-08-22 23:14:05 -07:00
Kubernetes Submit Queue 70632276bb Merge pull request #50806 from verult/VolumeNotYetAttached
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

On AttachDetachController node status update, do not retry when node …

…doesn't exist but keep the node entry in cache.



**What this PR does / why we need it**: An alternative fix for https://github.com/kubernetes/kubernetes/issues/42438 which also fixes #50721.

Instead of removing the node entry entirely from the node status update cache (which prevents the node from ever being updated even when it recovers), here the node status updater does nothing, so that there won't be an update retry until the node is re-added, where the cache entry is set to true.

Will cherry pick to prior versions after this is merged.

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

**Release Note**:
``` release-note
On AttachDetachController node status update, do not retry when node doesn't exist but keep the node entry in cache.
```

/assign @jingxu97 
/cc @saad-ali 
/sig storage
/release-note
2017-08-22 19:45:27 -07:00
Eric Paris 2b08d1e5a1 Merge pull request #51144 from joelsmith/skip-endpoints-update
Fix unready endpoints bug introduced in #50934
2017-08-22 19:56:17 -04:00
Joel Smith d6aa7fb716 Fix unready endpoints bug introduced in #50934
A pod status change of unready -> ready results in a move from
the endpoint's unready endpoint addresses to its ready addresses
so if a pod update contains an unready -> ready status change,
the endpoint needs to be updated.
2017-08-22 13:46:11 -06:00
Kubernetes Submit Queue 336e38bd4d Merge pull request #51044 from kow3ns/sts-immutable-network-id
Automatic merge from submit-queue (batch tested with PRs 51102, 50712, 51037, 51044, 51059)

fix #51043

**What this PR does / why we need it**: The StatefulSet controller no longer attempts to mutate "hostname" or "subdomain" fields of the "pod.spec" to enforce the network identity of Pods in a StatefeulSet. Since these fields are set upon creation and immutable thereafter setting the annotations is no longer necessary. 
fixes: #51043
2017-08-22 12:28:06 -07:00
zhengchuan hu 05f52c6f22 Fix comment to more accurately 2017-08-22 22:08:46 +08:00
du c9941ff4d2 fix confusion in service_controller
remove worthless comment line
2017-08-22 20:14:18 +08:00
Diego Pontoriero 9baaeba435
daemon_controller: fix typo.
With the existing code, some edge cases might lead to the wrong pods
being deleted.
2017-08-21 23:05:27 -07:00
Kubernetes Submit Queue aa41ff26d0 Merge pull request #50934 from joelsmith/skip-endpoints-update
Automatic merge from submit-queue (batch tested with PRs 46458, 50934, 50766, 50970, 47698)

Skip non-update endpoint updates

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

On large clusters, a large percentage of endpoint updates are actually non-updates that occur as a result of a change in an associated pod. This results in endpoint updates where the only field that has changed is the `TargetRef.ResourceVersion` in the endpoint address associated with the changed pod. Given enough of these non-updates, the endpoint controller's queue rate limit can be overwhelmed and legitimate updates can be delayed, resulting in (temporarily) broken services. We have clusters where we've seen endpoint updates take 9 minutes.

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

**Special notes for your reviewer**:
N/A

**Release note**:
```release-note
Prevent unneeded endpoint updates
```
2017-08-21 18:11:19 -07:00
Kubernetes Submit Queue 198e83588b Merge pull request #46458 from jsafrane/mount-prep
Automatic merge from submit-queue (batch tested with PRs 46458, 50934, 50766, 50970, 47698)

Prepare VolumeHost for running mount tools in containers

This is the first part of implementation of https://github.com/kubernetes/features/issues/278 - running mount utilities in containers.

It updates `VolumeHost` interface:

*  `GetMounter()` now requires volume plugin name, as it is going to return different mounter to different volume plugings, because mount utilities for these plugins can be on different places.
* New `GetExec()` method that should volume plugins use to execute any utilities. This new `Exec` interface will execute them on proper place.
* `SafeFormatAndMount` is updated to the new `Exec` interface.

This is just a preparation, `GetExec` right now leads to simple `os.Exec` and mount utilities are executed on the same place as before. Also, the volume plugins will be updated in subsequent PRs (split into separate PRs, some plugins required lot of changes).

```release-note
NONE
```

@kubernetes/sig-storage-pr-reviews 
@rootfs @gnufied
2017-08-21 18:11:16 -07:00
Balu Dontu cfdff1ae46 Multi-Attach volume fix for vSphere 2017-08-21 18:06:29 -07:00
Lars Lehtonen 9f8d57a2d4
Fix swallowed errors in statefulset tests 2017-08-21 17:12:36 -07:00
Kenneth Owens a6473d82dc StatefulSet controller no longer attempts to mutate v1.PodSpec.Hostname or v1.PodSpec.Subdomain 2017-08-21 13:08:31 -07:00
Seth Jennings a06236dd72 Factor out endpoint address generation, skip unneeded endpoint updates
Also add unit tests for new endpoint helpers related to updatePod
2017-08-20 06:26:25 -06:00
Kubernetes Submit Queue b59ad9cbff Merge pull request #50146 from gmarek/deepcopyinto
Automatic merge from submit-queue (batch tested with PRs 46512, 50146)

Make metav1.(Micro)?Time functions take pointers

Is there any reason for those functions not to be on pointers?
2017-08-19 11:28:15 -07:00
Kubernetes Submit Queue 5cc3cda03d Merge pull request #50490 from liyinan926/master
Automatic merge from submit-queue

Use CollisionCount for collision avoidance in StatefulSet controller

**What this PR does / why we need it**:
This PR uses the newly added `CollisionCount` in `StatefulSetStatus` for name collision avoidance when the `StatefulSet` controller creates `ControllerRevision`s. The `CreateControllerRevision` method of the `ControllerHistory` interface was augmented to use a user-specified `collisionCount` instead of the internal probe that always starts with 0. The `StatefulSet` controller uses the `CreateControllerRevision` to create `ControllerRevision`s and when it calls it, it passes in the `CollisionCount` of the `StatefulSet` it manipulates. 
  
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49909.

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

**Release note**:
```release-note
Use CollisionCount for collision avoidance when creating ControllerRevisions in StatefulSet controller
```
2017-08-18 11:14:08 -07:00
Kubernetes Submit Queue 9553e89a19 Merge pull request #50860 from wlan0/master
Automatic merge from submit-queue

Proposal to add @wlan0 to appropriate owner files

@thockin @luxas
2017-08-18 10:24:20 -07:00
Yinan Li 46c6aea1cf Use CollisionCount for collision avoidance in StatefulSet controller 2017-08-18 06:49:02 -07:00
Kubernetes Submit Queue afabd09889 Merge pull request #50876 from enj/enj/f/owners_reviewer
Automatic merge from submit-queue

Add enj as reviewer to OWNERS

Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

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

**Release note**:

```release-note
NONE
```

@kubernetes/sig-api-machinery-pr-reviews
@kubernetes/sig-auth-pr-reviews
2017-08-18 05:42:07 -07:00
Di Xu 85602fd542 CollisionCount should have type int32 across controllers that use it for collision avoidance 2017-08-18 10:48:12 +08:00