Commit Graph

2718 Commits (43280e274db67545fd7f765db4fde2f00ef97f89)

Author SHA1 Message Date
Kubernetes Submit Queue c30f5e1d3c Merge pull request #46761 from yastij/syncService-remove-copy
Automatic merge from submit-queue (batch tested with PRs 48106, 46761)

removing unnecessary shallow copy on SyncService

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

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

**Special notes for your reviewer**:

**Release note**:

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

Speed up attach/detach controller integration tests

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

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

Fixes #47129 

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

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

PV controller tests are the slowest ones now.

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

```release-note
NONE
```
2017-06-27 14:08:17 -07:00
Kubernetes Submit Queue 6d1da16456 Merge pull request #47731 from jsravn/use-endpoints-cache-for-endpoint-controller
Automatic merge from submit-queue

Use endpoints informer for the endpoint controller

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

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



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

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

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

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

**Special notes for your reviewer**:

**Release note**:

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

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

Make background garbage collection cascading

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

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

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

cc @lavalamp @kargakis @krmayankk @enisoc 

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

Get rid of 30s ResyncPeriod in endpoint controller

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

/cc @smarterclayton @gmarek
2017-06-26 04:20:12 -07:00
Chao Xu 31d0869f83 revert 45764 2017-06-25 21:41:10 -07:00
Kubernetes Submit Queue 8dabdf7081 Merge pull request #46955 from zjj2wry/nodecontroller_matrics
Automatic merge from submit-queue

Fix const naming in node/metrics

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-23 22:22:16 -07:00
Jun Xiang Tee ae4df9f573 deprecate created-by annotation for cronjob 2017-06-23 11:05:40 -07:00
Kubernetes Submit Queue 6a047dd71d Merge pull request #47772 from jianglingxia/jlx620
Automatic merge from submit-queue (batch tested with PRs 47694, 47772, 47783, 47803, 47673)

delete the for loops that done nothing

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-23 08:29:26 -07:00
Kubernetes Submit Queue 8679677e87 Merge pull request #47579 from wanghaoran1988/fix_43322
Automatic merge from submit-queue (batch tested with PRs 47958, 46261, 46667, 47709, 47579)

Clean up Deployment overlap annotation code

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

**Special notes for your reviewer**:

**Release note**:

```
None
```
2017-06-23 07:21:36 -07:00
Kubernetes Submit Queue 76103db5e4 Merge pull request #47709 from krmayankk/ss
Automatic merge from submit-queue (batch tested with PRs 47958, 46261, 46667, 47709, 47579)

use appsv1beta1 for statefulsets

**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 #
fixes https://github.com/kubernetes/kubernetes/issues/46922
2017-06-23 07:21:33 -07:00
Kubernetes Submit Queue 508e298153 Merge pull request #47119 from zjj2wry/cccc
Automatic merge from submit-queue (batch tested with PRs 47227, 47119, 46280, 47414, 46696)

controller: fix error message

**What this PR does / why we need it**:
just fix error typo, think you :)

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-22 23:59:19 -07:00
Kubernetes Submit Queue 18362beb0d Merge pull request #42254 from justinsb/volumes_dont_leak_nodestatusupdateneeded
Automatic merge from submit-queue

volumes: SetNodeStatusUpdateNeeded on error

If an error happened during the UpdateNodeStatuses loop, there were some
code paths where we would not call SetNodeStatusUpdateNeeded, leaking
the state.  Add it to all paths by adding a function.

Part of #40583

```release-note
NONE
```
2017-06-22 21:43:04 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kubernetes Submit Queue d0a2beb1e7 Merge pull request #42249 from justinsb/volumes_logging
Automatic merge from submit-queue (batch tested with PRs 42252, 42251, 42249, 47512, 47887)

volumes: Add logging when removing node fails

Part of #40583

```release-note
NONE
```
2017-06-21 22:13:30 -07:00
Kubernetes Submit Queue b795ec7de0 Merge pull request #42251 from justinsb/simplify_append
Automatic merge from submit-queue (batch tested with PRs 42252, 42251, 42249, 47512, 47887)

volumes: simplify append-to-slice code

Minor simplification - can append to empty/nil slice.

Part of #40583

```release-note
NONE
```
2017-06-21 22:13:27 -07:00
Kubernetes Submit Queue bebe346d5f Merge pull request #42252 from justinsb/volumes_raise_loglevels
Automatic merge from submit-queue (batch tested with PRs 42252, 42251, 42249, 47512, 47887)

volumes: promote some logs from info -> warning

Part of #40583

```release-note
NONE
```
2017-06-21 22:13:24 -07:00
Kubernetes Submit Queue 3ea93b2753 Merge pull request #47822 from liggitt/secret-storage-config
Automatic merge from submit-queue

Separate serviceaccount and secret storage config

Fixes #47815, and is required in order to enable the secret encryption feature with a recommended configuration

This passes distinct storage options for serviceaccounts and secrets, since secrets can now have an encrypting transformer associated with them
2017-06-21 08:01:37 -07:00
Jordan Liggitt 3de8e52c8a
Separate serviceaccount and secret storage config 2017-06-20 23:49:10 -04:00
Kubernetes Submit Queue 5780cd06d1 Merge pull request #47572 from justinsb/fix_47524
Automatic merge from submit-queue

AWS: Remove blackhole routes in our managed range

Blackhole routes otherwise acccumulate unboundedly.  We also are careful
to ensure that we do so only within the managed range, which requires
enlisting the help of the routecontroller.

Fix #47524

```release-note
AWS: clean up blackhole routes when using kubenet
```
2017-06-20 17:00:30 -07:00
Kubernetes Submit Queue 2df2247a82 Merge pull request #42250 from justinsb/volumes_getnodeandvolume_comment
Automatic merge from submit-queue

volumes: add comment on getNodeAndVolume

Add comments on getNodeAndVolume to explain the code - it is a little
subtle, and it confused me on first reading.

Part of #40583

```release-note
NONE
```
2017-06-20 15:07:47 -07:00
Shyam Jeedigunta 97fdc0582c Get rid of 30s ResyncPeriod in endpoint controller 2017-06-20 17:05:47 +02:00
jianglingxia 8e07664914 delete the for loops that done nothing 2017-06-20 11:20:30 +08:00
Kenneth Owens 45eeaab715 Fixes a bug where RollingUpdateStrategy combined with Parallel pod management allows for more than one Pod to be unready during update. We want this behavior during turn up and turn down but not during update. Otherwise we risk violating reasonable disruption budgets. 2017-06-19 06:53:46 -07:00
Mayank Kumar 5ee1831fa9 use appsv1beta1 for statefulsets and controller
history
2017-06-18 02:16:47 -07:00
Kubernetes Submit Queue 464831e240 Merge pull request #47557 from janetkuo/hash-label-rename
Automatic merge from submit-queue (batch tested with PRs 46884, 47557)

Rename DaemonSet and StatefulSet hash label

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @kow3ns 
/cc @bgrant0607 
@kubernetes/sig-apps-api-reviews
2017-06-16 11:34:01 -07:00
Jacob Simpson 334de1cbe1 Auto approve kubelet certificate signing requests. 2017-06-16 08:47:12 -07:00
Jan Safranek b28790a63b Speed up attach/detach controller integration tests
Internal attach/detach controller timers should be configurable and tests
should use much shorter values.

reconcilerSyncDuration is deliberately left out of TimerConfig because it's
the only one that's not a constant one, it's configurable by user.
2017-06-16 12:15:04 +02:00
Haoran Wang f732e4baae Clean up Deployment overlap annotation code 2017-06-16 14:20:44 +08:00
Janet Kuo 25a67fc5cd Rename DaemonSet and StatefulSet hash label
Make them share the same hash label "controller-revision-hash", for
consistency
2017-06-15 18:04:27 -07:00
Kubernetes Submit Queue 289de0ee14 Merge pull request #45764 from krmayankk/depl-del-rs
Automatic merge from submit-queue (batch tested with PRs 47492, 47542, 46800, 47545, 45764)

delete dependent pods for rs when deleting deployments

Fix #44046, where user reported that the garbage collector didn't delete pods when a deployment was deleted with PropagationPolicy=Background.
2017-06-14 21:43:48 -07:00
Justin Santa Barbara 11f8886f12 AWS: Remove blackhole routes in our managed range
Blackhole routes otherwise acccumulate unboundedly.  We also are careful
to ensure that we do so only within the managed range, which requires
enlisting the help of the routecontroller.

Fix #47524
2017-06-14 23:02:55 -04:00
Mayank Kumar ff503dbc32 delete dependent pods for rs when deleting deployments 2017-06-14 12:52:02 -07:00
Janet Kuo 52a05d1632 Do not add unique label to DaemonSet 2017-06-13 17:04:27 -07:00
Janet Kuo f43060ea41 Construct history once and pass around in DaemonSet sync loop 2017-06-13 17:04:27 -07:00
Kubernetes Submit Queue 351d4d6df9 Merge pull request #47084 from janetkuo/daemonset-history-followup
Automatic merge from submit-queue (batch tested with PRs 47084, 46016, 46372)

Update adoption/release of DaemonSet controller history, and wait for history store sync

**What this PR does / why we need it**: 
~Depends on #47075, so that DaemonSet controller can update history's controller ref. Ignore that commit when reviewing.~ (merged)

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

**Special notes for your reviewer**: @kubernetes/sig-apps-bugs 

**Release note**:

```release-note
NONE
```
2017-06-13 16:53:39 -07:00
Kubernetes Submit Queue 7560142e27 Merge pull request #47276 from kow3ns/rm-partition-strategy
Automatic merge from submit-queue (batch tested with PRs 46441, 43987, 46921, 46823, 47276)

Remove PartitionStatefulSetStrategyType

This PR removes PartitionStatefulSetStrategyType add adds a parameter to RollingUpdateStatefulSetStrategyType as described in the issue below. We need this PR to ensure that the StatefulSet API conforms to the existing API for DaemonSet.

fixes #46975
```release-note
NONE
```
@kargakis 
@smarterclayton 
@janetkuo
2017-06-13 13:55:53 -07:00
Kubernetes Submit Queue 38837b018b Merge pull request #47274 from wongma7/accessmodes-provision
Automatic merge from submit-queue (batch tested with PRs 46929, 47391, 47399, 47428, 47274)

Don't provision for PVCs with AccessModes unsupported by plugin

Fail early in case the user actually expects e.g. RWM from AWS when in reality that isn't possible.
@eparis @gnufied 

edit: this needs release note because it's a breaking bugfix; will write one.

https://github.com/kubernetes/kubernetes/issues/46540
```release-note
Fix dynamic provisioning of PVs with inaccurate AccessModes by refusing to provision when PVCs ask for AccessModes that can't be satisfied by the PVs' underlying volume plugin
```
2017-06-13 10:52:17 -07:00
Janet Kuo 0035d86248 Update adoption/release of DaemonSet controller history 2017-06-12 23:33:31 -07:00
Janet Kuo abf7a88c4c Wait for history store synced 2017-06-12 23:33:31 -07:00
Kubernetes Submit Queue aa35738a21 Merge pull request #47075 from janetkuo/ds-history-patch
Automatic merge from submit-queue

Change what is stored in DaemonSet history `.data`

**What this PR does / why we need it**: 
In DaemonSet history `.data`, store a strategic merge patch that can be applied to restore a DaemonSet. Only PodSpecTemplate is saved. 

This will become consistent with the data stored in StatefulSet history. 

Before this fix, a serialized pod template is stored in `.data`; however, seriazlized pod template isn't a `runtime.RawExtension`, and caused problems when controllers try to patch the history's controller ref. 

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

**Special notes for your reviewer**: @kubernetes/sig-apps-bugs @erictune @kow3ns @kargakis @lukaszo @mengqiy 

**Release note**:

```release-note
NONE
```
2017-06-12 23:31:08 -07:00
Kubernetes Submit Queue 3b05e19076 Merge pull request #47000 from caesarxuchao/fix-gc-orphan
Automatic merge from submit-queue (batch tested with PRs 47000, 47188, 47094, 47323, 47124)

GC should retry on patch error

Fixing https://github.com/kubernetes/kubernetes/issues/46998.

This is fixing a bug, so applying the 1.7 milestone.
2017-06-12 18:19:40 -07:00
Kenneth Owens b1ce1ffc55 Removes PartitionStatefulSetStrategyType and Partition from UpdateStrategy and replaces them with a parameterized RollingUpdate strategy. 2017-06-12 10:06:09 -07:00
Matthew Wong 5e788a6a67 Don't provision for PVCs with AccessModes unsupported by plugin 2017-06-12 12:56:41 -04:00