Commit Graph

46343 Commits (515987db3f039f5f19c3f6292af072b937aacdd7)

Author SHA1 Message Date
Jacob Simpson 515987db3f Change the PEM block type to use the constant 2017-04-07 10:24:53 -07:00
Kubernetes Submit Queue 5e442a3f61 Merge pull request #44180 from copejon/fix-improper-pd-cleanup
Automatic merge from submit-queue (batch tested with PRs 43373, 41780, 44141, 43914, 44180)

move PD delete to AfterEach

**What this PR does / why we need it**:
Fixes a bug in PersistentVolume E2E that causes GCEPDs to be left un-deleted after a test ends.

```release-note
None
```
2017-04-07 09:57:42 -07:00
Kubernetes Submit Queue 19991ca53f Merge pull request #43914 from ncdc/configurable-dockershim-socket
Automatic merge from submit-queue (batch tested with PRs 43373, 41780, 44141, 43914, 44180)

kubelet: make dockershim.sock configurable

**What this PR does / why we need it**: allow the path to dockershim.sock to be configurable, so downstream projects such as OpenShift can run integration tests without needing to run them as root

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```

cc @derekwaynecarr @sttts @kubernetes/rh-cluster-infra @kubernetes/sig-node-pr-reviews
2017-04-07 09:57:41 -07:00
Kubernetes Submit Queue 97c38377f3 Merge pull request #44141 from k82cn/ss_typo
Automatic merge from submit-queue (batch tested with PRs 43373, 41780, 44141, 43914, 44180)

Updated comments according to the logic.

Updated comments according to the logic: it'll return empty string instead of nil if failed to match the regex.
2017-04-07 09:57:39 -07:00
Kubernetes Submit Queue 1ce438d953 Merge pull request #41780 from ddongchen/release-1.5
Automatic merge from submit-queue (batch tested with PRs 43373, 41780, 44141, 43914, 44180)

fix scheduling metrics error for E2eSchedulingLatency
2017-04-07 09:57:37 -07:00
Kubernetes Submit Queue 9095c78f14 Merge pull request #43373 from supereagle/fix-typos
Automatic merge from submit-queue (batch tested with PRs 43373, 41780, 44141, 43914, 44180)

fix some typos in apiserver

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

**Which issue this PR fixes**: 

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-04-07 09:57:35 -07:00
Kubernetes Submit Queue ad3e0903f3 Merge pull request #43804 from Crazykev/wrong-err
Automatic merge from submit-queue

fix wrong error return

Signed-off-by: Crazykev <crazykev@zju.edu.cn>



**What this PR does / why we need it**: The err return here is wrong, correct 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-04-07 05:06:39 -07:00
Kubernetes Submit Queue 4957a232b1 Merge pull request #42978 from brendandburns/federation
Automatic merge from submit-queue (batch tested with PRs 39139, 42978)

Extract long strings and make available for translation.

@fabianofranz @zen
2017-04-07 02:32:18 -07:00
Kubernetes Submit Queue ba349794ab Merge pull request #39139 from bruceauyeung/k8s-branch-small-code-improvements-and-fix-some-typos
Automatic merge from submit-queue

small code improvements and fix some typos

Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>

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

1. eliminate unnecessary extra scale up limit calculation
2. eliminate unnecessary extra pods length computation
3. fix some typos
2017-04-07 02:22:05 -07:00
Kubernetes Submit Queue fce31358c5 Merge pull request #41050 from marun/fed-ctlr-refactor
Automatic merge from submit-queue

[Federation] refactor controller for secrets

First pass of a simple federation controller that can be configured via an adapter to support multiple types.  The controller is a strict refactor of the secrets controller.

Targets #40989 

cc: @kubernetes/sig-federation-pr-reviews
2017-04-07 01:38:34 -07:00
Kubernetes Submit Queue 8d173c96ad Merge pull request #44178 from opsnull/master
Automatic merge from submit-queue

fix kubedns-sa.yaml missing "namespace: kube-system" value

The file kubedns-sa.yaml  missing `namespace: kube-system`,  so it will create ServiceAccount kube-dns in default namespace, this will cause kube-dns deployment's pods be blocked forever;

Some logs as following:

>     - lastTransitionTime: 2017-04-06T19:02:12Z
>       lastUpdateTime: 2017-04-06T19:02:12Z
>       message: 'unable to create pods: pods "kube-dns-699984412-" is forbidden: service
>         account kube-system/kube-dns was not found, retry after the service account

**Release note**:

```release-note
NONE
```
2017-04-07 00:18:43 -07:00
Kubernetes Submit Queue ca1f844bc8 Merge pull request #44072 from marun/fed-moar-e2e-cleanup
Automatic merge from submit-queue (batch tested with PRs 44191, 44117, 44072)

[Federation] Cleanup e2e framework

This PR is intended to simplify maintenance of the federation e2e tests:

 - refactor cluster helpers into framework so they can be reused by upgrade tests
 - remove unused functions
 - move backend pod management to the tests that require it rather than relying on the common cluster object
 - use a slice instead of a map to manage cluster objects to make it simpler for tests that need it to find the primary cluster themselves

Commit ``fed: Refactor e2e cluster functions into framework for reuse`` was originally included in #43500, but is included here because it formed the basis for this cleanup.

cc: @kubernetes/sig-federation-pr-reviews @perotinus
2017-04-06 22:16:22 -07:00
Kubernetes Submit Queue 8c61829da8 Merge pull request #44117 from madhusudancs/fed-e2e-name-for-parallel-presubmit
Automatic merge from submit-queue (batch tested with PRs 44191, 44117, 44072)

Default FEDERATION_KUBE_CONTEXT to FEDERATION_NAME in federation e2e up/down scripts.

This is consistent with how kubefed creates kubeconfig contexts.

**Release note**:
-->
```release-note
NONE
```
2017-04-06 22:16:20 -07:00
Kubernetes Submit Queue bbf15d5c33 Merge pull request #44191 from msau42/pv-upgrade-fix
Automatic merge from submit-queue (batch tested with PRs 44191, 44117, 44072)

Fix pv upgrade test failure

**What this PR does / why we need it**:
2 changes were made that broke the pv upgrade test:
1. MakePod() was changed so that the volume mount point is at /mnt/volume<n> instead of /mnt.  This change updates the path that the pod writes to.
2. The MakePod() call was changed to CreatePod(), which creates the pod and expects a long running pod.  But the upgrade test uses a short running pod, and the call to TestContainerOutput() will also create the pod. This changes it back to MakePod()


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

**Special notes for your reviewer**:

**Release note**:

NONE
2017-04-06 22:16:18 -07:00
Brendan Burns 79f51923d3 Extract a bunch more strings from kubectl 2017-04-06 20:12:50 -07:00
supereagle e35b7d1082 fix some typos in apiserver 2017-04-07 09:49:55 +08:00
Michelle Au 93e3fe8eb3 Fix pv upgrade test failure 2017-04-06 18:14:45 -07:00
Maru Newby ea825085b3 fed: Manage e2e clusters with a slice instead of a map
There was no code relying on a map, and using a slice eliminates the
need to select the primary cluster when retrieving registered
clusters.
2017-04-06 18:02:08 -07:00
Maru Newby b2bdc9235e fed: Refactor e2e backend pod management for maintainability
This change separates backend pod management from cluster management
2017-04-06 18:02:08 -07:00
Maru Newby 25da547399 fed: remove unused e2e framework 2017-04-06 18:02:08 -07:00
Maru Newby d4552c52bf fed: Refactor e2e cluster functions into framework for reuse 2017-04-06 18:02:08 -07:00
Maru Newby d08e9d96ef fed: Create generic synchronizer from refactored secret controller 2017-04-06 17:47:11 -07:00
Maru Newby 82e73efe83 fed: Abstract secret controller interaction with the secret type
This change uses an adapter class to abstracts the interaction of the
secret controller with the secret api type.  This is the first step to
creating a generic controller that can target any type for which an
adapter exists.
2017-04-06 17:47:06 -07:00
Kubernetes Submit Queue 27cf62ac29 Merge pull request #43940 from xlgao-zju/rm-all-containers
Automatic merge from submit-queue (batch tested with PRs 42025, 44169, 43940)

[CRI] Remove all containers in the sandbox

Remove all containers in the sandbox, when we remove the sandbox.

/cc @feiskyer @Random-Liu 

Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2017-04-06 17:00:23 -07:00
Kubernetes Submit Queue 0653751fb4 Merge pull request #44169 from mikedanese/fix
Automatic merge from submit-queue (batch tested with PRs 42025, 44169, 43940)

if we have a dedicated serviceaccount keypair, use it to verify serviceaccounts
2017-04-06 17:00:20 -07:00
Kubernetes Submit Queue d7f5929603 Merge pull request #42025 from marun/fed-crud-interation-test
Automatic merge from submit-queue

[Federation] Add integration test for secrets

This PR adds an integration test for secrets that:

 - performs create/read/update/delete on federation resources and validates that the changes are propagated to member clusters.  
 - uses an abstraction layer (fixture and adapter) to minimize the code required to support each federated type
   - It should be possible to replace a test-specific adapter with a runtime adapter in the future (as per #41050)
 - reuses fixture (federation api and clusters) across different resource types to minimize setup overhead
   - on a fast machine, setup takes ~4s, and validating each type takes ~2s  
 - uses the [Subtest feature added in Go 1.7](https://blog.golang.org/subtests) to allow the test for a specific controller to be run in isolation
   - ``make test-integration WHAT="federation  -test.run=TestFederationCRUD/secret"``

Once this PR merges the test can be extended to target other federated types.

This PR targets #40705

cc: @kubernetes/sig-federation-pr-reviews @derekwaynecarr
2017-04-06 16:54:44 -07:00
Kubernetes Submit Queue af341e3fd1 Merge pull request #44179 from mikedanese/saltsucks
Automatic merge from submit-queue

make salt return non-zero exit code on failure

Fixes https://github.com/kubernetes/kubernetes/issues/32478
2017-04-06 16:08:49 -07:00
Kubernetes Submit Queue aa1bd2b3e0 Merge pull request #43818 from kargakis/reduce-deployment-replicas
Automatic merge from submit-queue (batch tested with PRs 41189, 43818)

Reduce deployment replicas in e2e tests

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

There are still two tests that run multiple replicas (testScaledRolloutDeployment, testIterativeDeployments), we may want to revisit them at some point.
2017-04-06 15:12:21 -07:00
Kubernetes Submit Queue 063a5ca6fd Merge pull request #41189 from NickrenREN/kubelet-dswp-test
Automatic merge from submit-queue (batch tested with PRs 41189, 43818)

add dswp unit test case
2017-04-06 15:12:18 -07:00
Jon Cope 497a5bbbe2 move PD delete to AfterEach 2017-04-06 16:35:35 -05:00
Kubernetes Submit Queue 6cd23c6023 Merge pull request #44167 from soundcloud/mr/restore-updating-endpoints-log-message
Automatic merge from submit-queue

Restore "Setting endpoints" log message

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

The "Setting endpoints" message from kube-proxy at high verbosity was
lost as part of a larger simplification in kubernetes/kubernetes#42747.

This change brings it back, simply outputting the just-constructed
addresses list.

I need this message to monitor delays in propagating endpoints changes across nodes.

**Release note**:

```release-note
NONE
```
2017-04-06 14:04:09 -07:00
Mike Danese e2d7e2c866 make salt return non-zero exit code on failure 2017-04-06 13:57:33 -07:00
Anthony Yeh b34bf6a0ab Update CHANGELOG.md for v1.7.0-alpha.1. 2017-04-06 13:54:17 -07:00
opsnull 7978ad17a9 fix kubedns-sa.yaml missing "namespace: kube-system" value 2017-04-07 03:52:51 +08:00
Kubernetes Submit Queue ef075a441f Merge pull request #44105 from krousey/kubeadm
Automatic merge from submit-queue

Adding krousey as a kubeadm reviewer and owner

I would like to join the illustrious ranks of kubeadm owners. I plan to spend a considerable amount of time integrating this tool into our GCE and GKE deployments. If approver is too much, I would still like to be a reviewer.

I will mark this as "Do not merge" until I see approval from all current owners.
2017-04-06 12:46:05 -07:00
Kubernetes Submit Queue 033bf6fd8b Merge pull request #44053 from thockin/proxy-healthchecks
Automatic merge from submit-queue (batch tested with PRs 43871, 44053)

Proxy healthchecks overhaul

The first commit is #44051 

These three commits are tightly coupled, but should be reviewed one-by-one.  The first adds tests for healthchecks, and found a bug.  The second basically rewrites the healthcheck pkg to be much simpler and less flexible (since we weren't using the flexibility).  The third tweaks how healthchecks are handled in endpoints-path to be more like they are in services-path.

@MrHohn because I know you were in here for source-IP GA work.

@wojtek-t
2017-04-06 12:36:26 -07:00
Kubernetes Submit Queue 64973188dd Merge pull request #43871 from liggitt/patch-mutation
Automatic merge from submit-queue (batch tested with PRs 43871, 44053)

Fix original object mutation on patch retry

When applying a patch, the original state of the object and patch are captured so that retries can determine if an overlapping update was made to the object, and the patch API call should abort with a conflict.

However, the `strategicPatchObject -> applyPatchToObject -> StrategicMergeMapPatch -> mergeMap` call mutates both the original object map and the patch map, making them unsuitable for reusing for subsequent calls.

We saw this in a [downstream test](https://github.com/openshift/origin/blob/master/test/integration/patch_test.go) that exercises patch conflict retries, where the data being submitted in a patch was showing up in the original object data map.

Since mergeMap *also* mutates the patch map passed in (deletes patch directives as it encounters them), we *also* cannot reuse the patch map in `applyPatchToObject` once it has been used.

This PR:
* Builds `originalObjMap` separate from the initial patch application for later use in conflict detection
* Changes the `originalPatchMap` to a helper that returns a fresh map from original sources
* Adds an integration test that exercises retry of non-overlapping patches with patches containing `$patch` directives
2017-04-06 12:36:23 -07:00
Matthias Rampke 7bc6f81dd6 Generate dereferenced array of endpoints
for printing. Only do this if verbosity requires it.
2017-04-06 18:26:10 +00:00
Kubernetes Submit Queue 3e57317677 Merge pull request #44133 from spxtr/pdflake
Automatic merge from submit-queue (batch tested with PRs 44143, 44133)

Mark PD test as flaky.

**What this PR does / why we need it**: Marks "PD should be mountable" as flaky. See #43977, which shows that it has flaked at least 7 times in the last 3 days. @kubernetes/sig-storage-test-failures

**Release note**:
```release-note
NONE
```
2017-04-06 11:19:24 -07:00
Kubernetes Submit Queue a30339ba49 Merge pull request #44143 from ivan4th/fix-panic-in-kubeadm-master-node-setup
Automatic merge from submit-queue (batch tested with PRs 44143, 44133)

Fix panic in kubeadm master node setup

The problem was [caught](https://travis-ci.org/Mirantis/kubeadm-dind-cluster/jobs/218999640#L3249) by kubeadm-dind-cluster CI.
```
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.6.1
[init] Using Authorization mode: RBAC
[preflight] Skipping pre-flight checks
[certificates] Generated CA certificate and key.
[certificates] Generated API server certificate and key.
[certificates] API Server serving cert is signed for DNS names [kube-master kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 10.192.0.2]
[certificates] Generated API server kubelet client certificate and key.
[certificates] Generated service account token signing key and public key.
[certificates] Generated front-proxy CA certificate and key.
[certificates] Generated front-proxy client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/scheduler.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/controller-manager.conf"
[apiclient] Created API client, waiting for the control plane to become ready
[apiclient] All control plane components are healthy after 19.017839 seconds
panic: assignment to entry in nil map

goroutine 1 [running]:
panic(0x1b62140, 0xc4203f0380)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig.attemptToUpdateMasterRoleLabelsAndTaints(0xc420b18be0, 0x4e, 0x0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig/setupmaster.go:57 +0x15b
k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig.UpdateMasterRoleLabelsAndTaints(0xc420b18be0, 0x1a, 0xc420b18be0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig/setupmaster.go:86 +0x2f
k8s.io/kubernetes/cmd/kubeadm/app/cmd.(*Init).Run(0xc4201a4040, 0x29886e0, 0xc420022010, 0x1c73d01, 0xc4201a4040)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubeadm/app/cmd/init.go:220 +0x29c
k8s.io/kubernetes/cmd/kubeadm/app/cmd.NewCmdInit.func1(0xc4203a46c0, 0xc420660680, 0x0, 0x2)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubeadm/app/cmd/init.go:86 +0x197
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).execute(0xc4203a46c0, 0xc420660560, 0x2, 0x2, 0xc4203a46c0, 0xc420660560)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:603 +0x439
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4203b1d40, 0xc4203a4b40, 0xc4203a46c0, 0xc4203a4000)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:689 +0x367
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4203b1d40, 0xc42046c420, 0x29886a0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:648 +0x2b
k8s.io/kubernetes/cmd/kubeadm/app.Run(0xc420627f70, 0xc4200001a0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubeadm/app/kubeadm.go:35 +0xe8
main.main()
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubeadm/kubeadm.go:26 +0x22
```
2017-04-06 11:19:22 -07:00
Mike Danese ffcbe213c1 if we have a dedicated serviceaccount keypair, use it to verify serviceaccounts 2017-04-06 11:06:25 -07:00
Kubernetes Submit Queue c2f3c483a1 Merge pull request #42363 from copejon/extract-volume-utils
Automatic merge from submit-queue

Extract e2e utility code into framework

**What this PR does / why we need it**:
There's a growing dependency on Volume e2e utilities related to creating / test against NFS volumes.  For this reason, it's useful to relocate the relevant functions to the `framework` pkg.   Doing so makes these utility functions available to e2e tests outside the `e2e` package.


This PR only moves code from the `e2e` package to `framework` and handle the relevant changes in calls.  It does not change any logic.  


```release-note
NONE
```

@jingxu97 I think there's value here in reducing duplicate code in the `common` package, given that these functions have been copied down to it.  However, there's been some divergence.  Can you PTAL and let me know if there's any reason we can't remove the duplicate `common` code?

cc @jeffvance
2017-04-06 09:55:50 -07:00
Jordan Liggitt c415e4aeab
Fix original object mutation on patch retry 2017-04-06 12:30:43 -04:00
Kubernetes Submit Queue aead989bef Merge pull request #44042 from gmarek/swap-taints
Automatic merge from submit-queue (batch tested with PRs 42961, 44042)

Allow swapping NotReady and Unschedulable Taints

Fix #43444

cc @kubernetes/sig-scheduling-pr-reviews @davidopp @aveshagarwal @mdshuai

For cherrypick @ethernetdan
2017-04-06 09:29:24 -07:00
Kubernetes Submit Queue 54f38688d7 Merge pull request #42961 from wanghaoran1988/fix_39032
Automatic merge from submit-queue

leader election lock based on scheduler name

**What this PR does / why we need it**:
This pr changed the leader election lock based on scheduler name.
**Which issue this PR fixes** :
fixes #39032

**Special notes for your reviewer**:

**Release note**:
```
[scheduling]Fix a bug for multiple-schedulers that you cannot start a second scheduler without disabling leader-elect if the default scheduler has leader-elect enabled(default). We changed the leader election lock based on scheduler name.
```
2017-04-06 09:12:11 -07:00
Andy Goldstein 010b71a5f7 kubelet: make dockershim.sock configurable
Make the location of dockershim.sock configurable, so downstream
projects (such as OpenShift) can place it in a location that does not
require root access (e.g. for integration tests).

Make the kubelet respect and use the values of
--container-runtime-endpoint and --image-service-endpoint, if set. If
unset, the default value of /var/run/dockershim.sock is used.
2017-04-06 12:01:21 -04:00
Matthias Rampke 06ed262ff8 Restore "Setting endpoints" log message
The "Setting endpoints" message from kube-proxy at high verbosity was
lost as part of a larger simplification in kubernetes/kubernetes#42747.

This change brings it back, simply outputting the just-constructed
addresses list.
2017-04-06 15:40:52 +00:00
Kubernetes Submit Queue 2d66f7bd28 Merge pull request #42557 from xilabao/use-authorizationModes
Automatic merge from submit-queue

Allow multiple providers for authorizationMode

fixes https://github.com/kubernetes/kubeadm/issues/177
2017-04-06 08:03:04 -07:00
Ivan Shvedunov 24b8ed5d84 Fix panic in kubeadm master node setup 2017-04-06 14:50:13 +03:00
Michail Kargakis 5f6a8c8d23
Reduce deployment replicas in e2e tests
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-04-06 12:54:43 +02:00