Commit Graph

46781 Commits (c20e63bfb98fecef7461dbaf8ed52e31fe12cd11)

Author SHA1 Message Date
Mike Danese 199ad852a1 kubeadm: don't add proxy flag to apiservers below v1.7 2017-04-11 14:51:36 -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
Łukasz Oleś a7fbc5dcc3 DaemonSet e2e changes
- add check for maxUnavailable in DaemonSet e2e tests
- filter pods by ControllerRef
- use PollImmediate instead if Poll
- reduce dsRetryPeriod to 1s
2017-04-11 23:23:47 +02: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
Mike Danese e8a3e2d87c delete ubuntu kube-up 2017-04-11 09:29:55 -07:00
Mike Danese 857b12cee0 delete ovirt kube-up
untouched since 2014.
2017-04-11 09:26:52 -07:00
Jacob Simpson e7666648bf Fix the certificate rotation threshold and add jitter. 2017-04-11 09:20:16 -07:00
David Ashpole 9f7e09ddfe eviction age metrics 2017-04-11 09:07:16 -07:00
Kubernetes Submit Queue 6d8aa2b15f Merge pull request #44021 from CaoShuFeng/kube-aggregator/apis
Automatic merge from submit-queue

add "/apis/" to kube-aggregator apisHandler

This makes the following two urls have the same result.
https://ip:443/apis
https://ip:443/apis/
**Release note**:

```NONE
```
2017-04-11 09:02:22 -07:00
Marcin Wielgus c2f903ba6c Merge branch 'master' into disruptive 2017-04-11 17:42:48 +02:00
Timothy St. Clair fc04bba10e Update staging files 2017-04-11 10:18:46 -05:00
Marcin Wielgus 5eaba81126 Node failure tests for cluster autoscaler 2017-04-11 16:59:50 +02:00
Kubernetes Submit Queue 44131a3658 Merge pull request #44324 from shiywang/fix-subresource
Automatic merge from submit-queue (batch tested with PRs 43900, 44152, 44324)

make deployment unit tests need to respect subresources

Fixes #42569
I check all the unit test code related to `Matches` method, seems there's only one line we could change to not break previous testing logic
@kargakis ptal, thanks

/assign @kargakis
2017-04-11 07:57:20 -07:00
Kubernetes Submit Queue 3c461095cc Merge pull request #44152 from NickrenREN/scheduler-bind
Automatic merge from submit-queue (batch tested with PRs 43900, 44152, 44324)

Fix: check "ok" first to avoid panic

Check "ok" and then check if "currState.pod.Spec.NodeName != pod.Spec.NodeName", here if currState is nil, it will panic.

**Release note**:
```release-note
NONE
```
2017-04-11 07:57:16 -07:00
Kubernetes Submit Queue da1fe12133 Merge pull request #43900 from CaoShuFeng/cani-quiet
Automatic merge from submit-queue (batch tested with PRs 43900, 44152, 44324)

fix return value of "kubectl auth cani --quiet"

Before this change:
$ kubectl auth can-i get pod
no
$ kubectl auth can-i get pod --quiet
$ echo $?
0

After this change:
$ kubectl auth can-i get pod
no
$ kubectl auth can-i get pod --quiet
$ echo $?
1

@deads2k 

**Release note**:

```NONE
```
2017-04-11 07:57:13 -07:00
deads2k c5e2f7c229 remove dependency on gorestful for rest handling 2017-04-11 09:57:19 -04:00
Timothy St. Clair 442713aaaf Remove leagcy init that no longer works. 2017-04-11 08:48:59 -05:00
Timothy St. Clair 818dd4443d Update generated due to proto-shift 2017-04-11 08:48:59 -05:00
Kubernetes Submit Queue 4ae6bd93c2 Merge pull request #44284 from MaciekPytel/ca_e2e_unflake
Automatic merge from submit-queue (batch tested with PRs 43844, 44284)

Add a retry to cluster-autoscaler e2e

This should fix https://github.com/kubernetes/kubernetes/issues/44268.

The flake was caused by following sequence of events:
1. Cluster was at minimum size (3), some node was unneeded for a while.
2. Setup for some test (scale-down, failure) would increase node group size (to 5) and wait for new nodes to come up.
3. As soon as new node come up (cluster size 4) CA would scale-down the old unneeded node (setting node group size to 4).
4. Node group would not reach size 5 (as the target was now 4) and the test would timeout and fail.

This PR makes the setup monitor re-set the target node group size if the above scenario happens.
2017-04-11 06:42:15 -07:00
Timothy St. Clair 93c051e28f Level sets dependency graph to consume etcd 3.1.5 2017-04-11 08:34:40 -05:00
Kubernetes Submit Queue 1c34102d5b Merge pull request #43844 from weiwei04/master
Automatic merge from submit-queue

add Stringer interface for eventType

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

fix invalid log outputs like 

"graph_builder.go:429] GraphBuilder process object: v1/Endpoints, namespace kube-system, name kube-controller-manager, event type %!s(garbagecollector.eventType=1)"
2017-04-11 06:22:56 -07:00
deads2k 706823aaa8 make unstructured items correspond to other items for storage 2017-04-11 08:44:16 -04:00
NickrenREN 573fafbc29 Using BetaStorageClassAnnotation to avoid hardcode 2017-04-11 19:31:46 +08:00
Kubernetes Submit Queue e58d3dbf06 Merge pull request #40800 from k82cn/topology_compare
Automatic merge from submit-queue

Empty label is equal for topologies.

fixes #40799
2017-04-11 00:39:04 -07:00
Kubernetes Submit Queue 2fa1eb0631 Merge pull request #44313 from thockin/proxy-healthchecks
Automatic merge from submit-queue

Zero-out healthchecks when no endpoints

Fixes #44311
2017-04-10 23:36:51 -07:00
Tim Hockin 0022639a2f Zero-out healthchecks when no endpoints 2017-04-10 21:43:33 -07:00
Kubernetes Submit Queue 859b97b551 Merge pull request #44170 from danwinship/networkpolicy-docs
Automatic merge from submit-queue (batch tested with PRs 43887, 41914, 44170)

Make NetworkPolicy docs reflect reality

spinoff of #39164; this just updates the docs to reflect the way the v1beta1 API has actually been implemented

**Release note**:
```release-note
NONE
```
2017-04-10 19:46:16 -07:00
Kubernetes Submit Queue 39e2d8e58f Merge pull request #41914 from mikedanese/bzl-version
Automatic merge from submit-queue (batch tested with PRs 43887, 41914, 44170)

bazel: implement git build stamping
2017-04-10 19:46:14 -07:00
Wei Wei 3329446c0e add Stringer interface for eventType 2017-04-11 10:36:52 +08:00
Kubernetes Submit Queue f77a40bc81 Merge pull request #43887 from dcbw/proxy-precompute-servicenamestring
Automatic merge from submit-queue

proxy/iptables: precompute svcPortName strings

With many services, the calls to svcPortName.String() show up as a
somewhat significant CPU user under syncProxyRules().

For whatever reason github repeatedly fails to upload the pprof with Firefox, so here's an example:

http://people.redhat.com/dcbw/kube-proxy-svcPortName-String.pdf
2017-04-10 19:28:52 -07:00
Kubernetes Submit Queue 3c7616eb19 Merge pull request #42683 from perotinus/annotations
Automatic merge from submit-queue

[Federation][kubefed] Annotate all Federation API objects with the federation name and (if applicable) the cluster name.

Address part of #42324.

```release-note
Adds annotations to all Federation objects created by kubefed.
```
2017-04-10 18:42:00 -07:00
Kubernetes Submit Queue 2976cb82ce Merge pull request #44209 from irfanurrehman/kubefed-3
Automatic merge from submit-queue (batch tested with PRs 44286, 44209)

[Federation][Kubefed] Bug fix to enable disabling federation controllers through override args

Targets https://github.com/kubernetes/kubernetes/issues/42761

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
https://github.com/kubernetes/kubernetes/issues/42761

**Special notes for your reviewer**:
@marun @perotinus @nikhiljindal 

**Release note**:

```
NONE 
```
2017-04-10 17:54:14 -07:00