Commit Graph

5492 Commits (c10cc3decdd25717eaca5fccfd7cfebb3e09e5ec)

Author SHA1 Message Date
Chao Xu bc9b305f17 generated clients 2017-05-26 00:03:53 -07:00
Chao Xu bc7597853f enable all available api versions when starting apiserver in update-swagger-spec.sh 2017-05-25 23:55:15 -07:00
Kubernetes Submit Queue 7d37a2685c Merge pull request #45867 from kow3ns/controller-history
Automatic merge from submit-queue (batch tested with PRs 46429, 46308, 46395, 45867, 45492)

Controller history

**What this PR does / why we need it**:
Implements the ControllerRevision API object and clientset to allow for the implementation of StatefulSet update and DaemonSet history

```release-note
ControllerRevision type added for StatefulSet and DaemonSet history.
```
2017-05-25 22:42:08 -07:00
Kubernetes Submit Queue 59ee250ced Merge pull request #46429 from wojtek-t/bump_go_to_183
Automatic merge from submit-queue (batch tested with PRs 46429, 46308, 46395, 45867, 45492)

Bump Go version to 1.8.3

This PR also removed this patched version of Go 1.8.1 which we used to use to workaround performance problem of Go 1.8.1.

Fix https://github.com/kubernetes/kubernetes/issues/45216
Ref #46391

@timothysc @bradfitz
2017-05-25 22:42:01 -07:00
Cao Shufeng 93e50b167e support NonResourceURL for kubectl create clusterrole 2017-05-26 10:07:44 +08:00
Kenneth Owens ba128e6e41 Implements ControllerRevision API Object without codec and code
generation
2017-05-25 11:38:57 -07:00
Wojciech Tyczynski 97b6701ea1 Get rid of patched version of Go 1.8.1 2017-05-25 20:05:34 +02:00
Monis Khan a13f026fd0
Panic server on watch errors in test environment
This change makes it so that errors during watch decoding panic the
server if it is in a test environment.  This allows us to catch coder
errors related to storing incompatible types at the same location in
etcd.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-05-25 13:54:56 -04:00
Maru Newby 2c886e93e9 kubefed: Use StoraceClassName class field for etcd pvc 2017-05-25 10:21:08 -07:00
David Ashpole b2a60dc9a4 By default, Disable LowDiskSpaceThresholdMB, and enable eviciton for disk 2017-05-25 10:03:35 -07:00
Kubernetes Submit Queue ed8843406e Merge pull request #46303 from Random-Liu/fix-cos-image-project
Automatic merge from submit-queue (batch tested with PRs 46299, 46309, 46311, 46303, 46150)

Fix cos image project to cos-cloud.

Addressed https://github.com/kubernetes/kubernetes/pull/45136#discussion_r118092211.

@vishh @yujuhong @dchen1107
2017-05-24 23:19:09 -07:00
Shiyang Wang b5cd22641f update url information to prevent http 304 redirection 2017-05-25 14:05:02 +08:00
Jacob Simpson 07e9b0e197 Add support for specifying certificate duration at runtime. 2017-05-24 13:29:46 -07:00
Andy Goldstein 538eb3c6cb Support storageclass storage upgrades to v1 2017-05-24 10:43:56 -04:00
Kubernetes Submit Queue c2421df336 Merge pull request #46194 from CaoShuFeng/under
Automatic merge from submit-queue (batch tested with PRs 46149, 45897, 46293, 46296, 46194)

check flag format in file known-flags.txt

All flags in file hack/verify-flags/known-flags.txt should contain
character -, this change check it to prevent adding useless flags
to known-flags.txt
ref #45948 

**Release note**:

```
NONE
```
2017-05-23 15:49:03 -07:00
Kubernetes Submit Queue 3ff99a8381 Merge pull request #46149 from cjcullen/logtoggle
Automatic merge from submit-queue

Allow the /logs handler on the apiserver to be toggled.

Adds a flag to kube-apiserver, and plumbs through en environment variable in configure-helper.sh
2017-05-23 15:19:08 -07:00
Random-Liu 82f588b483 Fix cos image project to cos-cloud. 2017-05-23 15:12:03 -07:00
Kubernetes Submit Queue 1e2105808b Merge pull request #45136 from vishh/cos-nvidia-driver-install
Automatic merge from submit-queue

Enable "kick the tires" support for Nvidia GPUs in COS

This PR provides an installation daemonset that will install Nvidia CUDA drivers on Google Container Optimized OS (COS).
User space libraries and debug utilities from the Nvidia driver installation are made available on the host in a special directory on the host -
* `/home/kubernetes/bin/nvidia/lib` for libraries
*  `/home/kubernetes/bin/nvidia/bin` for debug utilities

Containers that run CUDA applications on COS are expected to consume the libraries and debug utilities (if necessary) from the host directories using `HostPath` volumes.

Note: This solution requires updating Pod Spec across distros. This is a known issue and will be addressed in the future. Until then CUDA workloads will not be portable.

This PR updates the COS base image version to m59. This is coupled with this PR for the following reasons:
1. Driver installation requires disabling a kernel feature in COS. 
2. The kernel API for disabling this interface changed across COS versions
3. If the COS image update is not handled in this PR, then a subsequent COS image update will break GPU integration and will require an update to the installation scripts in this PR.
4. Instead of having to post `3` PRs, one each for adding the basic installer, updating COS to m59, and then updating the installer again, this PR combines all the changes to reduce review overhead and latency, and additional noise that will be created when GPU tests break.

**Try out this PR**
1. Get Quota for GPUs in any region
2. `export `KUBE_GCE_ZONE=<zone-with-gpus>` KUBE_NODE_OS_DISTRIBUTION=gci`
3. `NODE_ACCELERATORS="type=nvidia-tesla-k80,count=1" cluster/kube-up.sh`
4. `kubectl create -f cluster/gce/gci/nvidia-gpus/cos-installer-daemonset.yaml`
5. Run your CUDA app in a pod.

**Another option is to run a e2e manually to try out this PR**
1. Get Quota for GPUs in any region
2. export `KUBE_GCE_ZONE=<zone-with-gpus>` KUBE_NODE_OS_DISTRIBUTION=gci
3. `NODE_ACCELERATORS="type=nvidia-tesla-k80,count=1"`
4. `go run hack/e2e.go -- --up` 
5. `hack/ginkgo-e2e.sh --ginkgo.focus="\[Feature:GPU\]"`
The e2e will install the drivers automatically using the daemonset and then run test workloads to validate driver integration.

TODO:
- [x] Update COS image version to m59 release.
- [x] Remove sleep from the install script and add it to the daemonset
- [x] Add an e2e that will run the daemonset and run a sample CUDA app on COS clusters.
- [x] Setup a test project with necessary quota to run GPU tests against HEAD to start with https://github.com/kubernetes/test-infra/pull/2759
- [x] Update node e2e serial configs to install nvidia drivers on COS by default
2017-05-23 10:46:10 -07:00
Anirudh 078f9566d9 PDB MaxUnavailable: kubectl changes 2017-05-23 07:18:44 -07:00
Kubernetes Submit Queue 644a544d62 Merge pull request #46062 from alexandercampbell/correct-deprecation-errors
Automatic merge from submit-queue (batch tested with PRs 46201, 45952, 45427, 46247, 46062)

kubectl: fix deprecation warning bug

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

Some kubectl commands were deprecated but would fail to print the
correct warning message when a flag was given before the command name.

	# Correctly prints the warning that "resize" is deprecated and
	# "scale" is now preferred.
	kubectl resize [...]

	# Should print the same warning but no warning is printed.
	kubectl --v=1 resize [...]

This was due to a fragile check on os.Args[1].

This commit implements a new function deprecatedCmd() that is used to
construct new "passthrough" commands which are marked as deprecated and
hidden.

Note that there is an existing "filters" system that may be preferable
to the system created in this commit. I'm not sure why the "filters"
array was not used for all deprecated commands in the first place.

**Release note**:

```release-note
NONE
```
2017-05-22 20:58:07 -07:00
Kubernetes Submit Queue 31bd852ec1 Merge pull request #46247 from marun/fed-override-etcd-default-image
Automatic merge from submit-queue (batch tested with PRs 46201, 45952, 45427, 46247, 46062)

[Federation][kubefed]: Add support for etcd image override

This PR adds support for overriding the default etcd image used by ``kubefed init`` by providing an argument to ``--etcd-image``.  This is primarily intended to allow consumers like openshift to provide a different default, but as a nice side-effect supports code-free validation of non-default etcd images. 

**Release note**:

```release-note
'kubefed init' now supports overriding the default etcd image name with the --etcd-image parameter.
```
cc: @kubernetes/sig-federation-pr-reviews
2017-05-22 20:58:05 -07:00
Kubernetes Submit Queue c6cf666fa1 Merge pull request #45308 from fabianofranz/more_cmd_sanity_checks
Automatic merge from submit-queue (batch tested with PRs 46022, 46055, 45308, 46209, 43590)

More cli sanity verifications

Adds some more `kubectl` command sanity checks to improve consistency and avoid the need of code reviews for some of our CLI style and standards.

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cli-pr-reviews
2017-05-22 19:59:59 -07:00
Kubernetes Submit Queue bb56937b92 Merge pull request #46055 from deads2k/crd-01-embed
Automatic merge from submit-queue (batch tested with PRs 46022, 46055, 45308, 46209, 43590)

embed kube-apiextensions inside of kube-apiserver

To reduce operation complexity, we decided to include the kube-apiextensions-server inside of kube-apiserver (https://github.com/kubernetes/community/blob/master/sig-api-machinery/api-extensions-position-statement.md#q-should-kube-aggregator-be-a-separate-binaryprocess-than-kube-apiserver).  With the API reasonably well established and a finalizer about merge, I think its time to add ourselves.

This pull wires kube-apiextensions-server ahead of the TPRs so that one will replace the other if both are added by accident (CRDs should have priority) and wires a controller for automatic aggregation.

WIP because I still need tests: unit test for controller, test-cmd test to mirror the TPR test.


```release-note
Adds the `CustomResourceDefinition` (crd) types to the `kube-apiserver`.  These are the successors to `ThirdPartyResource`.  See https://github.com/kubernetes/community/blob/master/contributors/design-proposals/thirdpartyresources.md for more details.
```
2017-05-22 19:59:57 -07:00
Kubernetes Submit Queue 503a8421fb Merge pull request #38990 from mikedanese/go-genrule-sets
Automatic merge from submit-queue (batch tested with PRs 38990, 45781, 46225, 44899, 43663)

migrate set generation to go_genrule

Depends on https://github.com/kubernetes/release/pull/238
2017-05-22 19:06:58 -07:00
Maru Newby 080d1081d0 fed: Add support for etcd image override to kubefed init 2017-05-22 15:16:41 -07:00
CJ Cullen 9dca164ddd Allow the /logs handler on the apiserver to be toggled.
Change-Id: Ibf173b7f85cf7fffe8482eaee74fb77da2b2588b
2017-05-22 14:37:24 -07:00
Alexander Campbell 46cdb3966c test-cmd-util: fix deprecated commands test
Additionally, move the test down to ensure definition order matches run
order.
2017-05-22 13:39:51 -07:00
Alexander Campbell c9c8d61048 Merge branch 'master' into correct-deprecation-errors 2017-05-22 09:55:07 -07:00
deads2k 446e959bf7 make CRD apiservice controller 2017-05-22 08:54:14 -04:00
Cao Shufeng 3aa71aa193 check flag format in file known-flags.txt
All flags in file hack/verify-flags/known-flags.txt should contain
character -, this change check this to prevent adding useless flags
to known-flags.txt
2017-05-22 10:51:04 +08:00
Vishnu kannan 1e77594958 Adding an installer script that installs Nvidia drivers in Container Optimized OS
Packaged the script as a docker container stored in gcr.io/google-containers
A daemonset deployment is included to make it easy to consume the installer
A cluster e2e has been added to test the installation daemonset along with verifying installation
by using a sample CUDA application.
Node e2e for GPUs updated to avoid running on nodes without GPU devices.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-05-20 21:17:19 -07:00
Kubernetes Submit Queue a8bff0ed9a Merge pull request #45836 from mbohlool/openapi_pb
Automatic merge from submit-queue

Add protobuf binary version of OpenAPI spec

Fixes #45833
Partially fixes #42841

```release-note
OpenAPI spec is now available in protobuf binary and gzip format (with ETag support)
```
2017-05-20 11:01:04 -07:00
Kubernetes Submit Queue 8fe818b2a1 Merge pull request #45981 from fabianofranz/kubectl_plugins_v1_part1
Automatic merge from submit-queue (batch tested with PRs 46033, 46122, 46053, 46018, 45981)

Command tree and exported env in kubectl plugins

This is part of `kubectl` plugins V1:
- Adds support to several env vars passing context information to the plugin. Plugins can make use of them to connect to the REST API, access global flags, get the path of the plugin caller (so that `kubectl` can be invoked) and so on. Exported env vars include
  - `KUBECTL_PLUGINS_DESCRIPTOR_*`: the plugin descriptor fields
  - `KUBECTL_PLUGINS_GLOBAL_FLAG_*`: one for each global flag, useful to access namespace, context, etc
  - ~`KUBECTL_PLUGINS_REST_CLIENT_CONFIG_*`: one for most fields in `rest.Config` so that a REST client can be built.~
  - `KUBECTL_PLUGINS_CALLER`: path to `kubectl`
  - `KUBECTL_PLUGINS_CURRENT_NAMESPACE`: namespace in use
- Adds support for plugins as child of other plugins so that a tree of commands can be built (e.g. `kubectl myplugin list`, `kubectl myplugin add`, etc)

**Release note**:

```release-note
Added support to a hierarchy of kubectl plugins (a tree of plugins as children of other plugins).

Added exported env vars to kubectl plugins so that plugin developers have access to global flags, namespace, the plugin descriptor and the full path to the caller binary.
```
@kubernetes/sig-cli-pr-reviews
2017-05-19 23:29:32 -07:00
Kubernetes Submit Queue 83a1a863ad Merge pull request #45564 from whitlockjc/admission-api-group
Automatic merge from submit-queue (batch tested with PRs 45996, 46121, 45707, 46011, 45564)

add "admission" API group

This commit is an initial pass at providing an admission API group.
The API group is required by the webhook admission controller being
developed as part of https://github.com/kubernetes/community/pull/132
and could be used more as that proposal comes to fruition.

**Note:** This PR was created by following the [Adding an API Group](https://github.com/kubernetes/community/blob/master/contributors/devel/adding-an-APIGroup.md) documentation.

cc @smarterclayton
2017-05-19 18:57:38 -07:00
Kubernetes Submit Queue e2a9327999 Merge pull request #45707 from Crazykev/cri-experimental
Automatic merge from submit-queue (batch tested with PRs 45996, 46121, 45707, 46011, 45564)

Remove flag `experimental-cri` in e2e-node test

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



**What this PR does / why we need it**: 
This patch remove deprecated flag in node e2e test script, cause kubelet already remove this. Leave this will make kubelet start failed.

**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**: /cc @feiskyer 

**Release note**:

```release-note
NONE
```
2017-05-19 18:57:34 -07:00
Kubernetes Submit Queue ee9bab1111 Merge pull request #45996 from cblecker/hack-owner
Automatic merge from submit-queue

Add cblecker to hack/ reviewers

**What this PR does / why we need it**:
I've done a number of reviews in this part of the code base, and would like to continue helping out and formally be assigned PRs that change things in hack/

**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-19 16:06:27 -07:00
mbohlool 601570a079 Fix hack/update-federation-openapi-spec.sh flakyness 2017-05-19 15:39:08 -07:00
Fabiano Franz 18cb56bf78 kubectl plugins have access config, global flags and environment 2017-05-19 19:17:43 -03:00
Fabiano Franz da85262f70 Adds support to a tree hierarchy of kubectl plugins 2017-05-19 18:06:15 -03:00
Alexander Campbell 213f3c7e6e Merge branch 'master' into correct-deprecation-errors 2017-05-19 12:58:42 -07:00
Jeremy Whitlock 1b59dd887d add "admission" API group
This commit is an initial pass at providing an admission API group.
The API group is required by the webhook admission controller being
developed as part of https://github.com/kubernetes/community/pull/132
and could be used more as that proposal comes to fruition.
2017-05-19 10:17:37 -06:00
Kubernetes Submit Queue 9a5694b4c4 Merge pull request #45908 from ncdc/kube-proxy-write-config
Automatic merge from submit-queue

kube-proxy: add --write-config-to flag

Add --write-config-to flag to kube-proxy to write the default configuration
values to the specified file location.

@deads2k suggested I create my own scheme for this, so I followed the example he shared with me. The only bit currently still referring to `api.Scheme` is where we create the event broadcaster recorder. In order to use the custom private scheme, I either have to pass it in to `NewProxyServer()`, or I have to make `NewProxyServer()` a member of the `Options` struct. If the former, then I probably need to export `Options.scheme`. Thoughts?

cc @mikedanese @sttts @liggitt @deads2k @smarterclayton @timothysc @kubernetes/sig-network-pr-reviews @kubernetes/sig-api-machinery-pr-reviews 

```release-note
Add --write-config-to flag to kube-proxy to allow users to write the default configuration settings to a file.
```
2017-05-19 09:01:04 -07:00
Alexander Campbell acfdafb1fb Merge branch 'master' into correct-deprecation-errors 2017-05-19 08:55:17 -07:00
Alexander Campbell 2acc5f18b5 test-cmd-util.sh: add test for deprecated commands 2017-05-19 08:55:12 -07:00
Jordan Liggitt 20ccdfbd3b
Fix unbound variable 2017-05-19 00:29:50 -04:00
Kubernetes Submit Queue 5290eece28 Merge pull request #45948 from CaoShuFeng/underscore
Automatic merge from submit-queue (batch tested with PRs 41535, 45985, 45929, 45948, 46056)

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.

**Release note**:

```release-note
NONE
```
2017-05-18 19:58:15 -07:00
Kubernetes Submit Queue a9fbeef694 Merge pull request #45929 from liggitt/node-admission
Automatic merge from submit-queue (batch tested with PRs 41535, 45985, 45929, 45948, 46056)

NodeRestriction admission plugin

Adds an optional `NodeRestriction` admission plugin that limits identifiable kubelets to mutating their own Node object, and Pod objects bound to their node.

This is the admission portion of https://github.com/kubernetes/community/blob/master/contributors/design-proposals/kubelet-authorizer.md and kubernetes/features#279

```release-note
The `NodeRestriction` admission plugin limits the `Node` and `Pod` objects a kubelet can modify. In order to be limited by this admission plugin, kubelets must use credentials in the `system:nodes` group, with a username in the form `system:node:<nodeName>`. Such kubelets will only be allowed to modify their own `Node` API object, and only modify `Pod` API objects that are bound to their node.
```
2017-05-18 19:58:13 -07:00
Kubernetes Submit Queue 8214f7bb29 Merge pull request #45839 from caesarxuchao/client-gen-vendor
Automatic merge from submit-queue

let client-gen understand vendor

This is extracted from #44784, where we move external api types to k8s.io/api. After the move, the types will locate at vendor/k8s.io/api/xxx. However, gengo index the parsed package using the import path, which is stripped of  the vendor/ prefix, so we'll need to strip the vendor/ prefix as necessary in client-gen.

This PR doesn't produce any change to the generated clientset yet since all types are still in the kubernetes repo.
2017-05-18 17:45:35 -07:00
Jordan Liggitt 6fd36792f1
Add NodeRestriction admission plugin 2017-05-18 16:43:42 -04:00
Jordan Liggitt 0c516c3ac2
Add NodeIdentifier interface and default implementation 2017-05-18 16:43:41 -04:00
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