Commit Graph

3208 Commits (52492e683f51685cb5a702ff0c4b8272b853f0a1)

Author SHA1 Message Date
Kubernetes Submit Queue b79e3d14d1
Merge pull request #55772 from liggitt/gc-ignored-resources
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>.

Only attempt to construct GC informers for watchable resources

A resource must support list/watch in addition to delete for an informer to be functional

Exclude resources that are not watchable from informer construction

Also fixes a bug with the graph builder not using the instance-configured list of ignored resources

/assign @ironcladlou

```release-note
NONE
```
2017-11-16 15:16:16 -08:00
Kubernetes Submit Queue 817e8a2e43
Merge pull request #55758 from wackxu/updateService
Automatic merge from submit-queue (batch tested with PRs 55657, 54758, 47584, 55758, 55651). 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>.

WaitForCacheSync fail should return for service controller

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

1. WaitForCacheSync fail should return for service controller as other controller
2. remove unused function
3. fix several weak error follow up #54280 according to https://github.com/golang/go/wiki/CodeReviewComments#error-strings

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-15 23:57:31 -08:00
Kubernetes Submit Queue 74369ea44c
Merge pull request #55683 from gregory-m/remove-unnecessary-conversion
Automatic merge from submit-queue (batch tested with PRs 55764, 55683, 55468, 54409, 55546). 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 unnecessary type conversion

nodeName is string variable and it unnecessary to convert it to string.

```release-note
NONE
```
2017-11-15 22:15:56 -08:00
Kubernetes Submit Queue 9c08d30412
Merge pull request #55681 from gregory-m/remove-unused-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>.

Removed unused function.

Removed unused int64P function from controller_utils_test.go

**Release note**:
```release-note
NONE
```
2017-11-15 14:30:42 -08:00
wackxu ead429ebda WaitForCacheSync fail should return for service controller 2017-11-15 21:08:07 +08:00
Jordan Liggitt dbfc43f723
Only attempt to construct GC informers for watchable resources 2017-11-15 02:26:58 -05:00
Cao Shufeng 86968e44d0 remove duplicated import 2017-11-14 17:18:17 +08:00
Gregory Man 62923517fa Removed unnecessary type conversion
nodeName is string variable and it unnecessary to convert it to string.
2017-11-14 11:04:18 +02:00
Gregory Man ac8216027a Removed unused function.
Removed unused int64P function from controller_utils_test.go
2017-11-14 10:53:29 +02:00
David Eads e52383c486 add clusterrole aggregation controller 2017-11-13 08:18:00 -05:00
David Eads a53e5de3db generated 2017-11-13 08:18:00 -05:00
Kubernetes Submit Queue 1e9204ba44
Merge pull request #55144 from houjun41544/20171106
Automatic merge from submit-queue (batch tested with PRs 54987, 55221, 54099, 55144, 54215). 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 not sync the volume when  claim.Spec.VolumeName is null 

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2017-11-10 14:51:30 -08:00
Dr. Stefan Schimanski 1e79dfb959 Update generated code 2017-11-10 18:26:46 +01:00
Kubernetes Submit Queue 9ed5d380aa
Merge pull request #45792 from rpothier/cidr_allocator_ipv6
Automatic merge from submit-queue (batch tested with PRs 46946, 45792). 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>.

Updating NewCIDRSet return a value

**What this PR does / why we need it**:
Updating NewCIDRSet return value
    
For IPv6, NewCIDRSet was updated to return an error if the subnet mask size
is too big. In this case, NewCIDRSet will fail and return an error.



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

**Special notes for your reviewer**:


**Release note**:

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

Deduplicate RC/RS controller code.

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

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

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

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

use versiond group clients from client-go

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

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

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

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

Node which is not present not need update NodeAddress

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


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

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-11-08 12:18:44 -08:00
Kubernetes Submit Queue 42d5dc709e
Merge pull request #55259 from ironcladlou/gc-partial-discovery
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Tolerate partial discovery in garbage collector

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

Fixes #55022.

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

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

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

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

Check RegisterMetricAndTrackRateLimiterUsage error when starting BootstrapSigner & TokenCleaner controllers

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-07 11:21:15 -08:00
supereagle b694d51842 use versiond group clients from client-go 2017-11-07 14:47:22 +08:00
Kubernetes Submit Queue 85877a5aa1
Merge pull request #54523 from jekohk/sync-rollout-status-add-unit-tests
Automatic merge from submit-queue (batch tested with PRs 55063, 54523, 55053). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

unit tests for syncRolloutStatus in pkg/controller/deployment

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

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

**Release note**:

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

refactor ReplicaSet sync call tree

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

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

**Release note**:

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

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

trigger endpoint update on pod deletion

Fixes #54723

cc: @joelsmith 

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

Update volume OWNERS to reflect active sig-storage reviewers

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

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

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

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

Signed-off-by: John Kelly <jekohk@gmail.com>
2017-11-01 16:17:24 -04:00
Ferran Rodenas d67898b875 Check RegisterMetricAndTrackRateLimiterUsage error when starting controllers
Signed-off-by: Ferran Rodenas <rodenasf@vmware.com>
2017-11-01 12:46:07 +01:00
Kubernetes Submit Queue ed00d9c062
Merge pull request #54445 from crimsonfaith91/rem
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove created-by annotation

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

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

**Release note**:

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

Initial integration test setup for DaemonSet controller

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

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

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

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

Flag gate node exclusion for service load balancers.

@thockin @jdumars 

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

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

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

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

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

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

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

Ability to do object count quota for all namespaced resources

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

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

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

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

remove duplicated code 

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

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

**Special notes for your reviewer**:

handler initiated twice.

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

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

```release-note
NONE
```
2017-10-27 09:11:21 -07:00
Derek Carr 7f88e91892 Update quota controller to monitor all types 2017-10-27 11:07:53 -04:00