Commit Graph

39785 Commits (38ace68c17bd6cfccd696d74d581b88ee0ba2b86)

Author SHA1 Message Date
Kubernetes Submit Queue 38ace68c17 Merge pull request #36662 from deads2k/fix-proxy-tls
Automatic merge from submit-queue

make spdy.roundtripper usable with UpgradeAwareProxyHandler

the `spdy.RoundTripper` was incompatible for use on `https` connections by the `UpgradeAwareProxyHandler` because it couldn't find the TLS config.

This check would get `nil` https://github.com/kubernetes/kubernetes/blob/master/pkg/util/proxy/dial.go#L48 because it didn't recognize the type which would result in failures later on.  That would cause a failure that ripples out to here: https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/generic/rest/proxy.go#L151 and prevents the proxy from working.
2016-12-01 07:52:13 -08:00
Kubernetes Submit Queue 15fa210056 Merge pull request #36217 from xilabao/get-detail-about-rolebinding
Automatic merge from submit-queue

add kubectl get rolebindings/clusterrolebindings -o wide

Use "-o wide" to get more information of roleRef/subjects
`kubectl get rolebindings -o wide`

|NAME | AGE | ROLE | USERS | GROUPS | SERVICEACCOUNTS|
|:-------|:-------|:-------|:-------|:-------|:-------|
|admin-resource-binding |1s | Role/admin-resource-role | test | | |


`kubectl get clusterrolebindings -o wide`

|NAME|AGE|ROLE|USERS|GROUPS|SERVICEACCOUNTS|
|:-------|:-------|:-------|:-------|:-------|:-------|
|cluster-admin|27s|cluster-admin| |system:masters| |
|system:basic-user|27s|system:basic-user| |system:authenticated, system:unauthenticated | |
|system:controller:replication-controller|27s|system:controller:replication-controller | | |kube-system/replication-controller|
|system:discovery |27s|system:discovery| |system:authenticated, system:unauthenticated| |
2016-12-01 07:52:11 -08:00
Kubernetes Submit Queue 376a3ba8a4 Merge pull request #37810 from jszczepkowski/ha-e2e-tests
Automatic merge from submit-queue

HA master: fixed load balancer creation - added project flag
2016-12-01 07:52:09 -08:00
Kubernetes Submit Queue 069c263abd Merge pull request #37639 from MrHohn/e2e-reboot-dump
Automatic merge from submit-queue

Adds termination hook in reboot test for debugging

From #33405 and #36230.

Logs the SSH command issued for dropping inbound / outbound traffic to file and dump it out when test ends.

The first `sudo iptables -t filter -nL` is called to confirm the rules are injected. The second `sudo iptables -t filter -nL` is to check whether the rules get clobbered. Adds `date` in between to check time frame.

@bprashanth @freehan
2016-12-01 07:52:07 -08:00
Kubernetes Submit Queue 4c50486735 Merge pull request #37020 from deads2k/rbac-20-delegated-role
Automatic merge from submit-queue

auth delegation role

Add a bootstrap role for authentication and authorization delegation.  Useful for extension API servers.

@kubernetes/sig-auth
2016-12-01 06:31:31 -08:00
Kubernetes Submit Queue e407a1fe6d Merge pull request #35417 from zdj6373/runtime
Automatic merge from submit-queue

RunnningContainerStatues spelling mistake

runtime.go:in the function GetRunningContainerStatuses, runnningContainerStatues spelling mistake,  modified into runningContainerStatus
2016-12-01 06:31:29 -08:00
Kubernetes Submit Queue 5c2117764b Merge pull request #36055 from m1093782566/m109-fix-proxy-hasjump
Automatic merge from submit-queue

[kube-proxy] Fix Jump() bug in pkg/proxy/iptables/proxier_test.go

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**Which issue this PR fixes**

Fixes #36043
2016-12-01 06:31:27 -08:00
Kubernetes Submit Queue 8f07fc3d41 Merge pull request #36437 from humblec/glusterfs-clusterid-prov
Automatic merge from submit-queue

Add `clusterid`, an optional parameter to storageclass.

At present, admin doesn't have the privilege to chose the
trusted storage pool from which persistent gluster volume
has to be provided.

This patch introduce a new storage class parameter which allows
the admin to specify storage pool/cluster if required.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-01 06:31:25 -08:00
Kubernetes Submit Queue 1570aad238 Merge pull request #37451 from jszczepkowski/ha-read-quorum
Automatic merge from submit-queue

Added setting etcd read quorum flag
2016-12-01 06:31:24 -08:00
Kubernetes Submit Queue 4fa1114ab5 Merge pull request #37443 from sttts/sttts-non-root-local-cluster
Automatic merge from submit-queue

local-up-cluster: avoid sudo for control plane

Only run control plane as root if the CERT_DIR is not writable.

Makes it easier to use e.g. delve against control plane processes.
2016-12-01 06:31:03 -08:00
Kubernetes Submit Queue 13f3b23cf6 Merge pull request #37812 from mwielgus/dis_big_cl
Automatic merge from submit-queue

Skip some disruption e2e test in big clusters

cc: @wojtek-t @davidopp
2016-12-01 06:30:51 -08:00
Marcin Wielgus cf92f1cdba Skip some disruption e2e test in big clusters 2016-12-01 14:26:38 +01:00
Dr. Stefan Schimanski 4ca84f9f63 local-up-cluster: avoid sudo for control plane 2016-12-01 14:10:12 +01:00
Kubernetes Submit Queue 44f00e1019 Merge pull request #36707 from sttts/sttts-local-cluster-up-client-certs
Automatic merge from submit-queue

Activate client certs in local-cluster-up.sh for RBAC

- set up client certs for each component in local-cluster-up.sh
2016-12-01 04:52:14 -08:00
Kubernetes Submit Queue 412a3d9914 Merge pull request #36785 from wlan0/kubelet
Automatic merge from submit-queue

No need to ScrubDNS anymore

@thockin This removes the DNS scrubber from kubelet.
2016-12-01 04:52:11 -08:00
Kubernetes Submit Queue d00696a0d8 Merge pull request #36769 from deads2k/auth-03-fix-impersonation
Automatic merge from submit-queue

clear impersonation headers

If you clone a request that came in after impersonation, you were also cloning the impersonation headers that came with it.  These seem roughly analogous to the `Authorization` header, so this clears them.

@kubernetes/sig-auth
2016-12-01 04:52:09 -08:00
Kubernetes Submit Queue 2fab199390 Merge pull request #36334 from luxas/add_preflight
Automatic merge from submit-queue

Add the system verification test to the kubeadm preflight checks

And refactor the system verification test to accept to write to a specific writer in order to customize the output

This PR is targeting v1.5, PTAL
cc @Random-Liu @dchen1107 @kubernetes/sig-cluster-lifecycle
2016-12-01 04:52:07 -08:00
Kubernetes Submit Queue 2c0e59b974 Merge pull request #37613 from wojtek-t/limitranger_index
Automatic merge from submit-queue

Add namespace index for limit ranger

Without this PR I'm seeing a huge number of lines like this:
```
Index with name namespace does not exist
```

Those are coming from LimitRanger admission controller - this PR fixes those.
2016-12-01 04:52:04 -08:00
Jerzy Szczepkowski 7035a59719 HA master: fixed load balancer creation - added project flag
HA master: fixed load balancer creation - added project flag.
2016-12-01 12:59:41 +01:00
Kubernetes Submit Queue aef15aa875 Merge pull request #36625 from bruceauyeung/branch-eliminate-recursive-call-attemptToUpdateMasterRoleLabelsAndTaints
Automatic merge from submit-queue

[kubeadm] use iteration instead of recursion in function

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

before this PR, function `attemptToUpdateMasterRoleLabelsAndTaints` recursively call itself. there are some defeats in it:
1. potential stack overflow.
2. unnecessary extra  `json.Marshal` calls.
3. unnecessary extra `client.Nodes().List` calls.

this PR rewrite `attemptToUpdateMasterRoleLabelsAndTaints` function, use iterate instead of recursion.
so these 3 defeats the metioned above are gone.
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-12-01 00:39:14 -08:00
Kubernetes Submit Queue 56779576f0 Merge pull request #36424 from xilabao/fix-forbid-clusterrole-with-namespace
Automatic merge from submit-queue

fix forbid clusterrole with namespace

run `kubectl get clusterroles --all-namespaces`
old version
return error message:
```
NAMESPACE   NAME      AGE
clusterRole is not namespaced
clusterRole is not namespaced
clusterRole is not namespaced
clusterRole is not namespaced
clusterRole is not namespaced
clusterRole is not namespaced
clusterRole is not namespaced
```


```release-note

Add error message when trying to use clusterrole with namespace in kubectl

```
2016-12-01 00:39:12 -08:00
Kubernetes Submit Queue 3dac320640 Merge pull request #36292 from jlowdermilk/no-gcloud-update
Automatic merge from submit-queue

Don't update gcloud in cluster/*/util.sh

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

Removes automatic gcloud update commands from `cluster/gce/util.sh`, `cluster/gke/util.sh`. Setting env `KUBE_PROMPT_FOR_UPDATE=y` will update required components, otherwise it will only verify that required components are present and at a minimum required version.

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

**Special notes for your reviewer**:

Inline python is nasty but I *really* don't want to do version comparison in bash. Open to other suggestions for verifying required version of gcloud components. cc @kubernetes/sig-cluster-lifecycle, @kubernetes/sig-testing 

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
`kube-up.sh`/`kube-down.sh` no longer force update gcloud for provider=gce|gke.
```
2016-12-01 00:39:10 -08:00
Kubernetes Submit Queue 256a99d220 Merge pull request #36432 from kargakis/controller-fixes
Automatic merge from submit-queue

Update deployment status only when there is a new scaling update during a rollout

@kubernetes/deployment
2016-12-01 00:39:09 -08:00
Kubernetes Submit Queue c74fae7b14 Merge pull request #36172 from apprenda/kubeadm-tests-table-driven
Automatic merge from submit-queue

kubeadm: changed tests to be table driven

Small change to migrate tests in kubeadm/app/util/tokens_test.go to be table driven which should make adding more tests in the future easier and also have them match how other tests are being written. 

This PR is part of the ongoing effort to add tests (#35025)
2016-12-01 00:39:07 -08:00
Kubernetes Submit Queue 5658addb9b Merge pull request #37413 from vmware/FixUnmountVolume
Automatic merge from submit-queue

kubernetes attempts to unmount a wrong vSphere volume and stops making any progress after that

This is in reference to the bug #37332 which was accidentally closed. So created this new PR.

The code is already reviewed as part of PR #37332 

Fixes issue #37022 

@saad-ali @jingxu97 @abrarshivani @kerneltime
2016-11-30 23:26:06 -08:00
Kubernetes Submit Queue d7fc8d106c Merge pull request #37730 from MrHohn/dns-deployment-maxUnavailable
Automatic merge from submit-queue

Set strategy spec for kube-dns to support zero downtime rolling update

From #37728 and coreos/kube-aws#111.

Set `maxUnavailable` to 0 to prevent DNS service outage during update when the replica number is only 1.

Also keeps all kube-dns yaml files in sync.

@bowei @thockin
2016-11-30 22:48:31 -08:00
Kubernetes Submit Queue d2badd6857 Merge pull request #37638 from roberthbailey/shell-equals
Automatic merge from submit-queue

Fix the equality checks for numeric values in cluster/gce/util.sh.

**What this PR does / why we need it**: This PR fixes an error in the gce shell scripts that results in inconsistent/incorrect behavior. 

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

**Special notes for your reviewer**: This needs to be backported to 1.5 and 1.4. 

@jszczepkowski
2016-11-30 21:59:14 -08:00
Kubernetes Submit Queue c4b33f3be3 Merge pull request #37661 from yujuhong/always_add_pods
Automatic merge from submit-queue

kubelet: don't reject pods without adding them to the pod manager

kubelet relies on the pod manager as a cache of the pods in the apiserver (and
other sources) . The cache should be kept up-to-date even when rejecting pods.
Without this, kubelet may decide at any point to drop the status update
(request to the apiserver) for the rejected pod since it would think the pod no
longer exists in the apiserver.

This should fix #37658
2016-11-30 21:59:12 -08:00
Kubernetes Submit Queue 1a11edfcde Merge pull request #37665 from ixdy/make-release-platform-envs
Automatic merge from submit-queue

build: clean platform envs to prevent cross-contamination

**What this PR does / why we need it**: As I described in https://github.com/kubernetes/kubernetes/issues/37079#issuecomment-263733509, we are leaking platform compilation envs between build stages for different platforms in the non-parallel dockerized cross build. This PR uses a subshell for the non-parallel build, more closely matching the parallel build.

This also adds some logging, which had it existed previously, may have made the bug more immediately obvious.

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

cc @sebgoa @iTagir @saad-ali
2016-11-30 21:59:10 -08:00
Kubernetes Submit Queue 6c2c12fafa Merge pull request #37582 from jingxu97/Nov/retrynfsv3
Automatic merge from submit-queue

Modify GCI mounter to enable NFSv3
2016-11-30 21:59:08 -08:00
Kubernetes Submit Queue 0ed38ac647 Merge pull request #37729 from zmerlynn/fix-hack-e2e-up-dump
Automatic merge from submit-queue

hack/e2e.go: Dump cluster logs in case of Up failure

**What this PR does / why we need it**: A failure in `Up` currently results in no attempt to grab cluster logs. This fixes that hole. (Sigh, a ton of holes for this diagnosis path.)
2016-11-30 21:59:06 -08:00
Kubernetes Submit Queue 2ed490e15b Merge pull request #37255 from jingxu97/Nov/nfshung
Automatic merge from submit-queue

remove checking mount point in cleanupOrphanedPodDirs

To avoid nfs hung problem, remove the mountpoint checking code in
cleanupOrphanedPodDirs(). This removal should still be safe because it checks whether there are still directories under pod's volume and if so, do not delete the pod directory.

Note: After removing the mountpoint check code in cleanupOrphanedPodDirs(), the directories might not be cleaned up in such situation.
1. delete pod, kubelet reconciler tries to unmount the volume directory successfully
2. before reconciler tries to delete the volume directory, kubelet gets retarted
3. since under pod directory, there are still volume directors exist (but not mounted), cleanupOrphanedPodDIrs() will not clean them up.

Will work on a follow up PR to solve above issue.
2016-11-30 21:11:13 -08:00
Kubernetes Submit Queue 4c0781e962 Merge pull request #37167 from luomiao/fix-photon-plugin-ConstructVolumeSpec
Automatic merge from submit-queue

Fix photon controller plugin to construct with correct PdID

**What this PR does / why we need it**:
This PR is to fix a mismatching of unmount path in photon volume plugin, which is resulted from the assigning volume spec name to persistent disk ID. Without this path, unmounting process is stalling in reconciler when a pod is deleted. Restart the same pod will see a mount failure because the previous unmounting is still going on.

The input variable of function ConstructVolumeSpec is the volume spec name instead of persistent disk ID. Previously the function directly construct new volume spec by assigning volume spec name to persistent disk ID, which will result in mismatching of mount path. The fix will find the pdID according to mount path and construct volume spec with the correct pdID.

I have tested the patch with back-to-back pod creation/deletion and mounting/unmounting of photon persistent disk volume source performs normal now.

This need to be cherry-picked to 1.5 release branch.
2016-11-30 21:11:11 -08:00
Kubernetes Submit Queue b2cabee2f2 Merge pull request #37412 from janetkuo/revert-revert-remove-slow-statefulset
Automatic merge from submit-queue

Revert "Revert "Remove [Slow] from statefulset basic tests""

Reverts #37387, see https://github.com/kubernetes/kubernetes/pull/37387#issuecomment-262629767

Don't merge yet until #37393 is fixed
2016-11-30 21:11:09 -08:00
Kubernetes Submit Queue 5bba858b33 Merge pull request #37231 from janetkuo/stateful-set-example-files
Automatic merge from submit-queue

Update Stateful Set example files for 1.5

1. Remove initialized annotation from statefulset examples
2. Update storage class annotation to beta in statefulset examples
3. Remove alpha limitation on PetSet in cassandra example

cc @erictune @foxish @kow3ns @enisoc @chrislovecnm @kubernetes/sig-apps

```release-note
NONE
```
2016-11-30 21:11:08 -08:00
Kubernetes Submit Queue b0fd700f61 Merge pull request #36604 from deads2k/api-42-add-generic-loopback
Automatic merge from submit-queue

move parts of the mega generic run struct out

This splits the main `ServerRunOptions` into composeable pieces that are bindable separately and adds easy paths for composing servers to run delegating authentication and authorization.

@sttts @ncdc alright, I think this is as far as I need to go to make the composing servers reasonable to write.  I'll try leaving it here
2016-11-30 21:11:05 -08:00
Kubernetes Submit Queue 66fe55f5ad Merge pull request #37238 from deads2k/controller-02-minor-fixes
Automatic merge from submit-queue

controller manager refactors

The controller manager needs some significant cleanup.  This starts us down the patch by respecting parameters like `stopCh`, simplifying discovery checks, removing unnecessary parameters, preventing unncessary fatals, and using our client builder.

@sttts @ncdc
2016-11-30 20:08:19 -08:00
Kubernetes Submit Queue 3415885572 Merge pull request #37653 from foxish/new-rel2
Automatic merge from submit-queue

Update validation message.

Fixes validation message when patching a StatefulSet
2016-11-30 19:29:13 -08:00
Kubernetes Submit Queue 39e64fde8c Merge pull request #35948 from spacexnice/master
Automatic merge from submit-queue

support customize repository prefix of image through environment KUBE…

## Problem
kubeadm does not support customize repository prefix of image. this prevent us from using our own image repository to deploy k8s.

## Fix
make ```gcr.io/google_containers/ ``` be configurable.
ADD environment variable KUBE_REPO_PREFIX

Signed-off-by: yaoyao.xyy <yaoyao.xyy@alibaba-inc.com>
2016-11-30 18:39:25 -08:00
Yu-Ju Hong 69caf533f0 kubelet: don't reject pods without adding them to the pod manager
kubelet relies on the pod manager as a cache of the pods in the apiserver (and
other sources) . The cache should be kept up-to-date even when rejecting pods.
Without this, kubelet may decide at any point to drop the status update
(request to the apiserver) for the rejected pod since it would think the pod no
longer exists in the apiserver.

Also check if the pod to-be-admitted has terminated or not. In the case where
it has terminated, skip the admission process completely.
2016-11-30 18:05:17 -08:00
Zihong Zheng 9e505d95c6 Set strategy spec for kube-dns to support zero downtime during rolling update 2016-11-30 17:12:37 -08:00
Kubernetes Submit Queue 737edd02a4 Merge pull request #35258 from feiskyer/package-aliase
Automatic merge from submit-queue

Fix package aliases to follow golang convention

Some package aliases are not not align with golang convention https://blog.golang.org/package-names. This PR fixes them. Also adds a verify script and presubmit checks.

Fixes #35070.

cc/ @timstclair @Random-Liu
2016-11-30 16:39:46 -08:00
Zach Loafman dbb2a5775b hack/e2e.go: Dump cluster logs in case of Up failure 2016-11-30 16:18:53 -08:00
Jing Xu 041fa6477b remove checking mount point in cleanupOrphanedPodDirs
To avoid nfs hung problem, remove the mountpoint checking code in
cleanupOrphanedPodDirs(). This removal should still be safe.
2016-11-30 13:46:39 -08:00
Kubernetes Submit Queue ec1371b2b1 Merge pull request #37671 from mtaufen/fix-log-collection-dead-kubelet-systemd
Automatic merge from submit-queue

Collect logs for dead kubelets too

Collect logs via journalctl if journalctl is installed, rather than only if
kubelet.service is running. The old way resulted in us losing logs any
time the kubelet was failing. This, of course, breaks on a node if
someone decided to install journalctl but not use it. But that is not
the case on any of the images used by cluster-level tests at present.

^^^^FYI @Random-Liu not sure if `which journalctl` implies that journalctl is actually used on all of the nodes we test in the node-e2e suites. This may be of consequence if we move to using `cluster/log-dump.sh` to scrape logs for node-e2e.

P0 because this is somewhat in the way of debugging https://github.com/kubernetes/kubernetes/issues/33882

@jessfraz @saad-ali This should be cherry-picked to 1.4 and 1.5 as well.
2016-11-30 13:03:09 -08:00
Kubernetes Submit Queue 878ba91d7a Merge pull request #37684 from rf232/dashboard-v1.5.0
Automatic merge from submit-queue

Set Dashboard UI version to v1.5.0

Updating the dashboard version to v1.5.0

see our release notes at https://github.com/kubernetes/dashboard/releases/tag/v1.5.0
2016-11-30 11:15:31 -08:00
Kubernetes Submit Queue 9ccc291e8a Merge pull request #37263 from smarterclayton/wait_on_immediate
Automatic merge from submit-queue

When --grace-period=0 is provided, wait for deletion

The grace-period is automatically set to 1 unless --force is provided, and the client waits until the object is deleted.

This preserves backwards compatibility with 1.4 and earlier. It does not handle scenarios where the object is deleted and a new object is created with the same name because we don't have the initial object loaded (and that's a larger change for 1.5).

Fixes #37117 by relaxing the guarantees provided.

```release-note
When deleting an object with `--grace-period=0`, the client will begin a graceful deletion and wait until the resource is fully deleted.  To force deletion, use the `--force` flag.
```
2016-11-30 11:15:17 -08:00
Anirudh Ramanathan 1ac31c8e09 Grammar 2016-11-30 11:02:34 -08:00
Kubernetes Submit Queue ef0e13bd7d Merge pull request #37646 from zmerlynn/log-dump-kops
Automatic merge from submit-queue

log-dump: Change USE_KUBECTL path to instead call out to a custom function

**What this PR does / why we need it**:    The LOG_DUMP_USE_KUBECTL path is fine, once the cluster is up. However, we've had a continuous low-grade Up flake in the kops builds, so I'd like to grab logs using the aws CLI.
    
This makes log-dump.sh extensible, so you can do:
 
```
function log-dump-custom-get-instances() { ... }
export -f log-dump-custom-get-instances
go run hack/e2e.go ...
```
2016-11-30 10:39:40 -08:00
Kubernetes Submit Queue 56a591b69d Merge pull request #37655 from MrHohn/addon-manager-deployment
Automatic merge from submit-queue

Fixes Addon Manager's pruning issue for old Deployments

Fixes #37641.

Attaches the `last-applied`annotations to the existing Deployments for pruning.

Below images are built and pushed:
- gcr.io/google-containers/kube-addon-manager:v6.1
- gcr.io/google-containers/kube-addon-manager-amd64:v6.1
- gcr.io/google-containers/kube-addon-manager-arm:v6.1
- gcr.io/google-containers/kube-addon-manager-arm64:v6.1
- gcr.io/google-containers/kube-addon-manager-ppc64le:v6.1

@mikedanese 

cc @saad-ali @krousey
2016-11-30 10:39:29 -08:00