Commit Graph

5492 Commits (c10cc3decdd25717eaca5fccfd7cfebb3e09e5ec)

Author SHA1 Message Date
Fabiano Franz 3bb04c67cc More cli sanity verifications 2017-05-18 15:44:49 -03:00
Tim St. Clair 6565f68cfa
Update generated files 2017-05-18 10:39:04 -07:00
Tim St. Clair cdacc1f6df
Add internal audit API types 2017-05-18 10:30:21 -07:00
Kubernetes Submit Queue d775ff4c3a Merge pull request #45982 from fabianofranz/more_sig_cli_owners
Automatic merge from submit-queue

More owners from SIG-CLI

Adds SIG-CLI as reviewers and approvers of `cmd/clicheck/` and adds me + @pwittrock as approvers in `hack/` (mostly for `test-cmd` and some `hack/verify*.sh` and `hack/update*.sh` scripts).

**Release note**:

```release-note
NONE
```
2017-05-18 10:17:22 -07:00
Kubernetes Submit Queue a1c2db2fec Merge pull request #45950 from shyamjvs/revert-proxier
Automatic merge from submit-queue

Make real proxier in hollow-proxy optional (default=true)

Ref https://github.com/kubernetes/kubernetes/pull/45622
This allows using real proxier for hollow proxy, but we use the fake one by default.

cc @kubernetes/sig-scalability-misc @wojtek-t @gmarek
2017-05-18 07:55:09 -07:00
Andy Goldstein 032e2f6652 kube-proxy: add --write-config flag
Add --write-config flag to kube-proxy to write the default configuration
values to the specified file location.
2017-05-18 10:34:22 -04:00
Shyam Jeedigunta 804a4f558c Make usage of real proxier in hollow-proxy optional (default=true) 2017-05-18 14:30:12 +02:00
Janet Kuo 1ced5ae22c Add integration test for deployment 2017-05-17 14:41:59 -07:00
Christoph Blecker 78fe90edf6
Add cblecker to hack/ reviewers 2017-05-17 13:44:28 -07:00
Fabiano Franz e4953081f7 More owners from SIG-CLI 2017-05-17 15:46:34 -03:00
Kubernetes Submit Queue ac62748480 Merge pull request #44230 from mtaufen/remove-babysit-daemons
Automatic merge from submit-queue

Remove the deprecated --babysit-daemons kubelet flag

```release-note
Removes the deprecated kubelet flag --babysit-daemons
```

This flag has been deprecated for over a year (git blame says marked deprecated on March 1, 2016).
Relatively easy removal - nothing in the Kubelet relies on it anymore.

There was still some stuff in the provisioning scripts. It was easy to rip out, but in general we probably need to be more disciplined about updating the provisioning scripts at the same time that we initially mark things deprecated.
2017-05-17 11:23:17 -07:00
Kubernetes Submit Queue 4a9a702ee1 Merge pull request #45926 from MrHohn/api-annotations-move
Automatic merge from submit-queue

Move all API related annotations into annotation_key_constants.go

Separate from #45869. See https://github.com/kubernetes/kubernetes/pull/45869#discussion_r116839411 for details.

This PR does nothing but move constants around :)

/assign @caesarxuchao 

**Release note**:

```release-note
NONE
```
2017-05-17 10:34:53 -07:00
Kubernetes Submit Queue 2cf0169092 Merge pull request #45895 from humblec/glusterfs-defacto
Automatic merge from submit-queue

Make interface references consistent across the gluster plugin code.
2017-05-17 09:42:40 -07:00
Michael Taufen 2ee2ec5e21 Remove the deprecated --babysit-daemons kubelet flag 2017-05-17 09:08:57 -07:00
Kubernetes Submit Queue c26f5123dc Merge pull request #45936 from shashidharatd/kubectl-tests
Automatic merge from submit-queue

Disabling service-dns controller for federation kubectl tests

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

DNS was unnecessary to do kubectl tests against federation, but it was required earlier as service-controller would not start without initializing dns-provider. Now since we have the capability to disable service-dns controller, we no longer need to initialize federation-controller-manger with DNS specific stuff. So removing it.

Ref: https://github.com/kubernetes/kubernetes/pull/43136#issuecomment-287242198

**Release note**:
```
NONE
```
/cc @nikhiljindal @marun 
@kubernetes/sig-federation-pr-reviews
2017-05-17 05:57:43 -07:00
Cao Shufeng dd93784b20 remove useless flags from hack/verify-flags/known-flags.txt
Flags in known-flags.txt is used to check misspelling from "-" to "_" in
workspace, so a flag with out "-" should not show up in this file.
2017-05-17 17:54:24 +08:00
Kubernetes Submit Queue 6047143f3e Merge pull request #41939 from smarterclayton/encrypt_transformer
Automatic merge from submit-queue (batch tested with PRs 45709, 41939)

Add an AEAD encrypting transformer for storing secrets encrypted at rest

Tweak the ValueTransformer interface slightly to support additional
context information (to allow authenticated data to be generated by the
store and passed to the transformer). Add a prefix transformer that
looks for known matching prefixes and uses them. Add an AES GCM
transformer that performs AEAD on the values coming in and out of the
store.

Implementation of https://docs.google.com/document/d/1lFhPLlvkCo3XFC2xFDPSn0jAGpqKcCCZaNsBAv8zFdE/edit# and https://github.com/kubernetes/kubernetes/issues/12742
2017-05-16 23:11:51 -07:00
Kubernetes Submit Queue b059116a69 Merge pull request #45879 from wojtek-t/workaround_go_performance_regression
Automatic merge from submit-queue (batch tested with PRs 45884, 45879, 45912, 45444, 45874)

Use patched version of Go 1.8.1 to eliminate performance regression

Ref https://github.com/kubernetes/kubernetes/issues/45216

Until this is solved in Go (it's still unclear whether there will be patch release with the fix or not), this is solving the problem on our side.
2017-05-16 22:18:52 -07:00
Humble Chirammal ae0fae7c7c Add glusterfs to linted_packages.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-17 10:27:34 +05:30
Zihong Zheng 5992425588 Autogenerated files 2017-05-16 21:55:51 -07:00
shashidharatd 47ab49eb4f Disabling service-dns controller for federation kubectl tests 2017-05-17 10:22:47 +05:30
Chao Xu bd6a9604dc generated 2017-05-16 20:40:04 -07:00
Clayton Coleman 7827899b1d
generated: bazel 2017-05-16 22:37:00 -04:00
Kubernetes Submit Queue 3f0ebbe884 Merge pull request #45247 from mbohlool/c3
Automatic merge from submit-queue (batch tested with PRs 45247, 45810, 45034, 45898, 45899)

Apiregistration v1alpha1→v1beta1

Promoting apiregistration api from v1alpha1 to v1beta1.

API Registration is responsible for registering an API `Group`/`Version` with
another kubernetes like API server. The `APIService` holds information
about the other API server in `APIServiceSpec` type as well as general
`TypeMeta` and `ObjectMeta`. The `APIServiceSpec` type have the main
configuration needed to do the aggregation. Any request coming for
specified `Group`/`Version` will be directed to the service defined by
`ServiceReference` (on port 443) after validating the target using provided
`CABundle` or skipping validation if development flag `InsecureSkipTLSVerify`
is set. `Priority` is controlling the order of this API group in the overall
discovery document.
The return status is a set of conditions for this aggregation. Currently
there is only one condition named "Available", if true, it means the
api/server requests will be redirected to specified API server.

```release-note
API Registration is now in beta.
```
2017-05-16 19:01:55 -07:00
Kubernetes Submit Queue 7f92d35f1c Merge pull request #45739 from timothysc/cm_lock
Automatic merge from submit-queue (batch tested with PRs 45374, 44537, 45739, 44474, 45888)

Allow kcm and scheduler to lock on ConfigMaps.

**What this PR does / why we need it**:
Plumbs through the ability to lock on ConfigMaps through the kcm and scheduler.  

**Which issue this PR fixes** 
Fixes: #44857
Addresses issues with: #45415

**Special notes for your reviewer**:

**Release note**:

```
Add leader-election-resource-lock support to kcm and scheduler to allow for locking on ConfigMaps as well as Endpoints(default) 
```
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews @jamiehannaford @bsalamat @mikedanese
2017-05-16 18:10:57 -07:00
Kubernetes Submit Queue 31cb269d4c Merge pull request #44525 from irfanurrehman/fed-common-preferences
Automatic merge from submit-queue (batch tested with PRs 45860, 45119, 44525, 45625, 44403)

[Federation] Move annotations and related parsing code as common code

This PR moves some code, which was duplicate, around as common code.
Changes the names of structures used for annotations to common names.
s/FederatedReplicaSetPreferences/ReplicaAllocationPreferences/
s/ClusterReplicaSetPreferences/PerClusterPreferences/
This can be reused in job controller and hpa controller code.

**Special notes for your reviewer**:
@kubernetes/sig-federation-misc 

**Release note**:

```NONE
```
2017-05-16 16:14:54 -07:00
Kubernetes Submit Queue ec415a12d2 Merge pull request #45119 from dims/set-default-host-path-as-provisioner
Automatic merge from submit-queue (batch tested with PRs 45860, 45119, 44525, 45625, 44403)

Support running StatefulSetBasic e2e tests with local-up-cluster

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

Currently StatefulSet(s) fail when you use local-up-cluster without
setting a cloud provider. In this PR, we use set the
kubernetes.io/host-path provisioner as the default provisioner when
there CLOUD_PROVIDER is not specified. This enables e2e test(s)
(specifically StatefulSetBasic) to work.

**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-05-16 16:14:51 -07:00
Wojciech Tyczynski 3a1bb09ea9 Patch golang 2017-05-16 21:29:22 +02:00
Cosmin Cojocar 682d5ec01f Add client auth plugin for Azure Active Directory
This plugin acquires a fresh access token for apiserver from Azure Active
Directory using the device code flow. The access token is saved in the
configuration in order to be reused for upcomming accesses to appiserver.
In additon the access token is automatically refreshed when expired.
2017-05-16 16:42:30 +02:00
Kubernetes Submit Queue 294c6362bd Merge pull request #43696 from CaoShuFeng/asgroups
Automatic merge from submit-queue

add --as-group option to cli

The usecase of this change:
When a super user grant some RBAC permissions to a group, he can use
--as--group to test whether the group get the permissions.
Note that now we support as-groups, as-user-extra in kubeconfig file after this change.

**Release note**:

```NONE
```
@liggitt
2017-05-16 06:47:10 -07:00
Kubernetes Submit Queue a4c4cfe9de Merge pull request #45862 from timstclair/audit-api-internal
Automatic merge from submit-queue

Internal audit API

Forked from https://github.com/kubernetes/kubernetes/pull/45315

I pulled out only the internal audit API types and would like to merge this to unblock the audit implementation work while we figure out the versioned types and code generation.

I will continue to iterate on https://github.com/kubernetes/kubernetes/pull/45315, but lets get this internal type submitted.

/cc @ericchiang @ihmccreery
2017-05-16 00:59:39 -07:00
Chao Xu 2a9745e96d remove excpetion in verify-no-vendor-cycles.sh 2017-05-15 20:17:38 -07:00
Tim St. Clair e30139b0d7
update linted_packages 2017-05-15 18:42:55 -07:00
nikhiljindal 8844a279a8 Add update-federation-* scripts to update-all.sh 2017-05-15 16:51:09 -07:00
mbohlool e2f20a3539 Promote apiregistration from v1alpha1 to v1beta1 2017-05-15 15:34:33 -07:00
Kubernetes Submit Queue cb26eb6049 Merge pull request #45176 from lavalamp/no-cycles
Automatic merge from submit-queue (batch tested with PRs 41331, 45591, 45600, 45176, 45658)

Detect and prevent new vendor cycles

I see that we have added a dependency with a cyclic reference to
kubernetes. This makes life much harder, we should not do it. This
script should prevent any more offenders while we fix the existing one.
2017-05-15 13:25:50 -07:00
Kubernetes Submit Queue f6bcd28cd7 Merge pull request #41331 from dshulyak/import_remotecommand
Automatic merge from submit-queue (batch tested with PRs 41331, 45591, 45600, 45176, 45658)

Move client/unversioned/remotecommand to client-go

Module remotecommand originally part of kubernetes/pkg/client/unversioned was moved
to client-go/tools, and will be used as authoritative in kubectl, e2e and other places.

Module remotecommand relies on util/exec module which was copied to client-go/pkg/util
2017-05-15 13:25:42 -07:00
Timothy St. Clair 2033ea6c2c Update generated 2017-05-15 10:01:57 -05:00
Timothy St. Clair 1173c84ad9 Update to plumb through configurable locking on different resource types. 2017-05-15 10:01:46 -05:00
Dmitry Shulyak c0a3e9ad13 Fix golint and godeps verification 2017-05-15 16:28:56 +03:00
Dmitry Shulyak 2612e0c78a Move client/unversioned/remotecommand to client-go
Module remotecommand originally part of kubernetes/pkg/client/unversioned was moved
to client-go/tools, and will be used as authoritative in kubectl, e2e and other places.

Module remotecommand relies on util/exec module which will be copied to client-go/pkg/util
2017-05-15 16:28:56 +03:00
Cao Shufeng 726d720c78 Fix invalid bash script in unit test.
This change fix such error when we run "make test":
    "find: invalid expression; you have used a binary operator '-o' with
     nothing before it."
2017-05-15 15:36:27 +08:00
nikhiljindal b3d2e244ea Adding verify-federation-api-reference-docs.sh 2017-05-14 17:20:24 -07:00
nikhiljindal 174e92b24f Adding verify-federation-generated-swagger-docs.sh 2017-05-14 17:20:24 -07:00
nikhiljindal 2e194763ac Adding verify-federation-swagger-spec.sh 2017-05-14 17:15:41 -07:00
Cao Shufeng e541defd49 add --as-group option to cli
The usecase of this change:
When a super user grant some RBAC permissions to a group, he can use
--as-group to test whether the group get the permissions.
Note that now we support as-groups, as-user-extra in kubeconfig file
after this change.
2017-05-14 16:21:05 +08:00
Vishnu kannan d1b4dba440 adding support for gpus in node e2e
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-05-13 16:35:54 -07:00
Daniel Smith 4bda915c68 Detect and prevent new vendor cycles
I see that we have added a dependency with a cyclic reference to
kubernetes. This makes life much harder, we should not do it. This
script should prevent any more offenders while we fix the existing one.

Change-Id: Iabc22ee7a2c7c54697991d2f8c24e80acb0281e4
2017-05-12 16:56:08 -07:00
Michael Taufen cbad320205 Reorganize kubelet tree so apis can be independently versioned 2017-05-12 10:02:33 -07:00
Irfan Ur Rehman de2544d5c3 [Federation] Move annotations and related parsing code as common code 2017-05-12 18:22:37 +05:30
Kubernetes Submit Queue e85a980e0a Merge pull request #45691 from rmmh/owners-prefixes
Automatic merge from submit-queue (batch tested with PRs 45691, 45667, 45698, 45715)

Make update_owners.py also emit a JSON sig-owners list.

This should experience less churn in general!

I'm going to make the triage page use this list to let sigs have individualized dashboards.

**Release note**:
```release-note
NONE
```
2017-05-12 04:09:39 -07:00
Crazykev f2737c451e remove experimental-cri in e2e-node test
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
2017-05-12 15:20:47 +08:00
Hemant Kumar 9a1a9cbe08 detach the volume when pod is terminated
Make sure volume is detached when pod is terminated because
of any reason and not deleted from api server.
2017-05-11 22:18:22 -04:00
Ryan Hitchman 667c1592b5 Make update_owners.py also emit a JSON sig-owners list.
This should experience less churn in general!
2017-05-11 17:01:29 -07:00
Kubernetes Submit Queue 1f3b158a10 Merge pull request #45194 from yujuhong/rm-cri-flag
Automatic merge from submit-queue

Remove the deprecated `--enable-cri` flag

Except for rkt, CRI is the default and only integration point for
container runtimes.

```release-note
Remove the deprecated `--enable-cri` flag. CRI is now the default, 
and the only way to integrate with kubelet for the container runtimes.
```
2017-05-10 20:46:24 -07:00
Kubernetes Submit Queue a48cfe9fe5 Merge pull request #45384 from caesarxuchao/copy-metrics-interanl
Automatic merge from submit-queue (batch tested with PRs 45382, 45384, 44781, 45333, 45543)

Copy internal types to metrics

Supersedes #45306. 

#45306 removed the internal types and suggested whoever needs the internal types should define their own copy, and use the code-gen tools to generated the conversion functions. Per offline discussion with @DirectXMan12, we wanted to go that direction but it's not clear where to put the internal types yet. Hence, as a temporary solution, we decided copy the referred client-go/pkg/api types into metrics api to avoid the dependency.

The commit "remove need of registry from custom_metrics/client.go" is similar to what I did to the fake client in an earlier PR. Let me know if you want to put the commit in another PR.
2017-05-10 17:47:41 -07:00
Yu-Ju Hong daa329c9ae Remove the deprecated `--enable-cri` flag
Except for rkt, CRI is the default and only integration point for
container runtimes.
2017-05-10 13:03:41 -07:00
Kubernetes Submit Queue 77b2e6302c Merge pull request #45236 from verb/sharedpid-2-default
Automatic merge from submit-queue

Enable shared PID namespace by default for docker pods

**What this PR does / why we need it**: This PR enables PID namespace sharing for docker pods by default, bringing the behavior of docker in line with the other CRI runtimes when used with docker >= 1.13.1.

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

**Special notes for your reviewer**: cc @dchen1107 @yujuhong 

**Release note**:

```release-note
Kubernetes now shares a single PID namespace among all containers in a pod when running with docker >= 1.13.1. This means processes can now signal processes in other containers in a pod, but it also means that the `kubectl exec {pod} kill 1` pattern will cause the pod to be restarted rather than a single container.
```
2017-05-10 12:06:01 -07:00
Solly Ross 0b43fffa48 Enable client-gen for k8s.io/metrics
This commit turns on client-gen for k8s.io/metrics.  Clients are
generated for `k8s.io/metrics/pkg/apis/metrics` (both internal and
v1alpha1).  `k8s.io/metrics/pkg/apis/custom_metrics` uses a bespoke
client due to the unique nature of its paths.
2017-05-10 13:33:18 -04:00
Chao Xu 2f41a515e9 let hack/update-codecgen.sh include k8s.io/metrics 2017-05-09 18:05:23 -07:00
Kubernetes Submit Queue 110f410e55 Merge pull request #45463 from nilebox/nilebox-tpr-watcher-example
Automatic merge from submit-queue (batch tested with PRs 45481, 45463)

ThirdPartyResource example: added watcher example, code cleanup

**NOTE**: This is a cleaned and updated version of PR https://github.com/kubernetes/kubernetes/pull/43027

**What this PR does / why we need it**:
An example of using go-client for watching on ThirdPartyResource events (create/update/delete).
2017-05-09 06:52:34 -07:00
Nail Islamov a6c97715ed ThirdPartyResource client-go example: added TPR controller example, code cleanup and integration test 2017-05-09 21:31:39 +10:00
Kubernetes Submit Queue a9ec6cbcb8 Merge pull request #45441 from cjwagner/test-owners-no-default
Automatic merge from submit-queue (batch tested with PRs 45508, 44258, 44126, 45441, 45320)

Removed 'default' row from test_owners.csv and Updated update_owners.py

**What this PR does / why we need it**:
Removes the 'default' row from test_owners.csv and the validation/update logic associated with it in update_owners.py.  
The 'default' row is being removed because it results in too many issues being assigned to the default test owners when issues are automatically generated.

**Release note**:

```release-note
NONE
```
/assign
2017-05-08 16:34:46 -07:00
Kubernetes Submit Queue a062782524 Merge pull request #44258 from wlan0/master
Automatic merge from submit-queue (batch tested with PRs 45508, 44258, 44126, 45441, 45320)

cloud initialize node in external cloud controller

@thockin This PR adds support in the `cloud-controller-manager` to initialize nodes (instead of kubelet, which did it previously)

This also adds support in the kubelet to skip node cloud initialization when `--cloud-provider=external`

Specifically,

Kubelet

1. The kubelet has a new flag called `--provider-id` which uniquely identifies a node in an external DB
2. The kubelet sets a node taint - called "ExternalCloudProvider=true:NoSchedule" if cloudprovider == "external"

Cloud-Controller-Manager

1. The cloud-controller-manager listens on "AddNode" events, and then processes nodes that starts with that above taint. It performs the cloud node initialization steps that were previously being done by the kubelet.
2. On addition of node, it figures out the zone, region, instance-type, removes the above taint and updates the node.
3. Then periodically queries the cloudprovider for node addresses (which was previously done by the kubelet) and updates the node if there are new addresses

```release-note
NONE  
```
2017-05-08 16:34:43 -07:00
Kubernetes Submit Queue 332b095ca9 Merge pull request #44968 from MrHohn/kube-proxy-healthcheck
Automatic merge from submit-queue (batch tested with PRs 44727, 45409, 44968, 45122, 45493)

Separate healthz server from metrics server in kube-proxy

From #14661, proposal is on kubernetes/community#552.

Couple bullet points as in commit:
- /healthz will be served on 0.0.0.0:10256 by default.
- /metrics and /proxyMode will be served on port 10249 as before.
- Healthz handler will verify timestamp in iptables mode.

/assign @nicksardo @bowei @thockin 

**Release note**:

```release-note
NONE
```
2017-05-08 14:54:38 -07:00
Kubernetes Submit Queue 15f0468986 Merge pull request #44895 from dcbw/iptables-restore-manual-locking
Automatic merge from submit-queue

util/iptables: grab iptables locks if iptables-restore doesn't support --wait

When iptables-restore doesn't support --wait (which < 1.6.2 don't), it may
conflict with other iptables users on the system, like docker, because it
doesn't acquire the iptables lock before changing iptables rules. This causes
sporadic docker failures when starting containers.

To ensure those don't happen, essentially duplicate the iptables locking
logic inside util/iptables when we know iptables-restore doesn't support
the --wait option.

Unfortunately iptables uses two different locking mechanisms, one until
1.4.x (abstract socket based) and another from 1.6.x (/run/xtables.lock
flock() based).  We have to grab both locks, because we don't know what
version of iptables-restore exists since iptables-restore doesn't have
a --version option before 1.6.2.  Plus, distros (like RHEL) backport the
/run/xtables.lock patch to 1.4.x versions.

Related: https://github.com/kubernetes/kubernetes/pull/43575
See also: https://github.com/openshift/origin/pull/13845
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1417234

@kubernetes/rh-networking @kubernetes/sig-network-misc @eparis @knobunc @danwinship @thockin @freehan
2017-05-06 15:17:21 -07:00
Dan Williams 8f967c929f hack/cluster: map /run/xtables.lock into containerized kubelet filesystem 2017-05-05 23:34:06 -05:00
Kubernetes Submit Queue a481a5bca9 Merge pull request #45429 from pmichali/issue45425
Automatic merge from submit-queue (batch tested with PRs 45182, 45429)

Coverage: shasum command not supported on CentOS

Centos has sha1sum, instead of "shasum -a1". Modified script to
check for existence fo shasum, and if not present, use sha1sum
for coverage test processing.



**What this PR does / why we need it**: Allows coverage test to run under CentOS. Needed for development using that OS.

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

**Special notes for your reviewer**:

**Release note**:

```NONE
```
2017-05-05 17:32:35 -07:00
Kubernetes Submit Queue 6c4663635c Merge pull request #45182 from deads2k/tpr-08-simple-serving
Automatic merge from submit-queue (batch tested with PRs 45182, 45429)

CustomResources in separate API server

Builds on https://github.com/kubernetes/kubernetes/pull/45115.

This adds a basic handler for custom resources.  No status handling, no finalizers, no controllers, but basic CRUD runs to allow @enisoc and others to start considering migration.

@kubernetes/sig-api-machinery-misc
2017-05-05 17:32:33 -07:00
wlan0 45d2bc06b7 cloud initialize node in external cloud controller 2017-05-05 16:51:45 -07:00
Zihong Zheng e5db5dc3a1 Autogenerated files 2017-05-05 14:44:38 -07:00
Cole Wagner e9eca4b5ba Removed 'default' row from test_owners.csv. Also updated update_owners.py to no longer handle the 'default' row. 2017-05-05 14:21:23 -07:00
Paul Michali 5bcd21c9f1 Coverage: shasum command not supported on CentOS
Centos has sha1sum, instead of "shasum -a1". Modified script to
check for existence fo shasum, and if not present, use sha1sum
for coverage test processing. If neither are available, an error
will be reported and processing stopped.
2017-05-05 18:36:02 +00:00
deads2k bb143d3e33 add integration tests 2017-05-05 10:50:03 -04:00
Kubernetes Submit Queue 4e74c43e9a Merge pull request #43436 from xilabao/add-set-rolebinding-command
Automatic merge from submit-queue

add set rolebinding/clusterrolebinding command

add command to set user/group/serviceaccount in rolebinding/clusterrolebinding /cc @liggitt @deads2k
2017-05-05 07:21:58 -07:00
xilabao 20876757c2 add set rolebinding/clusterrolebinding command 2017-05-05 09:55:35 +08:00
shashidharatd f08533965c Fix federated service deletion tests 2017-05-04 22:27:54 +05:30
deads2k c837c7fb1a use our own serve mux that directs how we want 2017-05-03 16:21:45 -04:00
Lee Verberne b668371a63 Enable shared PID namespace by default for docker 2017-05-03 17:12:08 +00:00
Kubernetes Submit Queue df8551acd2 Merge pull request #45115 from deads2k/tpr-07-types
Automatic merge from submit-queue (batch tested with PRs 45272, 45115)

initial types for TPRs

This pull starts creating the types described by https://github.com/kubernetes/community/blob/master/contributors/design-proposals/thirdpartyresources.md .  In the initial pull different names were suggested.  I've started this pull with `CustomResource.apiextensions.k8s.io`.

The structure begins as a separate API server to facilitate rapid prototyping and experimentation, but the end result will be added to the end of the `kube-apiserver` chain as described in https://github.com/kubernetes/community/blob/master/sig-api-machinery/api-extensions-position-statement.md .

Because it is separate to start (not included in any default server), I don't think we need a perfect name, but I'd like to be close.

@kubernetes/sig-api-machinery-misc @enisoc @smarterclayton @erictune
2017-05-03 05:36:59 -07:00
nikhiljindal a88f28772a Add wait for federated service deletion 2017-05-02 22:12:03 -07:00
Kubernetes Submit Queue 0b469f4cb5 Merge pull request #45230 from dims/single-ca-cert
Automatic merge from submit-queue (batch tested with PRs 45239, 45230)

Create a single CA for both client and server certs

**What this PR does / why we need it**:
The following test:
"Certificates API [It] should support building a client with a CSR"

fails with local-up-cluster, but works in the existing CI jobs. This
is because the other CI jobs use a single CA cert while local-up-cluster
can use 2 different sets of CA(s). We need a way to mimic the other
CI jobs (or alternatively change everything to have separate CA's). Just
updating local-up-cluster with a flag seems to be the easy route.

**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
NONE
```
2017-05-02 14:11:53 -07:00
Davanum Srinivas 0d95f74ef5 Create a single CA for both client and server certs
The following test:
"Certificates API [It] should support building a client with a CSR"

fails with local-up-cluster, but works in the existing CI jobs. This
is because the other CI jobs use a single CA cert while local-up-cluster
can use 2 different sets of CA(s). We need a way to mimic the other
CI jobs (or alternatively change everything to have separate CA's). Just
updating local-up-cluster with a flag seems to be the easy route.
2017-05-02 13:43:46 -04:00
Kubernetes Submit Queue 02a26f43a8 Merge pull request #44796 from CaoShuFeng/canisubresource
Automatic merge from submit-queue (batch tested with PRs 45100, 45152, 42513, 44796, 45222)

add subresource support to kube auth can-i

Eg:
    kubectl auth can-i get pods --sub-resource=log

**Release note**:

```release-note
```
2017-05-02 10:35:12 -07:00
deads2k 72eef13e3e generated 2017-05-02 08:49:20 -04:00
deads2k ed27887ad2 wire new staging repo 2017-05-02 08:43:31 -04:00
Cao Shufeng de3db1eec3 add subresource support to kube auth can-i
Eg:
    kubectl auth can-i get pods --subresource=log
2017-05-02 12:08:20 +08:00
Kubernetes Submit Queue 3791abd628 Merge pull request #44981 from ixdy/version-docker-tag
Automatic merge from submit-queue

Use munged semantic version for side-loaded docker tag

**What this PR does / why we need it**: rather than using the md5sum of the dockerized binary for each side-loaded docker image, use the semantic version (with `+`s replaced with `_`s) for the side-loaded docker images.

The use of the md5sum for the docker tag dates to #6326 2 years ago. I'm not sure why that was chosen, short of it being fairly unique.

My main motivation for changing this is that it makes building the docker images using Bazel's docker rules easier, since the semantic version doesn't depend on the build output.

An added benefit is that the list of images on a running kubernetes cluster is also more straightfoward; rather than a list of opaque, meaningless hexadecimal strings, you get something that indicates the provenance of the image. It'd also be clearer that all of the images came from the same build.

I was able to start a cluster with this change on GCE using both `make quick-release` and `make bazel-release`.

Note that this change has no effect on the tag that's pushed to gcr.io during releases; that's still controlled via `KUBE_IMAGE_DOCKER_TAG`, though we may want to merge this functionality at some point.

@kubernetes/sig-node-pr-reviews is there any reason to stick with using the md5sum strategy? @dchen1107 do you remember why we went with md5sums originally?
cc @spxtr @mikedanese 

**Release note**:

```release-note
```
2017-05-01 19:48:18 -07:00
Kubernetes Submit Queue 29f37fde3e Merge pull request #45177 from dims/allow-cluster-signing-ca-crt-and-key
Automatic merge from submit-queue (batch tested with PRs 45077, 45180, 34727, 45079, 45177)

Allow specifying cluster signing ca/key

**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-05-01 18:55:16 -07:00
Kubernetes Submit Queue 5ffbd37661 Merge pull request #34727 from ncdc/kube-proxy-config
Automatic merge from submit-queue (batch tested with PRs 45077, 45180, 34727, 45079, 45177)

Refactor kube-proxy configuration

This is a proof of concept refactoring of the configuration and startup of kube-proxy. Most flags have been removed and replaced by a single config file, specified by `--config`. This is in regards to the component configuration improvement suggestions listed in #32215.

Also during this effort, I discovered that Hyperkube is roughly reimplementing portions of cobra, and that the current cobra command definitions are solely used to generated docs and man pages. I would like to move the individual commands as well as Hyperkube to using cobra, but that is a separate issue and discussion.

cc @mikedanese @liggitt @deads2k @eparis @sttts @smarterclayton @dgoodwin @timothysc
2017-05-01 18:55:13 -07:00
Kubernetes Submit Queue cb27476153 Merge pull request #45180 from caesarxuchao/move-metrics-to-staging
Automatic merge from submit-queue (batch tested with PRs 45077, 45180, 34727, 45079, 45177)

Move k8s.io/metrics to staging/

This is to break the cyclic dependency in our code base: kubernetes depends on k8s.io/metrics, which depends on kubernetes/staging/client-go.

@DirectXMan12 i actually moved it to staging because we will need the flexibility to update metrics code directly to do many planned refactors, so the copy of metrics in kubernetes has to be the source of truth.

client-gen is not enabled for the code yet, we can enable it after you port your changes to client-gen.

`make generated_files` is enabled for metrics.
2017-05-01 18:55:11 -07:00
Chao Xu 3294200dc8 move metrics to staging 2017-05-01 16:43:50 -07:00
Davanum Srinivas ec44cc2e7c Allow specifying cluster signing ca/key
Makes it useful in testing some scenarios with automatically
signing certificates
2017-05-01 19:25:56 -04:00
Andy Goldstein 43cb024402 Add kube-proxy config file support
Add support for configuring kube-proxy via a config file instead of
command line flags.
2017-05-01 18:02:47 -04:00
Mike Danese ff4a814cce migrate set generation to go genrule
and move ./types to staging
2017-05-01 11:11:14 -07:00
Kubernetes Submit Queue 91475306dc Merge pull request #40774 from mikedanese/no-more-integration-tags
Automatic merge from submit-queue

don't use build tags to mark integration tests

This is a bad pattern that leads to checked in code that isn't check for compilation. We should avoid this if it doesn't provide value, which it seems like it doesn't.
2017-05-01 11:08:15 -07:00
Kubernetes Submit Queue e2042bb81b Merge pull request #41583 from verb/sharedpid
Automatic merge from submit-queue (batch tested with PRs 41583, 45117, 45123)

Implement shared PID namespace in the dockershim

**What this PR does / why we need it**: Defaults the Docker CRI to using a shared PID namespace for pods. Implements proposal in https://github.com/kubernetes/community/pull/207 tracked by #1615.

//cc @dchen1107 @vishh @timstclair 

**Special notes for your reviewer**: none

**Release note**:
```release-note
Some container runtimes share a process (PID) namespace for all containers in a pod. This will become the default for Docker in a future release of Kubernetes. You can preview this functionality if running with the CRI and Docker 1.13.1 by enabling the --experimental-docker-enable-shared-pid kubelet flag.
```
2017-04-28 20:15:03 -07:00
Kubernetes Submit Queue 87792a0020 Merge pull request #45109 from rootfs/azure-e2e-pr
Automatic merge from submit-queue (batch tested with PRs 44044, 44766, 44930, 45109, 43301)

e2e test: test azure disk volume

**What this PR does / why we need it**:
E2E test Azure disk volume
**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**:
@kubernetes/sig-testing-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-04-28 17:49:12 -07:00
Kubernetes Submit Queue 3a2a01bddc Merge pull request #44930 from fabianofranz/issue_44832
Automatic merge from submit-queue (batch tested with PRs 44044, 44766, 44930, 45109, 43301)

Fixes get -oname for unstructured objects

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

Make sure we display kind in `kubectl get -o name` for unknown resource types.

**Release note**:

```release-note
NONE
```
2017-04-28 17:49:10 -07:00
Mike Danese 3600d49504 delete benchmark integration tests that don't work at all 2017-04-28 14:28:04 -07:00
Mike Danese 21617a60ae don't use build tags to mark integration tests 2017-04-28 14:19:39 -07:00
Kubernetes Submit Queue 7a9808ae6f Merge pull request #45033 from timothysc/examples_1
Automatic merge from submit-queue

Prune examples and e2es per discussion on sig-testing

**What this PR does / why we need it**:
Prune k8petstore from examples and e2es per discussion on sig-testing

**Special notes for your reviewer**:
This can live elsewhere outside the main repository.  

**Release note**:

```
NONE
```

/cc @jayunit100 @fejta @kubernetes/sig-testing-pr-reviews
2017-04-28 13:15:05 -07:00
Davanum Srinivas 49faff32da Support running StatefulSetBasic e2e tests with local-up-cluster
Currently StatefulSet(s) fail when you use local-up-cluster without
setting a cloud provider. In this PR, we use set the
kubernetes.io/host-path provisioner as the default provisioner when
there CLOUD_PROVIDER is not specified. This enables e2e test(s)
(specifically StatefulSetBasic) to work.
2017-04-28 15:10:22 -04:00
Huamin Chen 165d46a0a8 e2e test: test azure disk volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-04-28 18:51:34 +00:00
Fabiano Franz 1aa84d101a Fixes get -oname for unstructured objects 2017-04-28 14:12:36 -03:00
Timothy St. Clair 01366851ea Prune k8petstore from examples and e2es per discussion on sig-testing 2017-04-28 11:49:23 -05:00
Fabiano Franz 2158473474 Plugins are loaded under the 'kubectl plugin' command 2017-04-28 01:34:07 -03:00
Fabiano Franz 2b178ad608 Basic support for kubectl plugins 2017-04-28 01:34:07 -03:00
Lee Verberne d22dd0fa35 Implement shared PID namespace in the dockershim 2017-04-27 23:43:53 +00:00
Jeff Grafton f73e3cbb30 Use munged semantic version for side-loaded docker tag 2017-04-27 15:05:40 -07:00
Jeff Grafton ed7c75e324 Update gazel to v17 2017-04-27 15:01:34 -07:00
Kubernetes Submit Queue 98398d5d6e Merge pull request #41106 from spxtr/gen3
Automatic merge from submit-queue

Don't check in zz_generated.openapi.go.

`zz_generated.openapi.go` is the file that causes the most merge conflicts of all. In #33440, @thockin updated the makefile to support generating these files on demand, but that didn't play well with bazel/gazel.

In this PR, I add a new build macro that will generate this file with a `go_genrule`. I added support for keeping the BUILD file up to date in mikedanese/gazel#34.

**Release note**:
```release-note
NONE
```
2017-04-27 11:40:31 -07:00
Kubernetes Submit Queue 549bd4b7d5 Merge pull request #44591 from ixdy/bazel-push-build
Automatic merge from submit-queue (batch tested with PRs 44591, 44549)

Update repo-infra bazel dependency and use new gcs_upload rule

This PR provides similar functionality to push-build.sh entirely within Bazel rules (though it relies on gsutil).

It's an alternative to #44306.

Depends on https://github.com/kubernetes/repo-infra/pull/13.

**Release note**:

```release-note
NONE
```
2017-04-27 10:54:56 -07:00
Kubernetes Submit Queue 433aec11c8 Merge pull request #44531 from pwittrock/kubectl-openapi
Automatic merge from submit-queue

OpenAPI support for kubectl

Support for openapi spec in kubectl.

Includes:
- downloading and caching openapi spec to a local file
- parsing openapi spec into binary serializable datastructures (10x faster load times 600ms -> 40ms)
- caching parsed openapi spec in memory for each command

```release-note
NONE
```
2017-04-26 16:59:17 -07:00
Kubernetes Submit Queue 21f30db4c6 Merge pull request #44826 from dims/enable-default-signer-in-local-up-cluster
Automatic merge from submit-queue (batch tested with PRs 41287, 41636, 44881, 44826)

Enable default signer implementation

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

The Kubernetes controller manager provides a default implementation
of a signer. We should enable it by passing the --cluster-signing-cert-file
and --cluster-signing-key-file parameters to the controller manager
with paths to your Certificate Authority’s keypair. Hoping this will
help pass the "Certificates API [It] should support building a client with a CSR"
e2e test when run against k8s started using local-up-cluster.sh

**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
NONE
```
2017-04-25 17:56:44 -07:00
Joe Finney 8e84a9aedc Add go_genrule for zz_generated.openapi.go.
Clean zz_generated.openapi.go before running gazel.
2017-04-25 17:51:36 -07:00
Lucas Käldström 6b5d5371d9
Bump to go1.8.1 and remove the edge GOROOT 2017-04-25 23:45:47 +03:00
Jeff Grafton a9bfae8ec3 Update repo-infra bazel dependency and use new gcs_upload rule 2017-04-25 13:45:28 -07:00
Kubernetes Submit Queue e1adcc2367 Merge pull request #44583 from mikedanese/go1.8
Automatic merge from submit-queue

bump bazel build to go1.8.1 and remove invalid unit tests

part of https://github.com/kubernetes/kubernetes/issues/38228

I firmly believe that unit tests that check error strings are incorrect unit tests. If we care about what type of error is returned, we need to use public error types. Anywhere we are using generic errors, we don't care other then that we saw an error.
2017-04-25 13:32:28 -07:00
Kubernetes Submit Queue 896d2afb42 Merge pull request #44588 from dmmcquay/kubeadm_skip_token_print
Automatic merge from submit-queue (batch tested with PRs 44601, 44842, 44893, 44491, 44588)

kubeadm: add flag to skip token print out

**What this PR does / why we need it**: When kubeadm init is used in an automated context, it still prints the token to standard out. When standard output ends up in a log file, it can be considered that the token is leaked there and can be compromised. This PR adds a flag you can select to not have it print out and explicitly disable this behavior.

This is a continuation from https://github.com/kubernetes/kubernetes/pull/42823 since it had to be closed.

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

**Special notes for your reviewer**: /cc @luxas @errordeveloper 

**Release note**:
```release-note
NONE
```
2017-04-25 12:51:41 -07:00
Mike Danese 59fc948a06 bump rules_go and go version for bazel builds
and bump gazel to a version that supports 1.8
2017-04-25 11:23:33 -07:00
Phillip Wittrock 6cbe37be2b kubectl OpenAPI whitelist pkg/kubectl/cmd/util/openapi for linting 2017-04-25 10:45:49 -07:00
Kubernetes Submit Queue 08deaf2b98 Merge pull request #44865 from wongma7/validate-etcd
Automatic merge from submit-queue (batch tested with PRs 40060, 44860, 44865, 44825, 44162)

Validate etcd only when expecting to run etcd

If running kubelet only, there is no need to validate etcd as the script will not attempt to start etcd. In fact, validating etcd here may cause the script to fail when one wants to run "nokubelet" right before "kubeletonly" because etcd will definitely be running
```release-note
NONE
```
2017-04-24 23:07:42 -07:00
Kubernetes Submit Queue 6c8cb33fb3 Merge pull request #42101 from Dmitry1987/feature/hpa-upscale-downscale-delay-configurable
Automatic merge from submit-queue (batch tested with PRs 44862, 42241, 42101, 43181, 44147)

Feature/hpa upscale downscale delay configurable

**What this PR does / why we need it**:
Makes "upscale forbidden window" and "downscale forbidden window"  duration configurable in arguments of kube-controller-manager. Those are options of horizontal pod autoscaler.

**Special notes for your reviewer**:
Please have a look @DirectXMan12 , the PR as discussed in Slack.

**Release note**:
```
Make "upscale forbidden window" and "downscale forbidden window"  duration configurable in arguments of kube-controller-manager. Those are options of horizontal pod autoscaler. Right now are hardcoded 3 minutes for upscale, and 5 minutes to downscale.  But sometimes cluster administrator might want to change this for his own needs.
```
2017-04-24 19:39:42 -07:00
Davanum Srinivas eb9ee75c28 Enable default signer implementation
The Kubernetes controller manager provides a default implementation
of a signer. We should enable it by passing the --cluster-signing-cert-file
and --cluster-signing-key-file parameters to the controller manager
with paths to your Certificate Authority’s keypair. Hoping this will
help pass the "Certificates API [It] should support building a client with a CSR"
e2e test when run against k8s started using local-up-cluster.sh
2017-04-24 13:20:52 -04:00
Matthew Wong 0dc99ef80f Validate etcd only when expecting to run etcd 2017-04-24 12:28:19 -04:00
xilabao 19217bc4a2 support subresource when running kubectl create role 2017-04-24 10:05:47 +08:00
Kristian Klausen eb882a3d1a Remove redis-proxy example
The docker image is nowhere to be found, so lets remove it.
There have been a request for the Dockerfile here [1], but nobody
seems to care.

redis-proxy is replaced with redis-master in test-cmd-util.sh, to
ensure that the tests still works.
The redis-proxy pod in test/fixtures/doc-yaml/user-guide/multi-pod.yaml
is replaced with valid-pod from test/fixtures/doc-yaml/admin/limitrange/valid-pod.yaml,
so redis-proxy is removed every where.

[1] https://github.com/kubernetes/kubernetes/issues/4914#issuecomment-77209779
2017-04-23 16:59:23 +02:00
derek mcquay d047dfbc6f kubeadm: add flag to skip token print out 2017-04-20 13:12:37 -07:00
Kubernetes Submit Queue fe44d1f5ce Merge pull request #44073 from marun/fed-e2e-config-from-secrets
Automatic merge from submit-queue (batch tested with PRs 43500, 44073)

[Federation] Add option to retrieve e2e cluster config from secrets

Previously the federation e2e setup was reading member cluster configuration from the test run's kubeconfig. This change removes that dependency in favor of reading member cluster configuration from secrets in the hosting cluster, and caches the configuration to avoid having to read it separately for each test.

cc: @kubernetes/sig-federation-pr-reviews @perotinus
2017-04-18 22:27:58 -07:00
Kubernetes Submit Queue bdc2b20b74 Merge pull request #43500 from marun/fed-secret-upgrade-test
Automatic merge from submit-queue

[Federation] Add simple upgrade test

This PR adds a simple upgrade test that targets all registered federated types.

cc: @kubernetes/sig-federation-pr-reviews @perotinus
2017-04-18 22:20:26 -07:00
Kubernetes Submit Queue a9be156eea Merge pull request #44292 from derekwaynecarr/local-up-deploy-dashboard
Automatic merge from submit-queue (batch tested with PRs 44222, 44614, 44292, 44638)

Optionally deploy kubernetes dashboard in local-up cluster

**What this PR does / why we need it**:
Enable users of local up cluster to optionally deploy the kubernetes dashboard.

**Special notes for your reviewer**:
The dashboard is especially useful when working on k8s + service catalog at the same time.
2017-04-18 17:42:06 -07:00
Maru Newby 9dc74d60f7 fed: Add simple upgrade test 2017-04-18 15:46:43 -07:00
Kubernetes Submit Queue 09e3fdbafe Merge pull request #44500 from Cynerva/gkk/cdk-1.6-support
Automatic merge from submit-queue (batch tested with PRs 43000, 44500, 44457, 44553, 44267)

Add Kubernetes 1.6 support to Juju charms

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

This adds Kubernetes 1.6 support to Juju charms.

This includes some large architectural changes in order to support multiple versions of Kubernetes with a single release of the charms. There are a few bug fixes in here as well, for issues that we discovered during testing.

**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**:

Thanks to @marcoceppi, @ktsakalozos, @jacekn, @mbruzek, @tvansteenburgh for their work in this feature branch as well!

**Release note**:

```release-note
Add Kubernetes 1.6 support to Juju charms
Add metric collection to charms for autoscaling
Update kubernetes-e2e charm to fail when test suite fails
Update Juju charms to use snaps
Add registry action to the kubernetes-worker charm
Add support for kube-proxy cluster-cidr option to kubernetes-worker charm
Fix kubernetes-master charm starting services before TLS certs are saved
Fix kubernetes-worker charm failures in LXD
Fix stop hook failure on kubernetes-worker charm
Fix handling of juju kubernetes-worker.restart-needed state
Fix nagios checks in charms
```
2017-04-18 13:19:06 -07:00
Maru Newby 9a9d897d94 fed: Add option to source e2e cluster config from host cluster
Add the option to configure e2e access to member clusters from the
same secrets in the host cluster used by the federation control plane.
The default behavior will continue to be sourcing this configuration
from the e2e kubeconfig.  The optional behavior can be enabled by
passing --federation-config-from-cluster=true as an argument to
ginkgo.
2017-04-17 23:38:03 -07:00
NickrenREN 5cafb9042b find and add active pods for dswp
loops through the list of active pods and ensures that each one exists in the desired state of the world cache
2017-04-18 11:21:37 +08:00
Chao Xu 4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Rye Terrell 33fee22032 add support for kube-proxy cluster-cidr option 2017-04-14 10:45:23 -05:00
Rye Terrell ca4afd8773 Update CDK charms to use snaps 2017-04-14 10:43:00 -05:00
Andy Goldstein e63fcf708d Make controller Run methods consistent
- startup/shutdown logging
- wait for cache sync logging
- defer utilruntime.HandleCrash()
- wait for stop channel before exiting
2017-04-14 07:27:45 -04:00
Kubernetes Submit Queue 5ad494077e Merge pull request #42914 from liggitt/fix-defaulting
Automatic merge from submit-queue (batch tested with PRs 44424, 44026, 43939, 44386, 42914)

remove defaulting from conversion path

follow up for #42764

* remove call to defaulting from conversion path (defaulting is a separate step from conversion)
* remove non-top-level-object defaulting registration (unused after conversion call is removed)
* generate missing top-level defaults for some api groups:
  * autoscaling/v2alpha1
  * policy/v1alpha1
  * policy/v1beta1
* register top-level defaults for some api groups that were missing them:
  * autoscaling/v2alpha1
  * settings/v1alpha1
2017-04-13 22:07:10 -07:00
Kubernetes Submit Queue 08bd9c773f Merge pull request #44071 from liggitt/service-account-lookup
Automatic merge from submit-queue (batch tested with PRs 44406, 41543, 44071, 44374, 44299)

Enable service account token lookup by default

Fixes #24167

```release-note
kube-apiserver: --service-account-lookup now defaults to true, requiring the Secret API object containing the token to exist in order for a service account token to be valid. This enables service account tokens to be revoked by deleting the Secret object containing the token.
```
2017-04-13 19:52:06 -07:00
Kubernetes Submit Queue c814bab9e0 Merge pull request #44396 from wongma7/etcd-version
Automatic merge from submit-queue

Do etcd semver validation using posix only

this is a follow-up to https://github.com/kubernetes/kubernetes/pull/44352, can't use sort -V because not everybody has that
```release-note
NONE
```
2017-04-13 00:44:08 -07:00
Kubernetes Submit Queue 765755376e Merge pull request #43831 from jayunit100/local-up-conformance
Automatic merge from submit-queue

local up dns defaults/Privileged defaults so that [Conformance] sets mostly pass on local clusters.

Fixes #43651 So that only 4 tests fail out of the box.
2017-04-12 20:44:02 -07:00
Kubernetes Submit Queue f1c0c0a73c Merge pull request #42395 from nicksardo/gce-src-ranges
Automatic merge from submit-queue

Adding load balancer src cidrs to GCE cloudprovider

**What this PR does / why we need it**:
As of January 31st, 2018, GCP will be sending health checks and l7 traffic from two CIDRs and legacy health checks from three CIDS. This PR moves them into the cloudprovider package and provides a flag for override.

Another PR will need to be address firewall rule creation for external L4 network loadbalancing #40778

**Which issue this PR fixes**
Step one of #40778
Step one of https://github.com/kubernetes/ingress/issues/197

**Release note**:
```release-note
Add flags to GCE cloud provider to override known L4/L7 proxy & health check source cidrs
```
2017-04-12 19:57:43 -07:00
Jordan Liggitt ad116026d9
Remove vestiges of defaulting from conversion path, switch to top-level default registration only 2017-04-12 13:36:15 -04: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
Matthew Wong 04241a673d Do etcd semver validation using posix only 2017-04-12 12:44:07 -04: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
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 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 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 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
Janet Kuo b29135ea8f In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator 2017-04-11 15:41:57 -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
Matthew Wong 36d244f084 Fix etcd semver validation by using 'sort -V' 2017-04-11 14:19:30 -04:00
Derek Carr ab6812324d Optionally deploy kubernetes dashboard in local-up cluster 2017-04-11 10:54:33 -04: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
Kubernetes Submit Queue b9a5a5c9b3 Merge pull request #42748 from dcbw/cfssl-localup
Automatic merge from submit-queue (batch tested with PRs 43866, 42748)

hack/cluster: download cfssl if not present

hack/local-up-cluster.sh uses cfssl to generate certificates and
will exit it cfssl is not already installed.  But other cluster-up
mechanisms (GCE) that generate certs just download cfssl if not
present.  Make local-up-cluster.sh do that too so users don't have
to bother installing it from somewhere.
2017-04-10 14:27:11 -07:00
Kubernetes Submit Queue d2e4f54791 Merge pull request #30302 from aveshagarwal/master-project-node-selector-taints-tolerations
Automatic merge from submit-queue (batch tested with PRs 43870, 30302, 42722, 43736)

Admission plugin to merge pod and namespace tolerations for restricting pod placement on nodes

```release-note
This admission plugin checks for tolerations on the pod being admitted and its namespace, and verifies if there is any conflict. If there is no conflict, then it merges the pod's namespace tolerations with the the pod's tolerations and it verifies them against its namespace' whitelist of tolerations and returns. If a namespace does not have its default or whitelist tolerations specified, then cluster level default and whitelist is used. An example of its versioned config:

apiVersion: apiserver.k8s.io/v1alpha1
kind: AdmissionConfiguration
plugins:
- name: "PodTolerationRestriction"
  configuration:
    apiVersion: podtolerationrestriction.admission.k8s.io/v1alpha1
    kind: Configuration
    default:
     - Key: key1
       Value: value1
     - Key: key2
       Value: value2
    whitelist:
    - Key: key1
      Value: value1
    - Key: key2
      Value: value2
```
2017-04-10 13:33:13 -07:00
Kubernetes Submit Queue 2899f47bc8 Merge pull request #44137 from k82cn/k8s_44135
Automatic merge from submit-queue (batch tested with PRs 41758, 44137)

Removed hostname/subdomain annotation.

fixes #44135

```release-note
Remove `pod.beta.kubernetes.io/hostname` and `pod.beta.kubernetes.io/subdomain` annotations. 
Users should use `pod.spec.hostname` and `pod.spec.subdomain` instead.
```
2017-04-10 10:06:15 -07:00
Klaus Ma c2b629ee2a Removed hostname/subdomain annotation. 2017-04-10 13:55:40 +08:00
Kubernetes Submit Queue 357af07718 Merge pull request #44197 from Random-Liu/dockershim-only-mode
Automatic merge from submit-queue

Add dockershim only mode

This PR added a `experimental-dockershim` hidden flag in kubelet to run dockershim only.

We introduce this flag mainly for cri validation test. In the future we should compile dockershim into another binary.

@yujuhong @feiskyer @xlgao-zju 
/cc @kubernetes/sig-node-pr-reviews
2017-04-09 19:27:51 -07:00
Kubernetes Submit Queue eed7d11255 Merge pull request #43136 from shashidharatd/kubectl-tests
Automatic merge from submit-queue

[Federation] Fix Running service controller in federation kubectl tests

Fixes:  #42607

cc @nikhiljindal @kubernetes/sig-federation-bugs
2017-04-09 11:19:38 -07:00
Kubernetes Submit Queue 6e3bd081d5 Merge pull request #43892 from bsalamat/sched_conf1
Automatic merge from submit-queue

Scheduler can recieve its policy configuration from a ConfigMap

**What this PR does / why we need it**: This PR adds the ability to scheduler to receive its policy configuration from a ConfigMap. Before this, scheduler could receive its policy config only from a file. The logic to watch the ConfigMap object will be added in a subsequent PR.

**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**:

```Add the ability to the default scheduler to receive its policy configuration from a ConfigMap object.
```
2017-04-08 23:19:43 -07:00
Kubernetes Submit Queue c8f90171e4 Merge pull request #39678 from resouer/extract-resource
Automatic merge from submit-queue (batch tested with PRs 41775, 39678, 42629, 42524, 43028)

Extract resources functions belongs to api/util

Address: extract kubelet resources functions belongs to `pkg/api/v1/resource_helpers.go`
2017-04-07 17:44:14 -07:00
Bobby Salamat f9d1333144 Addressed reviewers comments 2017-04-07 17:31:45 -07:00
Bobby Salamat c55e5b6b8e Add flags to known-flags 2017-04-07 17:06:23 -07:00
Random-Liu 327fc270d7 Add dockershim only mode 2017-04-07 16:43:57 -07:00
Kubernetes Submit Queue 596a21d294 Merge pull request #44213 from madhusudancs/hack-shashi-me
Automatic merge from submit-queue

Add shashidharatd and madhusudancs as hack/ approvers.

Federation team has a bunch of scripts in `hack/` directory and for iterating quickly we need approvers permission in this directory. Both @shashidharatd and I have made number of changes to the scripts in this directory and generally understand the scripts here well. 

**Release note**:
```release-note
NONE
```

/assign @fejta
2017-04-07 16:03:52 -07:00
jayunit100 60829a88c2 Remove conformance from port forwarding so local / secure clusters aren't expected to support it. 2017-04-07 16:48:26 -04:00
Kubernetes Submit Queue de1cee38bf Merge pull request #35284 from jsafrane/fix-class-tests
Automatic merge from submit-queue

Add test for provisioning with storage class

This PR re-introduces e2e test for dynamic provisioning with storage classes.

It adds the same test as it was merged in PR #32485 with an extra patch adding region to AWS calls. It works well on my AWS setup, however I'm using shared company account and I can't run kube-up.sh and run the tests in the "official" way.

@zmerlynn, can you please try to run tests that led to #34961?

@justinsb, you're my AWS guru, would there be a way how to introduce fully initialized AWS cloud provider into e2e test framework? It would simplify everything. GCE has it there, but it's easier to initialize, I guess. See https://github.com/kubernetes/kubernetes/blob/master/test/e2e/pd.go#L486 for example - IMO tests should not talk to AWS directly.
2017-04-07 11:40:34 -07:00
Madhusudan.C.S 009842c715 Add shashidharatd and madhusudancs as hack/ approvers. 2017-04-07 08:33:26 -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 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
Brendan Burns 79f51923d3 Extract a bunch more strings from kubectl 2017-04-06 20:12:50 -07:00
Avesh Agarwal 5f309eec9a Fix golint. 2017-04-06 16:15:34 -04: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
Jan Safranek a327302200 e2e tests should be multizone aware
Pass MULTIZONE=true env. variable to e2e test framework.
2017-04-06 13:28:29 +02:00
Kubernetes Submit Queue b41e415ebd Merge pull request #43137 from shashidharatd/federation-domain
Automatic merge from submit-queue

[Federation] Remove FEDERATIONS_DOMAIN_MAP references

Remove all references to FEDERATIONS_DOMAIN_MAP as this method is no longer is used and is replaced by adding federation domain map to kube-dns configmap.

cc @madhusudancs @kubernetes/sig-federation-pr-reviews 

**Release note**:
```
[Federation] Mechanism of adding `federation domain maps` to kube-dns deployment via `--federations` flag is superseded by adding/updating `federations` key in `kube-system/kube-dns` configmap. If user is using kubefed tool to join cluster federation, adding federation domain maps to kube-dns is already taken care by `kubefed join` and does not need further action.
```
2017-04-06 02:05:42 -07:00
Dr. Stefan Schimanski 6e026b4d43 Clean up staging/godeps-json-updater.go 2017-04-06 09:32:57 +02:00
Madhusudan.C.S 5af5378fce Default FEDERATION_KUBE_CONTEXT to FEDERATION_NAME in federation e2e up/down scripts.
This is consistent with how kubefed creates kubeconfig contexts.
2017-04-05 18:47:03 -07:00
Christoph Blecker 4c2985e144
Update gen_api_ref_docs to use same diff method as verify 2017-04-05 13:06:35 -07:00
Mike Danese ba5c2855b3 bazel: implement git build stamping 2017-04-05 11:47:39 -07:00
Haoran Wang fcc73d355d Multiple scheduler leader election support 2017-04-05 22:36:13 +08:00
Jordan Liggitt 0d2e5a0dd8
Enable service account token lookup by default
```release-note
kube-apiserver: --service-account-lookup now defaults to true. This enables service account tokens to be revoked by deleting the Secret object containing the token.
```
2017-04-04 22:00:11 -04:00
Kubernetes Submit Queue 7e18392f16 Merge pull request #43671 from k82cn/skip_e2e_4_mac
Automatic merge from submit-queue

Skip e2e test for Mac.

fixes #36792
2017-04-04 18:27:25 -07:00
Kubernetes Submit Queue 3c357139f3 Merge pull request #42674 from nikhiljindal/secretKubeTe
Automatic merge from submit-queue

Enable secrets in federation kubectl tests

Fixes https://github.com/kubernetes/kubernetes/issues/40568
Superseedes https://github.com/kubernetes/kubernetes/pull/40714

Updating kubectl tests to wait for deletion if WAIT_FOR_DELETION is set to true. WAIT_FOR_DELETION will be set to true only when the tests are being run for federation apiserver.
This change will not impact kube apiserver tests and still enable federation and kubernetes to share the same test code.
This is a workaround until https://github.com/kubernetes/kubernetes/issues/42594 is fixed.

cc @kubernetes/sig-federation-pr-reviews
cc @liggitt as he reviewed https://github.com/kubernetes/kubernetes/pull/40714
2017-04-04 00:28:42 -07:00
Dan Williams f20437a822 hack/cluster: download cfssl if not present
hack/local-up-cluster.sh uses cfssl to generate certificates and
will exit it cfssl is not already installed.  But other cluster-up
mechanisms (GCE) that generate certs just download cfssl if not
present.  Make local-up-cluster.sh do that too.
2017-04-03 23:31:16 -05:00
Harry Zhang 953c9fa6bb echo pkg/fieldpath into hack/.linted_packages 2017-04-03 13:06:48 +08:00
Christoph Blecker 8cde2e0eb7
Fix coverage report testing on macOS 2017-04-02 10:01:43 -07:00
Kubernetes Submit Queue 25a87fa19c Merge pull request #40804 from runcom/prepull-cri
Automatic merge from submit-queue

test/e2e_node: prepull images with CRI

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

- This PR builds on top of #40525 (and contains one commit from #40525)
- The second commit contains a tiny change in the `Makefile`.
- Third commit is a patch to be able to prepull images using the CRI (as opposed to run `docker` to pull images which doesn't make sense if you're using CRI most of the times)

Marked WIP till #40525 makes its way into master

@Random-Liu @lucab @yujuhong @mrunalp @rhatdan
2017-04-01 03:08:35 -07:00
Antonio Murdaca 2634f57f7f
test/e2e_node: prepull images with CRI
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-04-01 10:18:56 +02:00
Davanum Srinivas 605589dc0d Specify a directory for the logs
Switch from hard coded "/tmp" to a user specified location for
the logs. Default to "/tmp" to keep the current behavior and
not break any current users or jobs.
2017-03-31 15:17:14 -04:00
Kubernetes Submit Queue 91c03b0e8f Merge pull request #43813 from liggitt/conditional-post-start-hook
Automatic merge from submit-queue

Make RBAC post-start hook conditional on RBAC authorizer being used

Makes the RBAC post-start hook (and reconciliation) conditional on the RBAC authorizer being used

Ensures we don't set up unnecessary objects.

```release-note
RBAC role and rolebinding auto-reconciliation is now performed only when the RBAC authorization mode is enabled.
```
2017-03-31 05:51:49 -07:00
Kubernetes Submit Queue 2179ffeb63 Merge pull request #42379 from xilabao/enable-audit-log-in-local-cluster
Automatic merge from submit-queue (batch tested with PRs 42379, 42668, 42876, 41473, 43260)

Enable audit log in local cluster

fixes #42318

`ENABLE_APISERVER_BASIC_AUDIT=true hack/local-up-cluster.sh`
2017-03-30 23:36:20 -07:00
Dan Williams b3705b6e35 hack/cluster: consolidate cluster/ utils to hack/lib/util.sh
Per Clayton's suggestion, move stuff from cluster/lib/util.sh to
hack/lib/util.sh.  Also consolidate ensure-temp-dir and use the
hack/lib/util.sh implementation rather than cluster/common.sh.
2017-03-30 22:34:46 -05:00
Jordan Liggitt 890894ac4f
Disable RBAC post-start hook if not using the RBAC authorizer 2017-03-30 23:30:04 -04:00
jayunit100 f3fb966e73 local up dns defaults 2017-03-30 17:35:40 -04:00
Kubernetes Submit Queue fad2753a2c Merge pull request #43779 from ixdy/hack-bazel-scripts
Automatic merge from submit-queue (batch tested with PRs 38741, 41301, 43645, 43779, 42337)

If we already have the right version of gazel installed, use it

**What this PR does / why we need it**: makes the bazel scripts marginally faster by only downloading/building gazel when necessary. Also removes the `followRedirects` config setting for gopkg.in which is no longer needed.

**Release note**:

```release-note
NONE
```
2017-03-29 14:53:35 -07:00
Jeff Grafton 37dda6c2fd If we already have the right version of gazel installed, use it 2017-03-29 09:32:34 -07:00
Kubernetes Submit Queue 72207db455 Merge pull request #42797 from joseph-lanoux/ginkgo_nocolor
Automatic merge from submit-queue

Fix the ginkgo nocolor parameter

When running the e2e tests in parallel, the ginkgo nocolor is not
honored and produces a colored output. This change fixes this issue
(#42793).



**What this PR does / why we need it**:
It fixes the ginkgo color parameter when running e2e tests in parallel.

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

**Special notes for your reviewer**:
It seems there is a missing bit in ginkgo-e2e.sh so I added it.

**Release note**:

```release-note
```
2017-03-29 03:50:28 -07:00
Kubernetes Submit Queue c01baaf54f Merge pull request #39858 from alejandroEsc/ae/issue/39427
Automatic merge from submit-queue

addressing issue #39427 adding a flag --output to 'kubectl version'

**What this PR does / why we need it**:
Addressing Issue https://github.com/kubernetes/kubernetes/issues/39427 we all

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


**Release note**:
```
kubectl version has new flag --output (=json or yaml) allowing result of the command to be parsed in either json format or yaml. 
```
2017-03-28 12:12:22 -07:00
Kubernetes Submit Queue ab892f9de8 Merge pull request #43735 from CaoShuFeng/godeprestore
Automatic merge from submit-queue (batch tested with PRs 40885, 43623, 43735)

Use "hack/godep-restore.sh" instead of "godep restore"

Now we get errors when run "godep restore".
So we need to update the help message.
@derekwaynecarr 

**Special notes for your reviewer**:

**Release note**:

```NONE
```
2017-03-28 11:16:24 -07:00
Alejandro Escobar a5e6dcb434 addressing issue #39427 adding a flag --output to allow for either json or yaml.
updating with PR changes requested.

latest changes to having short for human readable only, and error cases moved a bit to the end.

rebase fixes

latest pr. changes.

small change moving return nil out of switch.

updated the nil check for the error in the humanreadable case.

more optimization in humanreadable code.

pushed up current test changes, this is purely temporary

finished writing tests

updated test and function names.

changed output extensions from .sh to output.

updated version, version struct now just called Version and not VersionObj.

made a few changes to testing.

fixed testing issues, created better test and cleanup

go format change.
2017-03-28 10:07:53 -07:00
joseph-lanoux b2560666fa Update ginkgo-e2e.sh 2017-03-28 15:18:18 +01:00
Joseph Lanoux 168394c6d5 Fix the ginkgo nocolor parameter
When running the e2e tests in parallel, the ginkgo nocolor is not
honored and produces a colored output. This change adds the
GINKGO_NO_COLOR environment variable.
2017-03-28 15:18:01 +01:00
Cao Shufeng 205a5abee9 Use "hack/godep-restore.sh" instead of godep restore 2017-03-28 04:05:47 -04:00
p0lyn0mial 86e06e2401 Admission plugin initializer for the generic API server.
This PR implements a standard admission plugin initializer for the generic API server.
The initializer accepts external clientset, external informers and the authorizer.
2017-03-28 08:13:09 +02:00
Klaus Ma c6e79167f4 Skip e2e test for Mac. 2017-03-28 11:40:40 +08:00
Kubernetes Submit Queue b6d187d5f2 Merge pull request #42087 from cblecker/scheduler-lint
Automatic merge from submit-queue

Add plugin/pkg/scheduler to linted packages

**What this PR does / why we need it**:
Adds plugin/pkg/scheduler to linted packages to improve style correctness.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-03-27 15:14:15 -07:00
Kubernetes Submit Queue eaf8351d45 Merge pull request #41554 from jsafrane/local-up-class
Automatic merge from submit-queue

local-up-cluster.sh should create a default storage class

To make dynamic provisioning working out of the box in local cluster a default
storage class needs to be instantiated.

```release-note
NONE
```
2017-03-27 12:51:27 -07:00
Kubernetes Submit Queue b705835bae Merge pull request #42911 from deads2k/server-04-combined
Automatic merge from submit-queue (batch tested with PRs 43694, 41262, 42911)

combine kube-apiserver and kube-aggregator

This combines several pulls currently in progress and wires them together.  The aggregator sits in front of the normal kube-apiserver and allows local fallthrough instead of proxying.

@kubernetes/sig-api-machinery-misc 
@DirectXMan12 since you seem invested, your life will get easier
@luxas FYI since you've started trying to wire something together.  



Dependent Pulls LGTM:
- [x] https://github.com/kubernetes/kubernetes/pull/42801
- [x] https://github.com/kubernetes/kubernetes/pull/42886
- [x] https://github.com/kubernetes/kubernetes/pull/42900
- [x] https://github.com/kubernetes/kubernetes/pull/42732
- [x] https://github.com/kubernetes/kubernetes/pull/42672
- [x] https://github.com/kubernetes/kubernetes/pull/43141
- [x] https://github.com/kubernetes/kubernetes/pull/43076
- [x] https://github.com/kubernetes/kubernetes/pull/43149
- [x] https://github.com/kubernetes/kubernetes/pull/43226
- [x] https://github.com/kubernetes/kubernetes/pull/43144
2017-03-27 09:30:24 -07:00
deads2k 546b45c9c0 enable generation 2017-03-27 09:56:26 -04:00
deads2k 8e26fa25da wire in aggregation 2017-03-27 09:44:10 -04:00
Kubernetes Submit Queue 7564849fb4 Merge pull request #43522 from cblecker/staging-godep-ignore
Automatic merge from submit-queue

Ignore GoVersion and GodepVersion in staging-godep diff

**What this PR does / why we need it**:
This modifies the hack/update-staging-godeps.sh script to ignore GoVersion and GodepVersion in the diff it makes, similar to what hack/verify-godeps.sh does

**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
NONE
```
2017-03-26 10:25:14 -07:00
Kubernetes Submit Queue dae73287ab Merge pull request #43569 from alejandroEsc/ae/localup/etcd3
Automatic merge from submit-queue (batch tested with PRs 43149, 41399, 43154, 43569, 42507)

allow etcd2/3 choice when bringing up a local cluster, default to etcd3

**What this PR does / why we need it**: local-up-cluster currently doesn't allow you to select which etcd version to use, here we allow you to select one, since k8s is moving towards etcd3 we suggest it to be the default.

**Special notes for your reviewer**: Note, i didnt realize this until i had used https://github.com/kubernetes/kubernetes/pull/42656 which made it immediately clear.

**Release note**:
```
NONE
```
2017-03-26 00:55:23 -07:00
Kubernetes Submit Queue bc0171c6ec Merge pull request #43312 from deads2k/cli-08-discovery
Automatic merge from submit-queue (batch tested with PRs 43429, 43416, 43312, 43141, 43421)

add singular resource names to discovery

Adds the singular resource name to our resource for discovery.  This is something we've discussed to remove our pseudo-pluralization library which is unreliable even for english and really has no hope of properly handling other languages or variations we can expect from TPRs and aggregated API servers.

This pull simply adds the information to discovery, it doesn't not re-wire any RESTMappers.

@kubernetes/sig-cli-misc  @kubernetes/sig-apimachinery-misc @kubernetes/api-review


```release-note
API resource discovery now includes the `singularName` used to refer to the resource.
```
2017-03-25 22:24:25 -07:00
Kubernetes Submit Queue 14c1c9cfd4 Merge pull request #43020 from cblecker/verify-artifacts
Automatic merge from submit-queue (batch tested with PRs 42998, 42902, 42959, 43020, 42948)

Export godep patch files to artifacts

**What this PR does / why we need it**:
If a godep patch file is created, and a `${WORKSPACE}/_artifacts` directory exists, copy the patch file out to 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
NONE
```

cc: @fejta
2017-03-25 17:17:26 -07:00
Kubernetes Submit Queue a9c8d97709 Merge pull request #42801 from deads2k/agg-25-local
Automatic merge from submit-queue

add local option to APIService

APIServices need an option to avoid proxying in cases where the groupversion is handled later in the chain.  This will allow a coherent and complete set of APIServices, but won't require extra connections.

@kubernetes/sig-api-machinery-misc @ncdc @cheftako
2017-03-25 15:12:19 -07:00
Kubernetes Submit Queue 4061664d03 Merge pull request #43048 from shiywang/e2e-param
Automatic merge from submit-queue (batch tested with PRs 43048, 43624, 43649)

expose -untilItFails in hack/e2e.go

Fixes https://github.com/kubernetes/kubernetes/issues/43026
2017-03-25 13:29:21 -07:00
Christoph Blecker 74ab872927
Ignore GoVersion and GodepVersion in staging-godep diff 2017-03-25 12:17:59 -07:00
Christoph Blecker 3ad13293bc
Export patch files to artifacts 2017-03-25 12:16:50 -07:00
Kubernetes Submit Queue 4aa9168536 Merge pull request #41581 from marun/cleanup-test-integration
Automatic merge from submit-queue (batch tested with PRs 43642, 43170, 41813, 42170, 41581)

Cleanup make test-integration

``make test-integration`` was using the first positional arg passed to ``WHAT`` to filter the list of integration test packages.  This PR switches to passing ``WHAT`` verbatim to be consistent with how ``make test`` works.  That means the new way to scope execution to a single integration package will be:

```bash
make test-integration WHAT="./test/integration/auth" KUBE_TEST_ARGS="-run=^TestKindAuthorization$"
```

Instead of:

```bash
make test-integration WHAT="auth -test.run=^TestKindAuthorization$"
```

This PR also ensures that the script exits after running a single test case and that etcd cleanup is not done twice at the end of a successful test run.  Both were issues encountered while diagnosing the scoping issue.

cc: @thockin @deads2k @stevekuznetsov @ncdc @derekwaynecarr
2017-03-24 19:04:30 -07:00
Kubernetes Submit Queue 20b01be016 Merge pull request #41813 from shiywang/timeout_options
Automatic merge from submit-queue (batch tested with PRs 43642, 43170, 41813, 42170, 41581)

Be able to specify the timeout to wait for pod for kubectl logs/attach

Fixes https://github.com/kubernetes/kubernetes/issues/41786
current flag is `get-pod-timeout`, we can have a discussion if you have better one, default unit is seconds, above 0

@soltysh @kargakis ptal, thanks
@kubernetes/sig-cli-feature-requests
2017-03-24 19:04:26 -07:00
Nick Sardo baab99b823 Adding load balancer src ranges; support flag overrides 2017-03-24 16:36:19 -07:00
Kubernetes Submit Queue 0e17e5bd9c Merge pull request #38882 from fraenkel/configmap_env_file
Automatic merge from submit-queue (batch tested with PRs 41139, 41186, 38882, 37698, 42034)

create configmap from-env-file

Allow ConfigMaps to be created from Docker based env files.

See proposal https://github.com/kubernetes/community/issues/165

**Release-note:**
```release-note
1. create configmap has a new option --from-env-file that populates a configmap from file which follows a key=val format for each line.
2. create secret has a new option --from-env-file that populates a configmap from file which follows a key=val format for each line.
```
2017-03-24 12:33:25 -07:00
Dmitry1987 965dab366b make hpa upscale and downscale delay window configurable 2017-03-24 18:01:04 +00:00
Kubernetes Submit Queue 9aac45a5be Merge pull request #42347 from aveshagarwal/master-local-cluster-up-fix
Automatic merge from submit-queue

Fix local cluster up script for kube-public namespace error.

Fix local cluster up script for kube-public namespace error:
```
Error from server (AlreadyExists): namespaces "kube-public" already exists
```
2017-03-24 10:25:41 -07:00
Jordan Liggitt 707f0fb131
Preserve API group order in discovery, prefer extensions over apps 2017-03-23 11:10:53 -04:00
Alejandro Escobar 6a8f55736a allow etcd2/3 choice when bringing up a local cluster, default to 3 but thats negotiable, it is what we will be using going forwards. 2017-03-23 06:42:44 -07:00
Jordan Liggitt db52b4eb04
Make kubectl replace unconditional 2017-03-22 01:09:56 -04:00
Janet Kuo d0b5de855f Add a test for semantically equal DaemonSet updates 2017-03-21 16:06:34 -07:00
deads2k 36cb9ed640 add singular resource names to discovery 2017-03-21 11:04:08 -04:00
Christoph Blecker ca24afe778
Additional plugin/pkg/scheduler golint fixes 2017-03-19 09:47:58 -07:00
Christoph Blecker 0fac97a062
Add plugin/pkg/scheduler to linted packages 2017-03-19 09:44:14 -07:00
shashidharatd 7943ed7585 Use CoreDNS provider for starting federation controller manager in kubectl tests 2017-03-18 23:00:30 +05:30
Shiyang Wang 788eabe7ba expose until-it-fails param 2017-03-17 08:14:54 +08:00
Kubernetes Submit Queue b617cabfca Merge pull request #43192 from liggitt/kubectl-test-retry
Automatic merge from submit-queue

Retry kubectl test replace on conflict

Since kubectl is doing a resource-version-constrained replace, it is subject to conflicts on a contentious resource (like a node managed by the node controller)

Fixes #41892 (the specific flake, not the watch cache issue)
2017-03-16 08:23:21 -07:00
Jordan Liggitt 9cd791e83c
Retry kubectl test replace on conflict 2017-03-16 08:39:47 -04:00
Kubernetes Submit Queue 1357cafa71 Merge pull request #43180 from mbohlool/bugfix
Automatic merge from submit-queue (batch tested with PRs 43180, 42928)

Verify generated protobuf script should fail on staging/ changes too

fixes #35486
2017-03-15 19:58:20 -07:00
mbohlool f6e4c99548 Verify generated protobuf script should fail on staging/ changes too 2017-03-15 16:15:02 -07:00
Kubernetes Submit Queue 6d2defbc09 Merge pull request #42967 from cblecker/godep-version79
Automatic merge from submit-queue (batch tested with PRs 40964, 42967, 43091, 43115)

Update hack scripts to use godep v79 and ensure_godep_version

**What this PR does / why we need it**:
Based on #42965 and https://github.com/kubernetes/kubernetes/pull/42958#discussion_r105568318, this pins the godep version at v79, which should fix some issues when running godep in go1.8 local environments.

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

**Special notes for your reviewer**:
This should likely get the v1.6 milestone so that it can be merged into master. While I'm setting a default godep version, I'm continuing to use the local pins per this comment: https://github.com/kubernetes/kubernetes/pull/42965#issuecomment-285962723 .

**Release note**:

```release-note
NONE
```

cc: @sttts
2017-03-15 16:08:25 -07:00
shashidharatd b09b20b598 Remove FEDERATIONS_DOMAIN_MAP references 2017-03-15 23:06:16 +05:30
Christoph Blecker 4d85a54027
Change verify-godeps.sh use ensure_godep_version 2017-03-15 10:32:44 -07:00
Christoph Blecker d31a88fee7
Bump godep version to v79 2017-03-15 10:32:37 -07:00
Kubernetes Submit Queue 9e8114655f Merge pull request #40404 from tanshanshan/unit-test-scheduler4
Automatic merge from submit-queue (batch tested with PRs 40404, 43134, 43117)

Improve code coverage for scheduler/api/validation

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

Improve code coverage for scheduler/api/validation from #39559

Thanks
**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-03-15 08:27:20 -07:00
Kubernetes Submit Queue a91869a0c5 Merge pull request #42819 from MrHohn/dns-cm-scripts
Automatic merge from submit-queue (batch tested with PRs 43018, 42713, 42819)

Update startup scripts for kube-dns ConfigMap and ServiceAccount

Follow up PR of #42757. This PR changes all existing startup scripts to support default kube-dns ConfigMap and ServiceAccount.

@bowei 

cc @liggitt 

**Release note**:

```release-note
NONE
```
2017-03-14 16:43:19 -07:00
Kubernetes Submit Queue 6de28fab7d Merge pull request #42942 from vishh/gpu-cont-fix
Automatic merge from submit-queue (batch tested with PRs 42942, 42935)

[Bug] Handle container restarts and avoid using runtime pod cache while allocating GPUs

Fixes #42412

**Background**
Support for multiple GPUs is an experimental feature in v1.6. 
Container restarts were handled incorrectly which resulted in stranding of GPUs
Kubelet is incorrectly using runtime cache to track running pods which can result in race conditions (as it did in other parts of kubelet). This can result in same GPU being assigned to multiple pods.

**What does this PR do**
This PR tracks assignment of GPUs to containers and returns pre-allocated GPUs instead of (incorrectly) allocating new GPUs.
GPU manager is updated to consume a list of active pods derived from apiserver cache instead of runtime cache.
Node e2e has been extended to validate this failure scenario.

**Risk**
Minimal/None since support for GPUs is an experimental feature that is turned off by default. The code is also isolated to GPU manager in kubelet.

**Workarounds**
In the absence of this PR, users can mitigate the original issue by setting `RestartPolicyNever`  in their pods.
There is no workaround for the race condition caused by using the runtime cache though.
Hence it is worth including this fix in v1.6.0.

cc @jianzhangbjz @seelam @kubernetes/sig-node-pr-reviews 

Replaces #42560
2017-03-14 10:19:17 -07:00