Commit Graph

52678 Commits (fdc65025ee1c828a4afbbad2830d6918b5b972d4)

Author SHA1 Message Date
Kubernetes Submit Queue fdc65025ee Merge pull request #50337 from bowei/node-controller-repackage
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

Break up node controller into packages

This change does NO actual code changes other than moving constituent
parts into packages.

```release-note
NONE
```
2017-08-09 14:14:35 -07:00
Kubernetes Submit Queue 458cc04330 Merge pull request #46254 from mtaufen/dkcfg
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

Alpha Dynamic Kubelet Configuration

Feature: https://github.com/kubernetes/features/issues/281

This proposal contains the alpha implementation of the Dynamic Kubelet Configuration feature proposed in ~#29459~ [community/contributors/design-proposals/dynamic-kubelet-configuration.md](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md). 

Please note:
- ~The proposal doc is not yet up to date with this implementation, there are some subtle differences and some more significant ones. I will update the proposal doc to match by tomorrow afternoon.~
- ~This obviously needs more tests. I plan to write several O(soon). Since it's alpha and feature-gated, I'm decoupling this review from the review of the tests.~ I've beefed up the unit tests, though there is still plenty of testing to be done.
- ~I'm temporarily holding off on updating the generated docs, api specs, etc, for the sake of my reviewers 😄~ these files now live in a separate commit; the first commit is the one to review.

/cc @dchen1107 @vishh @bgrant0607 @thockin @derekwaynecarr 

```release-note
Adds (alpha feature) the ability to dynamically configure Kubelets by enabling the DynamicKubeletConfig feature gate, posting a ConfigMap to the API server, and setting the spec.configSource field on Node objects. See the proposal at https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md for details.
```
2017-08-09 14:14:32 -07:00
Kubernetes Submit Queue 212928ad14 Merge pull request #49930 from soltysh/remove_scheduledjobs
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

Remove scheduledjobs

This is a prerequisite for promoting CronJobs to beta.

**Release note**:
```release-note
Remove deprecated ScheduledJobs endpoints, use CronJobs instead.
```
2017-08-09 14:14:30 -07:00
Kubernetes Submit Queue 82b3a80ad1 Merge pull request #49583 from irfanurrehman/fed-hpa-configTimeout
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

[Federation] Make the hpa scale time window configurable

This PR is on top of open pr https://github.com/kubernetes/kubernetes/pull/45993.
Please review only the last commit in this PR.
This adds a config param to controller manager, the value of which gets passed to hpa adapter via sync controller.
This is needed to reduce the overall time limit of the hpa scaling window to much lesser (then the default 2 mins) to get e2e tests run faster. Please see the comment on the newly added parameter.

**Special notes for your reviewer**:
@kubernetes/sig-federation-pr-reviews 
@quinton-hoole 
@marun to please validate the mechanism used to pass a parameter from cmd line to adapter.

**Release note**:

``` 
federation-controller-manager gets a new flag --hpa-scale-forbidden-window.
This flag is used to configure the duration used by federation hpa controller to determine if it can move max and/or min replicas 
around (or not), of a cluster local hpa object, by comparing current time with the last scaled time of that cluster local hpa. 
Lower value will result in faster response to scalibility conditions achieved by cluster local hpas on local replicas, but too low 
a value can result in thrashing. Higher values will result in slower response to scalibility conditions on local replicas.
```
2017-08-09 14:14:27 -07:00
Kubernetes Submit Queue 6faaca02af Merge pull request #50016 from yastij/photon-checkAttach
Automatic merge from submit-queue

checking if disk is already attached for photon

**What this PR does / why we need it**: check if disk is already attached

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

**Release note**:

```release-note
```
2017-08-09 13:23:31 -07:00
Kubernetes Submit Queue 68ac78ae45 Merge pull request #49640 from jsafrane/systemd-mount-service
Automatic merge from submit-queue

Run mount in its own systemd scope.

Kubelet needs to run /bin/mount in its own cgroup.

- When kubelet runs as a systemd service, "systemctl restart kubelet" may kill all processes in the same cgroup and thus terminate fuse daemons that are needed for gluster and cephfs mounts.

- When kubelet runs in a docker container, restart of the container kills all fuse daemons started in the container.

Killing fuse daemons is bad, it basically unmounts volumes from running pods.

This patch runs mount via "systemd-run --scope /bin/mount ...", which makes sure that any fuse daemons are forked in its own systemd scope (= cgroup) and they will survive restart of kubelet's systemd service or docker container.

This helps with #34965

As a downside, each new fuse daemon will run in its own transient systemd service and systemctl output may be cluttered.

@kubernetes/sig-storage-pr-reviews 
@kubernetes/sig-node-pr-reviews 

```release-note
fuse daemons for GlusterFS and CephFS are now run in their own systemd scope when Kubernetes runs on a system with systemd.
```
2017-08-09 12:05:01 -07:00
Kubernetes Submit Queue 190ee708a6 Merge pull request #48659 from shiywang/fix-sort
Automatic merge from submit-queue

Fix sort-by output problem

Fixes https://github.com/kubernetes/kubectl/issues/43

This bug was original introduced in pr here: https://github.com/kubernetes/kubernetes/pull/46265, I think next time if we touch something printer related package, maybe should let @smarterclayton have a review, although he is pretty busy I guess : ) and that package also changed a lot recently since he's been working on refactoring.
 
this is a quick and dirty fix, not sure if there's better way, I will add some regression test soon...

@kubernetes/sig-cli-pr-reviews 

```release-note
NONE
```

/assign @mengqiy 
/assign @smarterclayton
2017-08-09 10:56:49 -07:00
Kubernetes Submit Queue da549596c4 Merge pull request #49534 from smarterclayton/separate_proxy
Automatic merge from submit-queue

Support exec/attach/portforward in `kubectl proxy`

Use the UpgradeAwareProxy shared code in kubectl proxy. Provide a separate transport for those requests that does not have HTTP/2 enabled. Refactor the code to be a bit cleaner in places and to better separate changes.

Fixes #32026

```release-note
`kubectl proxy` will now correctly handle the `exec`, `attach`, and `portforward` commands.  You must pass `--disable-filter` to the command in order to allow these endpoints.
```
2017-08-09 09:53:35 -07:00
Kubernetes Submit Queue 6a0d3c7494 Merge pull request #46069 from waseem/variadic-command-addition-to-parent-command
Automatic merge from submit-queue

Use variadic nature of *cobra.Command.AddCommand to add group of commands to a parent command

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

Rather than looping over commands in a group and add it one by one to a
parent command, use variadic nature of *cobra.Command.AddCommand to add
the group of commands to the parent.
2017-08-09 06:33:10 -07:00
Kubernetes Submit Queue 3655685d64 Merge pull request #50330 from mwielgus/default-pricing
Automatic merge from submit-queue

Ensure that pricing expander is used by default in Cluster Autoscaler

Pricing expander was set as the default one for GCP, however on some occasion it was possible that AUTOSCALER_EXPANDER_CONFIG variable was not set resulting in using the the random expander.
2017-08-09 04:30:09 -07:00
Yassine TIJANI bc3ef455dd checking if disk is already attached for photon. 2017-08-09 11:35:37 +02:00
Kubernetes Submit Queue 65574809cd Merge pull request #50333 from shyamjvs/add-debug-to-logexporter
Automatic merge from submit-queue (batch tested with PRs 50173, 50324, 50288, 50263, 50333)

Add debug logs to log-dump

ref https://github.com/kubernetes/test-infra/issues/3981

cc @fejta @krzyzacy
2017-08-09 02:22:00 -07:00
Kubernetes Submit Queue 8f5f061c66 Merge pull request #50263 from liyinan926/branch1
Automatic merge from submit-queue (batch tested with PRs 50173, 50324, 50288, 50263, 50333)

Copy annotations from StatefulSet to owned ControllerRevisions

**What this PR does / why we need it**:
This PR starts copying annotations from a `StatefulSet`'s metadata to the `ControllerRevision`s it owns. `DaemonSet` controller copies the annotations from a `DaemonSet`s metadata to the `ControllerRevision`s it owns. One of the annotation copied is `kubernetes.io/change-cause`, which is used in `DaemonSetHistoryViewer` to fill in the `CHANGE-CAUSE` column of revision history of a `DaemonSet`.

For consistency, the `StatefulSet` controller should do the same, i.e., copy annotations in a `StatefulSet`'s metadata to the `ControllerRevision`s it owns for consistency. 

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

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

**Release note**:
```release-note
Copy annotations from a StatefulSet's metadata to the ControllerRevisions it owns
```
2017-08-09 02:21:58 -07:00
Kubernetes Submit Queue 788664b7f7 Merge pull request #50288 from liggitt/service-account-warning
Automatic merge from submit-queue (batch tested with PRs 50173, 50324, 50288, 50263, 50333)

Honor --use-service-account-credentials and warn when missing private key

Fixes #50275 by logging a warning and failing to start rather than continue to run ignoring the user's specified config
2017-08-09 02:21:56 -07:00
Kubernetes Submit Queue dee7dca626 Merge pull request #50324 from mtaufen/fix-test-import
Automatic merge from submit-queue (batch tested with PRs 50173, 50324, 50288, 50263, 50333)

Add blank import for node tests

The node tests weren't being run because the weren't imported in the test/e2e/e2e_test.go file.
Thanks to @abgworrall for sounding the alarm (he noticed [sig-node] wasn't in the test results)!

/assign @yujuhong 
/cc @abgworrall
2017-08-09 02:21:54 -07:00
Kubernetes Submit Queue 35e5197eca Merge pull request #50173 from luxas/kubeadm_constants
Automatic merge from submit-queue

kubeadm: Centralize commonly used paths/constants to the constants pkg

**What this PR does / why we need it**:
Before there were constants defined for the control plane components in three different places:
 - images
 - phases/controlplane
 - phases/selfhosting

Now they are in one centralized place. I also moved funcs for building common paths to that lib.

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

Dependency for: https://github.com/kubernetes/kubernetes/pull/48899

**Special notes for your reviewer**:

Most of this PR really is autogenerated with a replace tool. I tested this and things work just normally as well.

**Release note**:

```release-note
NONE
```
@timothysc @dmmcquay @pipejakob @kubernetes/sig-cluster-lifecycle-pr-reviews
2017-08-09 01:41:19 -07:00
Kubernetes Submit Queue 35cba5263a Merge pull request #50177 from msau42/local-e2e
Automatic merge from submit-queue

Fix local storage test failures

**What this PR does / why we need it**:
Fixed a few issues:
- CI environment on GCE cannot resolve node names, need to use IPs.  Use a different SSH wrapper that will get the IPs from the node object.
- Use hostdir instead of containerdir now that commands are executed directly on the host, instead of through a container.
- Get the PVC object again after it is bound so that it has the PV name.

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

**Release note**:
NONE

/release-note-none
/sig storage
2017-08-09 00:52:41 -07:00
Kubernetes Submit Queue 3d91ba577d Merge pull request #50175 from foxish/update-strategies
Automatic merge from submit-queue

Change default update strategy to rolling update

Fixes https://github.com/kubernetes/kubernetes/issues/49604
Change default update strategy to rolling update for daemonset and statefulset in v1beta2

cc @kubernetes/sig-apps-pr-reviews @lukaszo @kargakis 

**Release note**:

```release-note
Make rolling update the default update strategy for v1beta2.DaemonSet and v1beta2.StatefulSet
```
2017-08-09 00:00:21 -07:00
caleb miles 2e505002b7 Merge pull request #47280 from euank/rmek
owners: remove euank from sig-node-reviewers
2017-08-08 23:49:52 -07:00
Kubernetes Submit Queue 8c4a269b83 Merge pull request #49771 from feiskyer/wait-for-failure
Automatic merge from submit-queue

Add waitForFailure for e2e test framework

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

Add waitForFailure for e2e test framework, this could reduce the reliance on logs.

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

Part of #44118. Refer https://github.com/kubernetes/kubernetes/pull/48858#discussion_r128331726

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-08 20:56:51 -07:00
Kubernetes Submit Queue a5b4899ae2 Merge pull request #49223 from alexandercampbell/kubectl-impl-only-structuredgenerator
Automatic merge from submit-queue

kubectl: deploy generators don't need to impl Generator iface

The `kubectl create deployment` generators do not need to implement the Generator interface, since they are only used as implementations of the StructuredGenerator interface. I was able to delete some tests of their Generator methods as part of this change.

### Considerations for code reviewers

1. Every other StructuredGenerator implementation implements the Generator interface in additional. My change makes the "create deployment" generators a little unusual. I've added a docstring to this effect in `util/factory_client_access.go`.
2. This significantly reduces the maintenance / testing burden for future updates to `kubectl create deployment`.

**Release note**:

```release-note
NONE
```
2017-08-08 19:04:34 -07:00
Kubernetes Submit Queue 2bd2127390 Merge pull request #49340 from janetkuo/apps-v1beta2-dep-rollback
Automatic merge from submit-queue

Deprecate Deployment .spec.rollbackTo field 

~Depends on #48746~ (merged)
xref: #46934, #49135

1. Deprecate Deployment field `.spec.rollbackTo` in `extensions/v1beta1` and `apps/v1beta1`, and remove the same field and `/rollback` endpoint from `apps/v1beta2` Deployment. 
1. Add an annotation `deprecated.deployment.rollback.to` in `apps/v1beta2` for conversion to/from other versions. 

Note: `apps/v1beta2` is new in 1.8 (and WIP), so it is okay to make breaking changes to it. 

```release-note
Deprecate Deployment .spec.rollbackTo field 
```
2017-08-08 18:15:38 -07:00
Bowei Du 61c43f6468 golint fixes 2017-08-08 17:04:50 -07:00
Kubernetes Submit Queue 5793be779b Merge pull request #50290 from piosz/mon-heapster
Automatic merge from submit-queue

Added monitoring sidecar for Heapster
2017-08-08 16:31:06 -07:00
Bowei Du 27854fa0d8 Break up node controller into packages
This change does NO actual code changes other than moving constituent
parts into packages.
2017-08-08 15:33:56 -07:00
Anirudh 37091c3744 Autogenerated 2017-08-08 15:24:12 -07:00
Anirudh 27e6ceed88 Change default update strategy to rolling update 2017-08-08 15:24:09 -07:00
Kubernetes Submit Queue 9b6e6f5327 Merge pull request #50291 from liggitt/restmapper-flake
Automatic merge from submit-queue

Change test to work around restmapper pluralization bug

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

Works around the pluralization bug to unblock the queue.
Once the restmapper bug is fixed in https://github.com/kubernetes/kubernetes/pull/50012, we should add tests specifically for unconventional singular/plural word endings.
2017-08-08 14:46:39 -07:00
Kubernetes Submit Queue 3e0eff9f55 Merge pull request #50310 from shyamjvs/block-on-master-startup
Automatic merge from submit-queue

Block on master-creation step for large clusters (>50 nodes) in kube-up

I recently noticed a failure in our 5000-node scale test where the master failed to initialize within time. But it went on and created all 5000 nodes due to not blocking on master creation. Turned out the master VM wasn't even created:

```
W0808 10:00:49.340] ERROR: (gcloud.compute.instances.create) Could not fetch resource:
... Try a different zone, or try again later.
```

Even some of our 100-node tests are flaking occasionally during cluster startup (with master validation step timing out) and I think the reason is the same (issue - https://github.com/kubernetes/kubernetes/issues/49453)
We should block on that step for large clusters.

cc @kubernetes/sig-scalability-misc @gmarek
2017-08-08 13:56:50 -07:00
Shyam Jeedigunta 7456716120 Add debug logs to log-dump 2017-08-08 21:43:09 +02:00
Michael Taufen 378544362c core generated files 2017-08-08 12:21:37 -07:00
Michael Taufen 6f0bd47fd8 additional generated files 2017-08-08 12:21:37 -07:00
Michael Taufen 443d58e40a Dynamic Kubelet Configuration
Alpha implementation of the Dynamic Kubelet Configuration feature.
See the proposal doc in #29459.
2017-08-08 12:21:37 -07:00
Yinan Li 2c1ada38d0 Merge branch 'master' of github.com:kubernetes/kubernetes into branch1 2017-08-08 12:13:22 -07:00
Marcin Wielgus d0bedba9e1 Ensure that pricing expander is used by default in Cluster Autoscaler 2017-08-08 20:52:07 +02:00
Michael Taufen 20f68942d3 Add blank import for node tests 2017-08-08 09:05:23 -07:00
Kubernetes Submit Queue c9d142d73d Merge pull request #49382 from bskiba/kubemark_e2e_nm
Automatic merge from submit-queue

Add a simple cloud provider for e2e tests on kubemark

**What this PR does / why we need it**:
Adds a simplified cloud provider for kubemark. This enables us to add and
remove nodes and operate on nodegroups while running tests on kubemark.

This is needed to run scalability tests for cluster autoscaler on kubemark.
See https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/proposals/kubemark_integration.md

**Release note**:
```
NONE
```
2017-08-08 08:50:07 -07:00
Maciej Szulik 0cb8bae6ac
Generated changes after removing ScheduledJobs 2017-08-08 15:57:03 +02:00
Jan Safranek dd03384747 Detect systemd on mounter startup 2017-08-08 15:40:27 +02:00
Maciej Szulik e465962bf7
Remove ScheduledJobs support 2017-08-08 15:22:26 +02:00
Kubernetes Submit Queue f6cb2fce00 Merge pull request #49587 from ryanmcnamara/rm/improve-error-message
Automatic merge from submit-queue (batch tested with PRs 48068, 49587)

DNS name error message improvement

**What this PR does / why we need it**:
Small error message fix. The error message misled me slightly / would have saved time if correct

**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
**Special notes for your reviewer**:
n/a
**Release note**:

n/a
2017-08-08 05:29:51 -07:00
Shyam Jeedigunta 2eafc562fa Block on master-creation step for large clusters (>50 nodes) in kube-up 2017-08-08 14:09:15 +02:00
Lucas Käldström 9a6ef9677a
kubeadm: Centralize commonly used paths/constants to the constants pkg 2017-08-08 15:07:21 +03:00
Kubernetes Submit Queue 6b529fb096 Merge pull request #48068 from soltysh/cronjob_removal_e2e
Automatic merge from submit-queue

Add e2e test for cronjob chained removal

This is test proving https://github.com/kubernetes/kubernetes/pull/44058 works with cronjobs. This will fail until the aforementioned PR merges. 

@caesarxuchao ptal
2017-08-08 04:58:17 -07:00
Piotr Szczesniak bad549d725 Added monitoring sidecar for Heapster 2017-08-08 13:15:43 +02:00
Kubernetes Submit Queue b80ce17b40 Merge pull request #48063 from zouyee/obc
Automatic merge from submit-queue

complete and correct code comment

**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-08-08 04:03:19 -07:00
Kubernetes Submit Queue 6b99a007d3 Merge pull request #50179 from k82cn/mv_node_testutils
Automatic merge from submit-queue (batch tested with PRs 50254, 50174, 50179)

Moved node/testutil to upper dir.

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

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

**Release note**:

```release-note
N/A
```
2017-08-08 04:02:56 -07:00
Kubernetes Submit Queue 608b81a63f Merge pull request #50174 from luxas/kubeadm_add_back_component_label
Automatic merge from submit-queue (batch tested with PRs 50254, 50174, 50179)

kubeadm: Add back labels for the Static Pod control plane

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

This Labels section has been removed now for a short period during the v1.8 dev cycle, but I found a good use-case for it; namely filtering Mirror Pods by the `component=kube-*` label when waiting for the self-hosted control plane to come up after an upgrade. It's not _really_ neccessary, but nice to have.

Also noticed the lack of coverage for this func, so added a small unit test.

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

Dependency for: https://github.com/kubernetes/kubernetes/pull/48899

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @dmmcquay @timothysc @mattmoyer
2017-08-08 04:02:54 -07:00
Kubernetes Submit Queue 187e6ab0bc Merge pull request #50254 from liggitt/revert-disk-cache
Automatic merge from submit-queue (batch tested with PRs 50254, 50174, 50179)

Revert "Merge pull request #47353 from apelisse/http-cache"

Some issues were discovered with the caching merged in #47353:
* uses a disk-based cache that is not safe between processes (does not use atomic fs operations)
* writes get/list responses to disk that should not be cached (like `kubectl get secrets`)
* is vulnerable to partially written cache responses being used as responses to future requests
* breaks uses of the client transport that make use of websockets
* defaults to enabling the cache for any client builder using RecommendedConfigOverrideFlags or DefaultClientConfig which affects more components than just kubectl

This reverts commit fc89743dca, reversing changes made to 29ab38e898.
2017-08-08 04:02:51 -07:00
Kubernetes Submit Queue 38f497a665 Merge pull request #50293 from xingzhou/add-err-return
Automatic merge from submit-queue (batch tested with PRs 45993, 50293)

Add error return for the Marshal object invocation.

Add error return for the Marshal object invocation.

**Release note**:
```
None
```
2017-08-08 02:54:55 -07:00