Commit Graph

46580 Commits (32600927d97414795a6355f3cac23806d59e9cdd)

Author SHA1 Message Date
Kubernetes Submit Queue 32600927d9 Merge pull request #42884 from soltysh/issue41655
Automatic merge from submit-queue

bump github.com/robfig/cron

Fixes #41655.

@janetkuo ptal
2017-04-12 14:46:38 -07:00
Kubernetes Submit Queue 3ef2cf8adb Merge pull request #44064 from ixdy/get-kube-ci
Automatic merge from submit-queue

Make get-kube.sh work properly the "ci/latest" pointer

**What this PR does / why we need it**: this is a (late) followup from #36419, fixing a bug discovered in https://github.com/kubernetes/kubernetes/pull/36419#issuecomment-265679578.

Basically, `get-kube-binaries.sh` looks at `$KUBERNETES_RELEASE_URL`, but we weren't properly overriding it in `get-kube.sh` when downloading binaries from the CI release bucket. With this change, we set the variable correctly, and everything works:

```console
$ KUBERNETES_RELEASE=ci/latest ~/code/kubernetes/src/k8s.io/kubernetes/cluster/get-kube.sh
Downloading kubernetes release v1.7.0-alpha.0.2068+3a3dc827e45426
  from https://dl.k8s.io/ci/v1.7.0-alpha.0.2068+3a3dc827e45426/kubernetes.tar.gz
  to /tmp/foo/kubernetes.tar.gz
Is this ok? [Y]/n

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   161  100   161    0     0   1004      0 --:--:-- --:--:-- --:--:--  1006
100 6023k  100 6023k    0     0  10.9M      0 --:--:-- --:--:-- --:--:-- 10.9M
Unpacking kubernetes release v1.7.0-alpha.0.2068+3a3dc827e45426
Kubernetes release: v1.7.0-alpha.0.2068+3a3dc827e45426
Server: linux/amd64  (to override, set KUBERNETES_SERVER_ARCH)
Client: linux/amd64  (autodetected)

Will download kubernetes-server-linux-amd64.tar.gz from https://dl.k8s.io/ci/v1.7.0-alpha.0.2068+3a3dc827e45426
Will download and extract kubernetes-client-linux-amd64.tar.gz from https://dl.k8s.io/ci/v1.7.0-alpha.0.2068+3a3dc827e45426
Is this ok? [Y]/n

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   161  100   161    0     0    991      0 --:--:-- --:--:-- --:--:--   987
100  348M  100  348M    0     0  39.1M      0  0:00:08  0:00:08 --:--:-- 34.2M
               
md5sum(kubernetes-server-linux-amd64.tar.gz)=e71c9b48f6551797a74de2b83b501c44
sha1sum(kubernetes-server-linux-amd64.tar.gz)=688dcf567b60e27e3d9bf97436154543432768cf
               
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   161  100   161    0     0   1019      0 --:--:-- --:--:-- --:--:--  1025
100 29.0M  100 29.0M    0     0  32.2M      0 --:--:-- --:--:-- --:--:-- 95.4M
               
md5sum(kubernetes-client-linux-amd64.tar.gz)=8e6a90298411ae5a0e943b1c0e182b1d
sha1sum(kubernetes-client-linux-amd64.tar.gz)=187a2d2c1c6ae1ead32ec4c1fa51f695223edaae
               
Extracting /tmp/foo/kubernetes/client/kubernetes-client-linux-amd64.tar.gz into /tmp/foo/kubernetes/platforms/linux/amd64
Add '/tmp/foo/kubernetes/client/bin' to your PATH to use newly-installed binaries.
Creating a kubernetes on gce...
...

```
**Release note**:

```release-note
NONE
```
2017-04-12 13:39:00 -07:00
Kubernetes Submit Queue 42c0994c34 Merge pull request #43031 from dashpole/eviction_metrics
Automatic merge from submit-queue

Add prometheus metrics for age of stats used for evictions.

Completes #42923 

This PR adds metrics for evictions, and records how stale data used for evictions is.

cc @vishh @derekwaynecarr @kubernetes/sig-node-pr-reviews
2017-04-12 12:38:58 -07:00
Kubernetes Submit Queue a435456993 Merge pull request #44166 from kubernetes/jszczepkowski-reenable-hpa-upgrade-e2e
Automatic merge from submit-queue

Re-enabled HPA upgrade e2e test

Re-enabled HPA upgrade e2e test.

```release-note
NONE
```
2017-04-12 10:53:27 -07:00
Kubernetes Submit Queue 06cdb02fca Merge pull request #44359 from ncdc/var-lib-dockershim
Automatic merge from submit-queue

Make the dockershim root directory configurable

Make the dockershim root directory configurable so things like
integration tests (e.g. in OpenShift) can run as non-root.

cc @sttts @derekwaynecarr @yujuhong @Random-Liu @kubernetes/sig-node-pr-reviews @kubernetes/rh-cluster-infra
2017-04-12 09:58:18 -07:00
Kubernetes Submit Queue c9014b1029 Merge pull request #42849 from janetkuo/kubectl-describe-controllerRef
Automatic merge from submit-queue

In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator

@enisoc @kargakis @kubernetes/sig-apps-pr-reviews @kubernetes/sig-cli-pr-reviews 

```release-note
In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator.
```
2017-04-12 09:05:41 -07:00
Kubernetes Submit Queue c7b0ec0178 Merge pull request #42981 from NickrenREN/pv-controller-init
Automatic merge from submit-queue

Exit from NewController() for PersistentVolumeController when InitPlugins() failed

Exit from NewController() for PersistentVolumeController when InitPlugins() failed just like NewAttachDetachController() does

**Release note**:
```release-note
NONE
```
@jsafrane  @saad-ali  PTAL. Thanks in advance
2017-04-12 08:18:50 -07:00
Kubernetes Submit Queue 5ba21e83b9 Merge pull request #43085 from sttts/sttts-duplicated-meta-conversions
Automatic merge from submit-queue

apimachinery/pkg/apis/meta: remove duplicated conversions
2017-04-12 07:01:09 -07:00
Andy Goldstein 00e11566f2 Make the dockershim root directory configurable
Make the dockershim root directory configurable so things like
integration tests (e.g. in OpenShift) can run as non-root.
2017-04-12 09:06:21 -04:00
Kubernetes Submit Queue 7a1687dc93 Merge pull request #43081 from sttts/sttts-conversion-gen-dup-func-error
Automatic merge from submit-queue

conversion-gen: make duplicate func error message readable

Before you only got two hex pointer values.
2017-04-12 05:01:45 -07:00
Kubernetes Submit Queue 949440b43a Merge pull request #43698 from sttts/sttts-non-global-admission-plugin-registry
Automatic merge from submit-queue

Non global admission plugin registry

For testing the global state is a problem. This PR turns the actual registry into a struct that must be instantiated. For the beginning, we do this in `pkg/kubeapiserver/admission`. In some follow-up (where we hunt down all globals some day), we will move this into the genericapiserver.
2017-04-12 04:12:11 -07:00
Kubernetes Submit Queue 9db7953c24 Merge pull request #44138 from sttts/sttts-cleanup-godeps-json-updater
Automatic merge from submit-queue

Clean up staging/godeps-json-updater.go
2017-04-12 03:02:42 -07:00
Kubernetes Submit Queue d70b55ead5 Merge pull request #42466 from sttts/sttts-client-go-plugin-import-verify
Automatic merge from submit-queue

hack/verify-staging-imports.sh: check that plugins are not imported b…
2017-04-12 03:02:35 -07:00
Kubernetes Submit Queue 1ba9202cd8 Merge pull request #42781 from spzala/conversionlint
Automatic merge from submit-queue

Conversionlint

**What this PR does / why we need it**:
This PR adds a comment placeholder for the exported or public functions in conversion generator files. Such functions without a comment results into golint failure in various generated files. The changes in this patch takes care of about 36 related lint failures. 
Given below is an example lint error, 
zz_generated.conversion.go:91:1: exported function Convert_v1alpha1_Binding_To_servicecatalog_Binding should have comment or be unexported

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

**Special notes for your reviewer**:
Hello, I am trying to fix golint failures as we see them in the kubernetes-incubator/service-catalog project. I have separate PRs opened for lint issues related to other generator code which are in separate libraries like gengo. Thanks! 

**Release note**:

```release-note
```
2017-04-12 03:02:26 -07:00
Dr. Stefan Schimanski 63f547e1b1 pkg/admission: make plugin registry non-global 2017-04-12 11:37:25 +02:00
Kubernetes Submit Queue 750d5c3bc5 Merge pull request #41561 from jamiehannaford/fix-multiple-swift-urls
Automatic merge from submit-queue

Ensure only 1 Swift URL is used in cluster operations

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

Extracts only 1 Swift URL if multiple are returned from Keystone.

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

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

**Special notes for your reviewer**:

**Release note**:
```release-note
Heat cluster operations now support environments that have multiple Swift URLs
```
2017-04-12 02:16:28 -07:00
Kubernetes Submit Queue bd3146a2a4 Merge pull request #44357 from deads2k/agg-29-up
Automatic merge from submit-queue

delete rolebinding from correct namespace

Fixes #44212

The rolebinding needs to be deleted from the namespace we create it in.

@mdshuai
2017-04-12 01:31:36 -07:00
Kubernetes Submit Queue 284615d79d Merge pull request #43702 from wojtek-t/edge_based_proxy
Automatic merge from submit-queue

Edge-based userspace LB in kube-proxy

@thockin @bowei - if one of you could take a look if that PR doesn't break some basic kube-proxy assumptions. The similar change for winuserproxy should be pretty trivial.

And we should also do that for iptables, but that requires splitting the iptables code to syncProxyRules (which from what I know @thockin already started working on so we should probably wait for it to be done).
2017-04-12 00:30:53 -07:00
Kubernetes Submit Queue abd92fab1e Merge pull request #44296 from caesarxuchao/move-api-helpers.go
Automatic merge from submit-queue

Move api helpers.go to a subpackage

Part of https://github.com/kubernetes/kubernetes/issues/44065.

This PR moves the pkg/api/helpers.go to its own subpackage. It's mostly a mechanic move, except that
* I removed ConversionError in helpers.go, it's not used by anyone
* I moved the 3 methods of Taint and Toleration to pkg/api/methods.go, and left a TODO saying refactoring these methods to functions.

I'll send a few more PRs to make the k8s.io/kubernetes/pkg/api package only contains the code we want in the k8s.io/api repo, then we can run a [script](a0015fd1be (diff-7a2fbb4371972350ee414c6b88aee1c8)) to cut the new repo.
2017-04-11 23:46:04 -07:00
Kubernetes Submit Queue 640c67792f Merge pull request #44363 from bowei/use-auto-net
Automatic merge from submit-queue

Use auto mode networks instead of legacy networks in GCP

Use of the --range flag creates legacy networks in GCP.

Legacy networks will not support new GCP features.

```release-note
NONE
```
2017-04-11 22:57:20 -07:00
NickrenREN e0ef5bfd40 Exit from NewController() for PersistentVolumeController when InitPlugins() failed just like NewAttachDetachController() does 2017-04-12 13:43:09 +08:00
Kubernetes Submit Queue ceccd305ce Merge pull request #42147 from bowei/ip-alias-2
Automatic merge from submit-queue

Add support for IP aliases for pod IPs (GCP alpha feature)

```release-note
Adds support for allocation of pod IPs via IP aliases.

# Adds KUBE_GCE_ENABLE_IP_ALIASES flag to the cluster up scripts (`kube-{up,down}.sh`).

KUBE_GCE_ENABLE_IP_ALIASES=true will enable allocation of PodCIDR ips
using the ip alias mechanism rather than using routes. This feature is currently
only available on GCE.

## Usage
$ CLUSTER_IP_RANGE=10.100.0.0/16 KUBE_GCE_ENABLE_IP_ALIASES=true bash -x cluster/kube-up.sh

# Adds CloudAllocator to the node CIDR allocator (kubernetes-controller manager).

If CIDRAllocatorType is set to `CloudCIDRAllocator`, then allocation
of CIDR allocation instead is done by the external cloud provider and
the node controller is only responsible for reflecting the allocation
into the node spec.

- Splits off the rangeAllocator from the cidr_allocator.go file.
- Adds cloudCIDRAllocator, which is used when the cloud provider allocates
  the CIDR ranges externally. (GCE support only)
- Updates RBAC permission for node controller to include PATCH
```
2017-04-11 22:09:24 -07:00
Kubernetes Submit Queue 23b666894d Merge pull request #44368 from mbohlool/bugfix
Automatic merge from submit-queue

Bugfix: OpenAPI generator should pass generate type extensions

OpenAPI spec generator does not pass generated type extensions (using `x-kubernetes-` tags on types). This is already working for field extensions but not for types.
2017-04-11 21:23:26 -07:00
Kubernetes Submit Queue e60cc6ee3d Merge pull request #44090 from NickrenREN/remove-alpha-pv
Automatic merge from submit-queue

Remove alphaProvisioner in PVController and AlphaStorageClassAnnotation

remove alpha annotation and alphaProvisioner 

**Release note**:

```release-note
NONE
```
2017-04-11 20:41:40 -07:00
Kubernetes Submit Queue bddc308ba2 Merge pull request #44114 from copejon/remove-flaky-from-pv-tests
Automatic merge from submit-queue

Remove [Flaky] from presistent volume NFS tests.

**What this PR does / why we need it**:
PV e2e test flaked because of a lack of isolation of test objects (PVs, claims).  The common symptoms being volume-mounting pods timing out or an unexpected number of unbound claims being detected.

PR  #43645 Introduced the selector labels to test objects that restricted binds to within each "testspace".  To accomplish this the test namespace was set as a label for all PVs and selector for all Claims.  This allows each test to act as if it's isolated while still creating and binding PVs in parallel w/ other tests.

This has been tested in parallel on both 3-node gci and debian clusters as
`--ginkgo.focus="\[Volume\]" --ginkgo.skip="\[Disruptive\]|\[Feature.*\]|\[Serial\]"`
with out signs of flakiness.

cc @jeffvance 

```release-note
NONE
```
2017-04-11 19:55:44 -07:00
Kubernetes Submit Queue ebf1439d93 Merge pull request #43406 from janetkuo/ds-semantic-equal-update
Automatic merge from submit-queue

Add tests for semantically equal DaemonSet updates

Tests for #43337, depends on #43337. The last commit is already reviewed in #43337. 

@liggitt @kargakis @lukaszo @kubernetes/sig-apps-pr-reviews
2017-04-11 18:25:03 -07:00
Kubernetes Submit Queue a00498ad05 Merge pull request #44280 from yujuhong/add-warning-hostpid
Automatic merge from submit-queue

Modify change log to warn user of the hostpid bug
2017-04-11 17:25:16 -07:00
Chao Xu 08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
Janet Kuo b29135ea8f In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator 2017-04-11 15:41:57 -07:00
mbohlool ab5bcf6d2d Bugfix: OpenAPI generator should pass generate type extensions 2017-04-11 15:32:19 -07:00
Bowei Du 079505023f Use auto mode networks instead of legacy networks in GCP
Use of the --range flag creates legacy networks in GCP.
2017-04-11 14:36:17 -07:00
Bowei Du 091e46ef21 Update known-flags with cidr-allocator-type
I also sorted the file, it was almost sorted with a few exceptions.
2017-04-11 14:07:54 -07:00
Bowei Du f61590c221 Adds support for PodCIDR allocation from the GCE cloud provider
If CIDRAllocatorType is set to `CloudCIDRAllocator`, then allocation
of CIDR allocation instead is done by the external cloud provider and
the node controller is only responsible for reflecting the allocation
into the node spec.

- Splits off the rangeAllocator from the cidr_allocator.go file.
- Adds cloudCIDRAllocator, which is used when the cloud provider allocates
  the CIDR ranges externally. (GCE support only)
- Updates RBAC permission for node controller to include PATCH
2017-04-11 14:07:54 -07:00
Bowei Du 345c65847f Add KUBE_GCE_ENABLE_IP_ALIASES flag to the cluster turn up scripts.
KUBE_GCE_ENABLE_IP_ALIASES=true will enable allocation of PodCIDR ips
using the ip alias mechanism rather than using routes.

NODE_IP_RANGE will control the node instance IP cidr
KUBE_GCE_IP_ALIAS_SIZE controls the size of each podCIDR
IP_ALIAS_SUBNETWORK controls the name of the subnet created for the cluster
2017-04-11 14:07:50 -07:00
Kubernetes Submit Queue c68ae58c93 Merge pull request #44352 from wongma7/etcd-version
Automatic merge from submit-queue (batch tested with PRs 43304, 41427, 43490, 44352)

Fix etcd semver validation by using 'sort -V'

The old check would erroneously say e.g. v3.0.6 is greater than v3.0.17 which is obviously false. So hack/local-up-cluster.sh would be allowed to run and things would break because etcd does not meet the minimum. sort -V validates it correctly.
```release-note
NONE
```
2017-04-11 13:46:18 -07:00
Kubernetes Submit Queue 785299eea5 Merge pull request #43490 from xingzhou/add-testcases
Automatic merge from submit-queue (batch tested with PRs 43304, 41427, 43490, 44352)

Supplement unit tests to `kubectl create rolebinding` command.

Supplement unit tests to `kubectl create rolebinding` command,
including:
1. Unit tests for pkg/kubectl/role.go
2. Unit tests for pkg/kubectl/cmd/create_role.go
2017-04-11 13:46:16 -07:00
Kubernetes Submit Queue c17f0f60f9 Merge pull request #41427 from timothysc/etcd_3_1_godep
Automatic merge from submit-queue (batch tested with PRs 43304, 41427, 43490, 44352)

Update etcd-client godep to 3.1.5

This transitively level sets the godeps to yank in the 3.1.5 client.  

Currently WIP, b/c it required some regen and I had some weird local permissions issue. 

xref: #41143

/cc @xiang90 @mml
2017-04-11 13:46:15 -07:00
Kubernetes Submit Queue 32d29d48e7 Merge pull request #43304 from mwielgus/disruptive
Automatic merge from submit-queue (batch tested with PRs 43304, 41427, 43490, 44352)

Node failure tests for cluster autoscaler

E2e tests checking whether CA is still working with a single broken node.

cc: @MaciekPytel @jszczepkowski @fgrzadkowski
2017-04-11 13:46:13 -07:00
Sahdev P. Zala 08639023d0 Conversion generated code changes for golint fix
The exported or public functions requires a doc comment to pass golint.
This commit has changes of conversion generated code. The actual doc
changes are added into a separate commit for a clean review.
2017-04-11 15:34:51 -04:00
deads2k f80adb10dc delete rolebinding from correct namespace 2017-04-11 15:30:30 -04:00
Kubernetes Submit Queue 67f2a7cc00 Merge pull request #43888 from liggitt/unsecured-port-user
Automatic merge from submit-queue (batch tested with PRs 43545, 44293, 44221, 43888)

Avoid nil user special-casing in unsecured endpoint

The unsecured handler currently adds no `user.Info` to the request context.  That means that anything that tries to authorize actions in the API server currently has to special case nil users to ensure the unsecured localhost endpoint remains capable of performing all actions. 

This PR changes the unsecured localhost endpoint to be treated as a privileged user internally, so that no special casing is required by code inside the authentication layer

I'm not particularly attached to the username. It doesn't bother me for it to have a slightly uncomfortable sounding name.
2017-04-11 12:18:24 -07:00
Kubernetes Submit Queue f1b9c17cef Merge pull request #44221 from ncdc/fix-validateClusterInfo-empty-cluster-check
Automatic merge from submit-queue (batch tested with PRs 43545, 44293, 44221, 43888)

validateClusterInfo: use clientcmdapi.NewCluster()

Change validateClusterInfo to use clientcmdapi.NewCluster() instead of
clientcmdapi.Cluster{} when comparing against the passed in clusterInfo.
clusterInfo most likely will be a combination of
clientcmdapi.NewCluster() merged with potential overrides. This is
necessary because otherwise, the DeepEqual between what is supposed to
be an empty Cluster and clusterInfo will fail, resulting in an error
that doesn't allow fall-through to checking for in-cluster
configuration.

https://github.com/kubernetes/kubernetes/pull/40508 changed `DirectClientConfig.getContext()` to start with a `clientcmdapi.NewCluster()` instead of the zero value for `clientcmdapi.Cluster`. This means that the `Extensions` map in the `Cluster` is initialized instead of `nil`, which breaks the `DeepEqual` test unless you compare `clusterInfo` against an initialized `clientcmdapi.NewCluster()`.

cc @smarterclayton @sttts @vjsamuel @liggitt @deads2k @soltysh @fabianofranz @kubernetes/sig-api-machinery-pr-reviews
2017-04-11 12:18:22 -07:00
Kubernetes Submit Queue 867159416f Merge pull request #44293 from deads2k/api-08-unstructureditems
Automatic merge from submit-queue (batch tested with PRs 43545, 44293, 44221, 43888)

make unstructured items correspond to other items for storage

"normal" `Items` elements include the struct itself, not a pointer to the struct.  Some of the deeper bits of storage rely on this behavior in reflective paths.

This updates the `UnstructuredList` to be "normal".

@kubernetes/sig-api-machinery-pr-reviews
2017-04-11 12:18:20 -07:00
Kubernetes Submit Queue 6283077fb5 Merge pull request #43545 from luomiao/vsphere-remove-loginInfo-on-workers-update
Automatic merge from submit-queue (batch tested with PRs 43545, 44293, 44221, 43888)

Remove credentials on worker nodes for vSphere cloud provider.

**What this PR does / why we need it**:
Remove the dependency of login information on worker nodes for vsphere cloud provider:
1. VM Name is required to be set in the cloud provider configuration file.
2. Remove the requirement of login for Instance functions when querying local node information.

**Which issue this PR fixes** : fixes #https://github.com/kubernetes/kubernetes/issues/35339

**Release note**:
2017-04-11 12:18:17 -07:00
Sahdev P. Zala 4af92ce967 Fix goling failure in conversion public function doc
The exported or public functions without a comment results into golint failure
in various generated files. The changes in this patch takes care of about 36
related lint failures.
Given below is an example lint error,
zz_generated.conversion.go:91:1: exported function
Convert_v1alpha1_Binding_To_servicecatalog_Binding should have comment or be
unexported
2017-04-11 15:04:57 -04:00
Kubernetes Submit Queue 60310ce0f7 Merge pull request #42860 from jcbsmpsn/change-pem-type-to-constant
Automatic merge from submit-queue

Change the PEM block type to use the constant
2017-04-11 11:24:27 -07:00
Matthew Wong 36d244f084 Fix etcd semver validation by using 'sort -V' 2017-04-11 14:19:30 -04:00
Timothy St. Clair 9c7e331e67 Fixups for Godeps 2017-04-11 13:17:31 -05:00
Kubernetes Submit Queue c826c5a1b8 Merge pull request #44327 from NickrenREN/vsphere-util
Automatic merge from submit-queue

Using BetaStorageClassAnnotation to avoid hardcode

**Release note**:
```release-note
NONE
```
2017-04-11 10:34:09 -07:00
Kubernetes Submit Queue 673ca98fd5 Merge pull request #44294 from deads2k/server-16-gorestful
Automatic merge from submit-queue

remove dependency on gorestful for rest handling

There's no reason for us to rely upon go-restful for our REST handling.  This separates the layers so that gorestful route functions are built on top of native `http.HandlerFuncs`.

@DirectXMan12 I think this is the sort of handling you wanted to be able to add and remove at will, right?  I have other commits that demonstrate how to wire these into "normal" `http.Handlers` if its useful to you.

@kubernetes/sig-api-machinery-pr-reviews @smarterclayton @sttts @lavalamp
2017-04-11 09:50:27 -07:00