Commit Graph

5041 Commits (6a8f55736ad092a8dbdba34b37df7574bd3371f9)

Author SHA1 Message Date
Kubernetes Submit Queue 03db7eac03 Merge pull request #41023 from deads2k/apiserver-05-config-move
Automatic merge from submit-queue (batch tested with PRs 41023, 41031, 40947)

move admission read logic to apiserver

Promised followup to https://github.com/kubernetes/kubernetes/pull/40943

@sttts @kubernetes/sig-api-machinery-misc
2017-02-07 09:04:38 -08:00
Kubernetes Submit Queue 3f6dd889f3 Merge pull request #40985 from p0lyn0mial/add_shortnames_to_discovery_api
Automatic merge from submit-queue (batch tested with PRs 40980, 40985)

added short names for resources which are exposed during discovery

**What this PR does / why we need it**:
The changes add short names for resources. The short names will be delivered to kubectl during discovery.
2017-02-07 06:21:10 -08:00
deads2k 58992ce8d2 move admission read logic 2017-02-07 07:44:14 -05:00
Kubernetes Submit Queue 3527153426 Merge pull request #40193 from xilabao/add-basic-auth-to-local-cluster
Automatic merge from submit-queue

add basic auth option to apiserver in local cluster

Add this can fix #40192 @liggitt
2017-02-07 01:24:13 -08:00
Madhusudan.C.S 26c0fe32d0 Cleanup federation components and wait for it only once in a test cycle. 2017-02-07 00:48:15 -08:00
Jordan Liggitt 09b5d7279f
install authentication.k8s.io/v1, add tests 2017-02-07 01:44:56 -05:00
xilabao 544e7aaee4 allow to set local kubeconfig and update the prompt 2017-02-07 13:35:41 +08:00
Kubernetes Submit Queue 460f44347c Merge pull request #40709 from liggitt/v1-sar
Automatic merge from submit-queue (batch tested with PRs 40971, 41027, 40709, 40903, 39369)

Promote SubjectAccessReview to v1

We have multiple features that depend on this API:

SubjectAccessReview
- [webhook authorization](https://kubernetes.io/docs/admin/authorization/#webhook-mode)
- [kubelet delegated authorization](https://kubernetes.io/docs/admin/kubelet-authentication-authorization/#kubelet-authorization)
- add-on API server delegated authorization

The API has been in use since 1.3 in beta status (v1beta1) with negligible changes:
- Added a status field for reporting errors evaluating access
- A typo was discovered in the SubjectAccessReviewSpec Groups field name

This PR promotes the existing v1beta1 API to v1, with the only change being the typo fix to the groups field. (fixes https://github.com/kubernetes/kubernetes/issues/32709)

Because the API does not persist data (it is a query/response-style API), there are no data migration concerns.

This positions us to promote the features that depend on this API to stable in 1.7

cc @kubernetes/sig-auth-api-reviews @kubernetes/sig-auth-misc

```release-note
The authorization.k8s.io API group was promoted to v1
```
2017-02-06 20:57:15 -08:00
Kubernetes Submit Queue 4f1489edf0 Merge pull request #41045 from sttts/sttts-client-admin-key-readable
Automatic merge from submit-queue

Make client-admin.key of local-up-cluster.sh readable by kubectl

Follow-up of https://github.com/kubernetes/kubernetes/pull/40922
2017-02-06 15:35:28 -08:00
Kubernetes Submit Queue 1250278bf6 Merge pull request #40922 from berrange/hack-client-cert
Automatic merge from submit-queue

local-up-cluster: fix instructions for set-credentials

After launching the services, local-up-cluster.sh tells the
user how to configure kubectl to access it. The instructions
for 'set-credentials' enable plain password auth, but the
services are configured to mandate client certificate auth.
As a result it is not possible to access the cluster with
the instructions printed.

The use of client certs by default was added in

  commit a1b17db458
  Author: Dr. Stefan Schimanski <sttts@redhat.com>
  Date:   Sat Nov 12 23:09:04 2016 +0100

    Configure client certs in local-cluster-up.sh

and the instructions were correctly updated to refer to
client certificates.

The changed instructions were (mistakenly) reverted though
when the following commit was merged:

  commit 72e0e91b5e
  Author: xilabao <chenr.fnst@cn.fujitsu.com>
  Date:   Fri Dec 2 11:04:25 2016 +0800

    change prompt for enabling RBAC on local-up-cluster

Fixes: #40192

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-02-06 15:35:17 -08:00
Jordan Liggitt 8706bc9617
install authorization.k8s.io/v1, add tests
Use specific v1beta1 Authorization client

Add client expansions
2017-02-06 18:16:51 -05:00
p0lyn0mial b2cce0ac8e added short names for resources which are exposed during discovery 2017-02-06 23:35:07 +01:00
Dr. Stefan Schimanski 15cec37e7b Make client-admin.key of local-up-cluster.sh readable by kubectl 2017-02-06 23:07:06 +01:00
deads2k dc30d1750e scrub aggregator names to eliminate discovery 2017-02-06 15:05:49 -05:00
deads2k 75841dc4f1 switch admission serialized config to an apiserver type 2017-02-06 11:38:08 -05:00
Daniel P. Berrange 4ed13ec484 local-up-cluster: fix instructions for set-credentials
After launching the services, local-up-cluster.sh tells the
user how to configure kubectl to access it. The instructions
for 'set-credentials' enable plain password auth, but the
services are configured to mandate client certificate auth.
As a result it is not possible to access the cluster with
the instructions printed.

The use of client certs by default was added in

  commit a1b17db458
  Author: Dr. Stefan Schimanski <sttts@redhat.com>
  Date:   Sat Nov 12 23:09:04 2016 +0100

    Configure client certs in local-cluster-up.sh

and the instructions were correctly updated to refer to
client certificates.

The changed instructions were (mistakenly) reverted though
when the following commit was merged:

  commit 72e0e91b5e
  Author: xilabao <chenr.fnst@cn.fujitsu.com>
  Date:   Fri Dec 2 11:04:25 2016 +0800

    change prompt for enabling RBAC on local-up-cluster

Fixes: #40192

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-02-06 09:55:41 +00:00
Irfan Ur Rehman 98fb5c0e22 [Federation] Add override flags options to kubefed init 2017-02-06 15:24:28 +05:30
Kubernetes Submit Queue 1df1ad9d34 Merge pull request #40981 from k82cn/local_cluster_check
Automatic merge from submit-queue

Using API_HOST_IP to do apiserver health check.

In `hack/local-up-cluster.sh`, it's better to use `API_HOST_IP` to do apiserver health check.
2017-02-05 17:30:13 -08:00
Kubernetes Submit Queue 419d38a965 Merge pull request #40516 from shashidharatd/kubefed-1
Automatic merge from submit-queue

[Federation][kubefed] Add option to expose federation apiserver on nodeport service

**What this PR does / why we need it**:
This PR adds an option to kubefed to expose federation api server over nodeport. This can be useful to deploy federation in non-cloud environments. This PR is target to address #39271

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

```
[Federation] kubefed init learned a new flag, `--api-server-service-type`, that allows service type to be specified for the federation API server.
[Federation] kubefed init also learned a new flag, `--api-server-advertise-address`, that allows specifying advertise address for federation API server in case the service type is NodePort.
```

@kubernetes/sig-federation-misc @madhusudancs
2017-02-05 12:48:33 -08:00
Klaus Ma 00960b4d71 Using API_HOST_IP to do apiserver health check. 2017-02-06 04:22:20 +08:00
Kubernetes Submit Queue b9bb440bd6 Merge pull request #40031 from ethernetdan/test_owner_sig
Automatic merge from submit-queue

Add SIG to test owners

**What this PR does / why we need it**:
This PR adds a `sig` column to the test owners file generation script.

A problem experienced with the current owners file is that since members are auto-assigned there are times where tests are assigned to non-active users who don't follow up to notifications to fix flakes. By assigning a SIG to each test we can hold a group we know is active responsible for taking care of flakes it's less likely that flakes will fall through the cracks.

**Special notes for your reviewer**:
* A companion PR will go into *kubernetes/contrib* adding support for mungers parsing this new column.
   * Another PR in contrib will add labeling GitHub flake issues with the appropriate SIG
* Currently SIGs are not labeled, this will be added in another PR where SIG determinations can be discussed

@saad-ali @pwittrock
2017-02-04 18:43:05 -08:00
Kubernetes Submit Queue a777a8e3ba Merge pull request #39972 from derekwaynecarr/pod-cgroups-default
Automatic merge from submit-queue (batch tested with PRs 40289, 40877, 40879, 39972, 40942)

Rename experimental-cgroups-per-pod flag

**What this PR does / why we need it**:
1. Rename `experimental-cgroups-per-qos` to `cgroups-per-qos`
1. Update hack/local-up-cluster to match `CGROUP_DRIVER` with docker runtime if used.

**Special notes for your reviewer**:
We plan to roll this feature out in the upcoming release.  Previous node e2e runs were running with this feature on by default.  We will default this feature on for all e2es next week.

**Release note**:
```release-note
Rename --experiemental-cgroups-per-qos to --cgroups-per-qos
```
2017-02-04 04:43:08 -08:00
Kubernetes Submit Queue a6e64246f6 Merge pull request #40902 from MHBauer/print-apiserver-log-location
Automatic merge from submit-queue (batch tested with PRs 40906, 40924, 40938, 40902, 40911)

print apiserver log location on apiserver error

**What this PR does / why we need it**:
Improve user experience. Attempt to direct user to logs of failing component.

**Special notes for your reviewer**:
In addition to failure, point to logs so that a user can attempt to self remedy and have more information available to debug immediately. A user may not know that the failing component has logs.

**Release note**:

```release-note
NONE
```
2017-02-04 03:49:54 -08:00
Kubernetes Submit Queue c78745edee Merge pull request #40374 from fejta/e2e
Automatic merge from submit-queue (batch tested with PRs 40696, 39914, 40374)

Convert hack/e2e.go to a test-infra/kubetest shim

Replaces `hack/e2e.go` for a shim that passes the args to `k8s.io/test-infra/kubetest`
Adds fejta to `hack/OWNERS`
Adds `e2e_test.go` for unit test coverage of the shim.

`Usage: go run hack/e2e.go [--get=true] [--old=1d] -- KUBETEST_ARGS`
In other words there is are `--get` and `--old` shim flags, which control how we upgrade `kubetest`, and a `--` to separate the shim args from the kubetest args, and the existing kubetest args like `--down` `--up`, etc. If only `KUBETEST_ARGS` are used then you can skip the `--` (although golang will complain about it).

Once this is ready to go I will update the kubekins-e2e image to copy this file from test-infra: https://github.com/kubernetes/test-infra/blob/master/jenkins/e2e-image/Dockerfile#L70

ref https://github.com/kubernetes/test-infra/issues/1475
2017-02-03 15:05:57 -08:00
Derek Carr 75fa285a56 Make hack/local-up-cluster default to right cgroup driver 2017-02-03 17:28:23 -05:00
Derek Carr d5aa35e330 Add generated artifacts 2017-02-03 17:19:53 -05:00
Dan Gillespie f79a2c57d9 updated test owner generation script to add sig column 2017-02-03 12:41:47 -08:00
shashidharatd 03928dfc45 Add option to expose federation apiserver on nodeport service 2017-02-03 22:18:50 +05:30
Kubernetes Submit Queue 49de5f50e5 Merge pull request #40862 from shashidharatd/kubefed-3
Automatic merge from submit-queue (batch tested with PRs 40862, 40909)

[Federation][kubefed] Add option to disable persistence storage for etcd

**What this PR does / why we need it**:
This is part of updates to enable deployment of federation on non-cloud environments. This pr enables disabling persistent storage for etcd via kubefed.

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

**Special notes for your reviewer**:

**Release note**:
```
[Federation] Add --etcd-persistent-storage flag to kubefed to enable/disable persistent storage for etcd
```
cc: @kubernetes/sig-federation-bugs @madhusudancs
2017-02-03 06:48:45 -08:00
Dr. Stefan Schimanski 6af3210d6f Update generated files 2017-02-03 08:15:46 +01:00
Kubernetes Submit Queue 99def0d9f9 Merge pull request #40666 from ymqytw/support_generic_merge_patch
Automatic merge from submit-queue (batch tested with PRs 40864, 40666, 38382, 40874)

apply falls back to generic JSON patch computation if no go struct is registered for the target GVK

This PR is the master version of #40096 which is target 1.4 branch.
This PR is based on #40260 

- [x] ensure subkey deletion works in CreateThreeWayJSONMergePatch
- [x] ensure type stomping works in CreateThreeWayJSONMergePatch
- [x] lots of tests for generic json patch computation
- [x] apply falls back to generic 3-way JSON merge patch if no go struct is registered for the target GVK
  - [x] prevent generic apply patch computation between different apiVersions and/or kinds
  - [x] make pruner generic (apply --prune works with TPR)

```release-note
apply falls back to generic 3-way JSON merge patch if no go struct is registered for the target GVK
```
2017-02-02 21:04:49 -08:00
shashidharatd b943c9c2dd Add option to disable persistence storage for etcd 2017-02-03 10:11:51 +05:30
Kubernetes Submit Queue 52d31b99dc Merge pull request #40875 from mikedanese/bzl-verify-fix
Automatic merge from submit-queue (batch tested with PRs 40884, 40809, 40845, 40866, 40875)

update repo local config to allow redirects from gopkg.in

closes #39583
2017-02-02 18:53:53 -08:00
Erick Fejta 2fffe48eb1 Convert hack/e2e.go to a test-infra/kubetest shim 2017-02-02 17:42:46 -08:00
Morgan Bauer 21d976868f
print apiserver log location on apiserver error 2017-02-03 01:35:08 +00:00
ymqytw 710d904998 add apply cmd tests for TPR 2017-02-02 15:20:45 -08:00
Kubernetes Submit Queue 9805b0bdfb Merge pull request #40729 from sttts/sttts-client-go-examples
Automatic merge from submit-queue (batch tested with PRs 40812, 39903, 40525, 40729)

Add CI coverage for client-go and staging/copy.sh

Client-go master and `staging/copy.sh` keep breaking, leading to frustration of users outside of the inner refactoring circle. This PR adds minimal smoke testing for both.

**Note**: this enforces the split of PRs which change apimachinery and client-go in parallel (via some local "temporary commit" hacking).

- [x] @caesarxuchao ~~do we have to delete the example directory from the upstream repo?~~ merge https://github.com/kubernetes/test-infra/issues/1765
2017-02-02 13:57:50 -08:00
Kubernetes Submit Queue 8a8f6ca849 Merge pull request #40525 from lucab/to-k8s/node-e2e-local-cri
Automatic merge from submit-queue (batch tested with PRs 40812, 39903, 40525, 40729)

test/node_e2e: wire-in cri-enabled local testing

This commit wires-in the pre-existing `--container-runtime` flag for
local node_e2e testing.
This is needed in order to further skip docker specific testing
and validation.

Local CRI node_e2e can now be performed via
`make test-e2e-node RUNTIME=remote REMOTE=false`
which will also take care of passing the appropriate argument to
the kubelet.
2017-02-02 13:57:48 -08:00
Dr. Stefan Schimanski 946af578fc Update generated files 2017-02-02 20:28:45 +01:00
Dr. Stefan Schimanski 812e52019c client-go: add staging/copy.sh testing 2017-02-02 20:28:33 +01:00
Dr. Stefan Schimanski 880cbd5d7b client-go: enable smoke compile test for examples 2017-02-02 20:28:32 +01:00
Mike Danese 04a7880b61 update repo local config to allow redirects from gopkg.in 2017-02-02 10:20:17 -08:00
Minhan Xia 51526d3103 Add checkpointHandler to DockerService 2017-02-02 10:19:34 -08:00
Piotr Szczesniak a35ad8f6ba Removed HPA objects from extensions api group 2017-02-02 14:09:54 +01:00
Dr. Stefan Schimanski ad3dc2584f Update generated files 2017-02-02 06:58:58 +01:00
Luca Bruno 42bdbe5c82
test/node_e2e: wire-in "container-runtime" for local tests
This commit wires-in the pre-existing `--container-runtime` flag for
local node_e2e testing.
This is needed in order to further skip docker specific testing
and validation.

Local CRI node_e2e can now be performed via
`make test-e2e-node RUNTIME=remote REMOTE=false`
which will also take care of passing the appropriate arguments to
the kubelet.
2017-02-01 20:34:51 +00:00
deads2k 9597cb150d move swagger route to apiserver 2017-02-01 15:18:32 -05:00
Kubernetes Submit Queue 96cfe7b938 Merge pull request #36734 from YuPengZTE/devPunctuation
Automatic merge from submit-queue

error strings should not end with punctuation

**What this PR does / why we need it**:
Delete the end punctuation of error strings
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
https://github.com/golang/go/wiki/CodeReviewComments#error-strings
**Release note**:

```release-note
```

Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2017-02-01 02:55:48 -08:00
Kubernetes Submit Queue 9807cd7d06 Merge pull request #40630 from liggitt/apply-null
Automatic merge from submit-queue (batch tested with PRs 40529, 40630)

propagate explicit nulls in apply

Rebase of https://github.com/kubernetes/kubernetes/pull/35496 on top of https://github.com/kubernetes/kubernetes/pull/40260

The client-side propagation of the raw value is no longer needed, since the client is preserving the original object in unstructured form (explicit nulls are preserved).

Kept tests and CreateThreeWayMergePatch changes from https://github.com/kubernetes/kubernetes/pull/35496

```release-note
kubectl apply now supports explicitly clearing values not present in the config by setting them to null
```

- [x] Clean up orphaned objects in test-cmd to preserve pre- and post- conditions
- [x] improve CreateThreeWayMergePatch test to not filter based on string comparison to test name
2017-02-01 00:16:39 -08:00
deads2k 1ef5d26079 move pkg/storage to apiserver 2017-01-31 19:07:33 -05:00
Kubernetes Submit Queue e5d647988e Merge pull request #39049 from ixdy/node-e2e-ssh-key
Automatic merge from submit-queue

Add flag to node e2e test specifying location of ssh privkey

**What this PR does / why we need it**: in CI, the ssh private key is not always located at `$HOME/.ssh`, so it's helpful to be able to override it.

@krzyzacy here's my resurrected change. I'm not sure why I neglected to follow-through on it originally.

**Release note**:

```release-note
NONE
```
2017-01-31 13:40:26 -08:00
Jordan Liggitt cf74abd892
fixup apply null tests 2017-01-31 15:00:23 -05:00
Anastasis Andronidis 4bdcc03c0b
test for explicit null value propagation in apply 2017-01-31 14:22:24 -05:00
Kubernetes Submit Queue 16164c6a54 Merge pull request #40711 from spxtr/owner
Automatic merge from submit-queue

Remove spxtr from several owners files, add rmmh as test reviewer.

**Release note**:
```release-note
NONE
```
2017-01-31 05:03:53 -08:00
Kubernetes Submit Queue 25de8ef641 Merge pull request #40551 from juanvallejo/jvallejo/only-output-no-resources-found-for-human-readable-printer
Automatic merge from submit-queue (batch tested with PRs 40691, 40551, 40683, 40700, 40702)

only output "No resources found." for human readable printers

**Release note**:
```release-note
release note none
```

This patch removes the message `No resources found` (currently printed through stderr) when printing through a generic / non-human-readable printer (json, yaml, jsonpath, custom-columns).

**Before***
```
$ kubectl get pods -o json
No resources found.
{
    "apiVersion": "v1",
    "items": [],
    "kind": "List",
    "metadata": {},
    "resourceVersion": "",
    "selfLink": ""
}
```

**After**
```
$ kubectl get pods -o json
{
    "apiVersion": "v1",
    "items": [],
    "kind": "List",
    "metadata": {},
    "resourceVersion": "",
    "selfLink": ""
}
```

cc @fabianofranz @stevekuznetsov
2017-01-30 19:14:41 -08:00
Kubernetes Submit Queue 2975475e35 Merge pull request #40659 from sttts/sttts-print-staging-import-cycles
Automatic merge from submit-queue (batch tested with PRs 40703, 40093, 40618, 40659, 39810)

hack/verify-staging-imports.sh: print actual dependencies

Example:

```shell
$ hack/verify-staging-imports.sh
apiserver has a forbidden dependency:

  k8s.io/apiserver/pkg/admission imports k8s.io/apimachinery/pkg/api/errors
  k8s.io/apiserver/pkg/admission imports k8s.io/apimachinery/pkg/api/meta
  k8s.io/apiserver/pkg/admission imports k8s.io/apimachinery/pkg/runtime
  k8s.io/apiserver/pkg/admission imports k8s.io/apimachinery/pkg/runtime/schema
  k8s.io/apiserver/pkg/admission imports k8s.io/apimachinery/pkg/util/errors
  k8s.io/apiserver/pkg/admission imports k8s.io/apimachinery/pkg/util/sets
```
2017-01-30 17:14:55 -08:00
Joe Finney 3ec286adda Remove spxtr from several owners files, add rmmh as test reviewer. 2017-01-30 13:45:21 -08:00
deads2k c9a008dff3 move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
deads2k c9e650b64d add deads2k to hack owners 2017-01-30 11:29:07 -05:00
Dr. Stefan Schimanski 22e9db0490 hack/verify-staging-imports.sh: print forbidden dependencies 2017-01-30 17:26:19 +01:00
deads2k 2c1c0f3f72 move workqueue to client-go 2017-01-30 09:08:21 -05:00
Kubernetes Submit Queue 2cb17cc677 Merge pull request #40426 from sttts/sttts-more-cutoffs-3
Automatic merge from submit-queue

genericapiserver: cut off more dependencies – episode 3

Compare commit subjects.

This is the first step to get `apiserver_test.go` and `watch_test.go` in `pkg/genericapiserver/endpoints` cutoff from k8s.io/kubernetes dependencies.

After this we have to sync client-go and then "episode 4" can go in.

approved based on #40363
2017-01-30 05:57:49 -08:00
Kubernetes Submit Queue da60dc20b0 Merge pull request #39832 from david-mcmahon/gendocs
Automatic merge from submit-queue (batch tested with PRs 39832, 40660)

Complete *-munge-docs.sh deprecation.

**What this PR does / why we need it**:\
Complete *-munge-docs.sh deprecation.
TOC generation now handled by https://github.com/kubernetes/release/pull/247

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

**Special notes for your reviewer**:

cc @bgrant0607 @thockin
2017-01-30 01:32:15 -08:00
Kubernetes Submit Queue 2623f7c456 Merge pull request #40549 from jessfraz/40433-reenable-cascading-deployment
Automatic merge from submit-queue

re-enable cascading deployment

I couldn't reproduce #40433 locally sooo trying on the test infra to make sure I'm not crazy
2017-01-29 23:51:27 -08:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Kubernetes Submit Queue 3897fc00db Merge pull request #38926 from luxas/update_cross_go18
Automatic merge from submit-queue

Improve the multiarch situation; armel => armhf; reenable pcc64le; remove the patched golang

**What this PR does / why we need it**: 
 - Improves the multiarch situation as described in #38067 
 - Tries to bump to go1.8 for arm (and later enable ppc64le)
 - GOARM 6 => GOARM 7
 - Remove the golang 1.7 patch
 - armel => armhf
 - Bump QEMU version to v2.7.0

**Release note**:

```release-note
Improve the ARM builds and make hyperkube on ARM working again by upgrading the Go version for ARM to go1.8beta2
```

@kubernetes/sig-testing-misc @jessfraz @ixdy @jbeda @david-mcmahon @pwittrock
2017-01-28 03:51:19 -08:00
Kubernetes Submit Queue 5fc6e2d704 Merge pull request #40602 from deads2k/unit-test-with-go
Automatic merge from submit-queue

run unit tests with go, not just bazel

Follow up to https://github.com/kubernetes/kubernetes/pull/40594, effectively reverts #39105.

I think we should run our unit tests using the official golang infrastructure.  I have no objection to also running them in bazel (or running a subset in bazel), but I don't think that bazel should be the primary unit test method.

@smarterclayton @liggitt @ixdy @spxtr
2017-01-27 14:33:44 -08:00
Lucas Käldström 6789d4e637
Workaround that we have two GOROOTs; we have to set the path for the go executable to EDGE_GOROOT/bin/go when using the edge version 2017-01-27 20:31:17 +02:00
juanvallejo 5ec2a4c3ca only output "No resources found." for human readable printers 2017-01-27 13:30:23 -05:00
Lucas Käldström 04bc44acf9
Remove the patched golang from the kube-cross image and upgrade to go1.8rc1 for arm and ppc64le instead. Reenable the ppc64le builds 2017-01-27 20:03:37 +02:00
Kubernetes Submit Queue 312c44da2e Merge pull request #40542 from deads2k/generic-29-simple
Automatic merge from submit-queue

move packages to apimachinery and apiserver

more no-dep dependencies.

@sttts see commit names

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-27 09:26:35 -08:00
Kubernetes Submit Queue d718e40594 Merge pull request #40567 from nikhiljindal/secretDel
Automatic merge from submit-queue

Temporary disable federation kubectl tests for secrets to unblock merge queue

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

cc @kubernetes/sig-federation-misc @deads2k
2017-01-27 08:34:50 -08:00
deads2k ec6a6f6265 run unit tests with go, not just bazel 2017-01-27 10:00:01 -05:00
Wojciech Tyczynski abed746172 Merge pull request #40594 from deads2k/restore-testing
Restore unit testing for staging repos
2017-01-27 15:55:35 +01:00
deads2k 9775269fb9 move genericapiserver/server/filters to apiserver 2017-01-27 08:49:30 -05:00
Kubernetes Submit Queue 1625150de8 Merge pull request #40260 from liggitt/kubectl-tpr
Automatic merge from submit-queue (batch tested with PRs 39223, 40260, 40082, 40389)

make kubectl generic commands work with unstructured objects

part of making apply, edit, label, annotate, and patch work with third party resources

fixes #35149
fixes #34413

prereq of:
https://github.com/kubernetes/kubernetes/issues/35496
https://github.com/kubernetes/kubernetes/pull/40096

related to:
https://github.com/kubernetes/kubernetes/issues/39906
https://github.com/kubernetes/kubernetes/issues/40119

kubectl is currently decoding any resource it doesn't have compiled-in to a ThirdPartyResourceData struct, which means it computes patches using that struct, and would try to send a ThirdPartyResourceData object to the API server when running `apply`

This PR removes the behavior that decodes unknown objects into ThirdPartyResourceData structs internally, and fixes up the following generic commands to work with unstructured objects

- [x] apply
  - [x] decode into runtime.Unstructured objects
  - [x] successfully use `--record` with unregistered objects 
- [x] patch
  - [x] decode into runtime.Unstructured objects
  - [x] successfully use `--record` with unregistered objects 
- [x] describe
  - [x] decode into runtime.Unstructured objects
  - [x] implement generic describer
- [x] fix other generic kubectl commands to work with unstructured objects
  - [x] label
  - [x] annotate

follow-ups for pre-existing issues:
- [ ] `explain` doesn't work with unregistered resources
- [ ] remove special casing of federation group in clientset lookups, etc
- [ ] `patch`
  - [ ] doesn't honor output formats when persisting to server (`kubectl patch -f svc.json --type merge -p '{}' -o json` doesn't output json)
  - [ ] --local throws exception (`kubectl patch -f svc.json --type merge -p '{}' --local`)
- [ ] `apply`
  - [ ] fall back to generic JSON patch computation if no go struct is registered for the target GVK (e.g. https://github.com/kubernetes/kubernetes/pull/40096)
  - [ ] ensure subkey deletion works in CreateThreeWayJSONMergePatch
  - [ ] ensure type stomping works in CreateThreeWayJSONMergePatch
  - [ ] lots of tests for generic json patch computation
  - [ ] prevent generic apply patch computation among different versions
  - [ ] reconcile treatment of nulls with https://github.com/kubernetes/kubernetes/pull/35496
- [ ] `edit`
  - [ ] decode into runtime.Unstructured objects
  - [ ] fall back to generic JSON patch computation if no go struct is registered for the target GVK
2017-01-27 05:41:45 -08:00
deads2k a7c325f7ad restore unit testing for the staging repos 2017-01-27 08:18:19 -05:00
Kubernetes Submit Queue 3f54d093ca Merge pull request #38777 from alejandroEsc/ae/osx_cadvisor
Automatic merge from submit-queue (batch tested with PRs 40126, 40565, 38777, 40564, 40572)

Print warning about kubelet not running on darwin via local-up-cluster.sh

**What this PR does / why we need it**: As of the time of opening this PR, near the release of v.1.5, using `./hack/local-up-cluster.sh` claims to succeed and run kubelet, but logs, processes, and attempts to hit the service demonstrate that kubelet is NOT running. The issue has been found to be the hard requirements of cadvisor forcing kubelet to force exit when it is found to be unsupported as in the case of DARWIN.  

My goal here is to bring the issue to attention to others and also help other devs avoid the issue.

**Release note**:
```NONE```

kubelet.go and kubelet's server.go file has minimal logic that keeps kubelet from breaking just because osx has not cadvisor support.
2017-01-27 01:34:19 -08:00
Jordan Liggitt 17168aaacc
Test generic operations with thirdpartyresources 2017-01-26 19:59:27 -05:00
nikhiljindal f4d4b2c578 Temporary disable federation kubectl tests for secrets to unblock merge queue 2017-01-26 15:43:56 -08:00
Kubernetes Submit Queue aace5a7b87 Merge pull request #40449 from deads2k/client-15-types
Automatic merge from submit-queue (batch tested with PRs 40239, 40397, 40449, 40448, 40360)

move the discovery and dynamic clients

Moved the dynamic client, discovery client, testing/core, and testing/cache to `client-go`.  Dependencies on api groups we don't have generated clients for have dropped out, so federation, kubeadm, and imagepolicy.

@caesarxuchao @sttts 

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-26 14:23:42 -08:00
Kubernetes Submit Queue cfafc575dd Merge pull request #40397 from yujuhong/protoc_settings
Automatic merge from submit-queue (batch tested with PRs 40239, 40397, 40449, 40448, 40360)

CRI: use more gogoprotobuf plugins

Generate marshaler/unmarshaler code should help improve the performance.

This addresses #40098
2017-01-26 14:23:39 -08:00
Alejandro Escobar f79094e8a2 added warning message error about not running kubelet if not darwin/linux to my check 2017-01-26 13:11:27 -08:00
Alejandro Escobar 9ccade5939 added warning message to display when host_os is found to be darwin since kubelet is not supported in that case. 2017-01-26 13:03:49 -08:00
Jess Frazelle 00cdc06103
re-enable cascading deployment
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-26 12:51:11 -08:00
deads2k 9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
Andy Lindeman 79d283896d
Match etcd process name exactly
A process named, e.g., etcd-operator, should not match
2017-01-25 22:52:37 -05:00
Kubernetes Submit Queue 75c6990966 Merge pull request #39462 from Shawyeok/master
Automatic merge from submit-queue

Able to quick create a HA cluster by kube-up.sh centos provider

Make `kube-up.sh` `centos provider` support quick create a HA cluster, as I said above [#39430](https://github.com/kubernetes/kubernetes/issues/39430), it's more flexible than `kops` or `kubeadm` for some people in a limited network region.

I'm new to k8s dev, so if this pull request need to change, please let me know.

```release-note
Added support for creating HA clusters for centos using kube-up.sh.
```
2017-01-25 16:40:57 -08:00
Yu-Ju Hong 760d8e98e8 CRI: use more gogoprotobuf plugins
This includes generating marshaler/unmarshaler code to improve
performance.
2017-01-25 13:52:24 -08:00
Jordan Liggitt 5676b9a252
Temporarily disable cascading deployment delete in test-cmd-util.sh
Re-enabling tracked in https://github.com/kubernetes/kubernetes/issues/40433
2017-01-25 13:34:16 -05:00
Jordan Liggitt 903787ab2c
Tolerate existing kubernetes service in test-cmd.sh 2017-01-25 13:34:16 -05:00
Jordan Liggitt a7f52b276f
Add test shell stack traces 2017-01-25 13:34:16 -05:00
Jordan Liggitt d47f898500
Re-enable test-cmd.sh tests 2017-01-25 13:34:16 -05:00
Kubernetes Submit Queue 90b5d4cbd8 Merge pull request #40421 from liggitt/revert-configmapedit
Automatic merge from submit-queue (batch tested with PRs 38905, 40421)

Revert "Add the ability to edit fields within a config map."

Fixes #40396 
This reverts commit 31eca372c9.

#38445 broke edit for all resources other than configmaps:
```
$ kubectl edit serviceaccount default
Error from server (NotFound): configmaps "serviceaccount" not found
```
also, `edit` is a generic command, we can't add subcommands that claim the `configmap` space and mess with the things resourcebuilder accepts
2017-01-25 09:49:49 -08:00
shawyeok 78170bf113 kube-up.sh centos provider support create a HA cluster
Fix: cannot get default master advertise address correctly

Set default value of NUM_MASTERS and NUM_NODES by MASTERS and NODES themself

Code cleanup and documented

Using runtime reconfiguration for etcd cluster instead of etcd discovery

Add exceptions for verify-flags
2017-01-25 22:53:27 +08:00
Jordan Liggitt 83e06d9fd1
Revert "Add the ability to edit fields within a config map."
This reverts commit 31eca372c9.
2017-01-25 09:12:32 -05:00
deads2k 3eeecb0848 preserve client tests that can't move to client-go 2017-01-25 08:29:48 -05:00
Kubernetes Submit Queue e3ba25714f Merge pull request #40324 from chuckbutler/upstream-rebase-forreal
Automatic merge from submit-queue (batch tested with PRs 40335, 40320, 40324, 39103, 40315)

Splitting master/node services into separate charm layers

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

This branch includes a roll-up series of commits from a fork of the
Kubernetes repository pre 1.5 release because we didn't make the code freeze.
This additional effort has been fully tested and has results submit into
the gubernator to enhance confidence in this code quality vs. the single
layer, posing as both master/node.

To reference the gubernator results, please see:
https://k8s-gubernator.appspot.com/builds/canonical-kubernetes-tests/logs/kubernetes-gce-e2e-node/

Apologies in advance for the large commit however, we did not want to
submit without having successful upstream automated testing results.

This commit includes:

 - Support for CNI networking plugins
 - Support for durable storage provided by Ceph
 - Building from upstream templates (read: kubedns - no more template
 drift!)
 - An e2e charm-layer to make running validation tests much simpler/repeatable
 - Changes to support the 1.5.x series of Kubernetes



**Special notes for your reviewer**:

Additional note: We will be targeting -all- future work against upstream
so large pull requests of this magnitude will not occur again.

**Release note**:




```release-note
- Splits Juju Charm layers into master/worker roles
- Adds support for 1.5.x series of Kubernetes
- Introduces a tactic for keeping templates in sync with upstream eliminating template drift
- Adds CNI support to the Juju Charms
- Adds durable storage support to the Juju Charms
- Introduces an e2e Charm layer for repeatable testing efforts and validation of clusters

```
2017-01-24 17:30:06 -08:00
Kubernetes Submit Queue 6262710480 Merge pull request #40333 from ixdy/bazel-release-tars-version-file
Automatic merge from submit-queue (batch tested with PRs 39260, 40216, 40213, 40325, 40333)

bazel: save git version in kubernetes.tar.gz

**What this PR does / why we need it**: adds a workspace status command for bazel (inspired by #36128) and then uses the saved values to generate the `version` file in `kubernetes.tar.gz`. We need this for `get-kube.sh` to work properly.

**Special notes for your reviewer**: I had to change a few things from #36128 - see comments for explanation.

**Release note**:

```release-note
NONE
```
2017-01-24 16:26:05 -08:00
Dr. Stefan Schimanski 2b8e938128 Update generated files 2017-01-24 20:56:03 +01:00
Eric Paris cc4a357664 Fix undefined KEEP_TMP in verify-godeps.sh 2017-01-24 14:45:20 -05:00
Kubernetes Submit Queue 6748c009ec Merge pull request #39884 from eparis/verify-godeps-hack
Automatic merge from submit-queue

Make verify-godeps.sh easier to debug

This does 3 things:
    
1. env var to retain the /tmp/godep
2. env var to use a specified /tmp/godep
3. rework of preload-dep to support more non-github things, like go4.org
2017-01-24 09:58:18 -08:00
Matt Bruzek 3fcf279cfb Splitting master/node services into separate charm layers
This branch includes a rollup series of commits from a fork of the
kubernetes repository pre 1.5 release because we didn't make the code freeze.
This additional effort has been fully tested and has results submit into
the gubernator to enhance confidence in this code quality vs. the single
layer, posing as both master/node.

To reference the gubernator results, please see:
https://k8s-gubernator.appspot.com/builds/canonical-kubernetes-tests/logs/kubernetes-gce-e2e-node/

Apologies in advance for the large commit, however we did not want to
submit without having successful upstream automated testing results.

This commit includes:

 - Support for CNI networking plugins
 - Support for durable storage provided by ceph
 - Building from upstream templates (read: kubedns - no more template
 drift!)
 - An e2e charm-layer to make running validation tests much simpler/repeatable
 - Changes to support the 1.5.x series of kubernetes

Additional note: We will be targeting -all- future work against upstream
so large pull requests of this magnitude will not occur again.
2017-01-24 09:42:25 -06:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Dr. Stefan Schimanski 81461f7214 hack/verify-golint: enforce cleanup of old packages 2017-01-24 08:34:06 +01:00
Dr. Stefan Schimanski d0eb7f88a6 Reset hack/.linted_packages 2017-01-24 08:34:06 +01:00
Dr. Stefan Schimanski 8f85e11e6a hack/verify-golint.sh: add authorative staging packages 2017-01-24 08:32:19 +01:00
Kubernetes Submit Queue 43286a82c6 Merge pull request #39981 from fraenkel/optional_configmaps_secrets
Automatic merge from submit-queue

Optional configmaps and secrets

Allow configmaps and secrets for environment variables and volume sources to be optional

Implements approved proposal c9f881b7bb

Release note:
```release-note
Volumes and environment variables populated from ConfigMap and Secret objects can now tolerate the named source object or specific keys being missing, by adding `optional: true` to the volume or environment variable source specifications.
```
2017-01-23 23:06:35 -08:00
Kubernetes Submit Queue f545d6ad47 Merge pull request #40057 from MrHohn/kubectl-create-seletor
Automatic merge from submit-queue (batch tested with PRs 40328, 40057)

Allows kubectl create -f to filter by selector.

From #32544.

The underlying `seletor` infrastructrue was implemented by #32599. The test is basically copy-paste of the corresponding test for `kubectl apply -f -l`.

```release-note
kubectl create now accepts the label selector flag for filtering objects to create
```
2017-01-23 22:19:11 -08:00
Michael Fraenkel ca207be4a3 Generated code 2017-01-23 20:12:24 -07:00
Jeff Grafton 2f529bd3bf bazel: save git version in kubernetes.tar.gz 2017-01-23 17:28:08 -08:00
Clayton Coleman 9009c1ac14
generated: informer,client 2017-01-23 17:52:47 -05:00
Clayton Coleman 2bb2604f0b
Limit the size of the termination log and allow log input
Enforce the following limits:

12kb for total message length in container status
4kb for the termination message path file
2kb or 80 lines (whichever is shorter) from the log on error

Fallback to log output if the user requests it.
2017-01-23 12:26:38 -05:00
Kubernetes Submit Queue 1f1f3692bd Merge pull request #38445 from brendandburns/configmap2
Automatic merge from submit-queue (batch tested with PRs 38445, 40292)

Add the ability to edit fields within a config map.

Addresses part of https://github.com/kubernetes/kubernetes/issues/36222

Example command:

```console
$ kubectl edit configmap foo --config-map-data=bar
```

Will open the data element named `bar` in the `ConfigMap` named `foo` in `$EDITOR`, the edited contents are then updated back to the config map.

@kubernetes/sig-cli 

```release-note
Add a special purpose tool for editing individual fields in a ConfigMap with kubectl
```
2017-01-23 08:11:06 -08:00
Kubernetes Submit Queue 79c00011a9 Merge pull request #38976 from irfanurrehman/federation-hpa-1
Automatic merge from submit-queue

[Federation] Expose autoscaling apis through federation api server

This PR implements first part of federated pod autoscaler.
The issue to handle the whole feature is https://github.com/kubernetes/kubernetes/issues/38974

cc @kubernetes/sig-cluster-federation
@shashidharatd @kshafiee @deepak-vij

**Release note**:

```
federation users can now use federated autoscaling resources and create federated horizontalpodautoscalers
```
2017-01-23 03:36:35 -08:00
Kubernetes Submit Queue e640521f01 Merge pull request #40204 from luxas/cloudcontrollermanager
Automatic merge from submit-queue (batch tested with PRs 40066, 36250, 40255, 40225, 40204)

Add cloud-controller-manager to the CI/release builds

@thockin @wlan0 @roberthbailey
2017-01-23 02:29:11 -08:00
Irfan Ur Rehman 45bef274b4 [Federation] update client generation script to include autoscaling resources 2017-01-22 12:27:56 +05:30
Lucas Käldström e8ebfa02ff
Add cmd/kubeadm/app/phases/certs to the list of linted packages 2017-01-21 11:15:19 +02:00
Kubernetes Submit Queue 7f9997a456 Merge pull request #40075 from apprenda/kubeadm_self_hosted
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

kubeadm: add optional self-hosted deployment

**What this PR does / why we need it**: add an optional self-hosted deployment type to `kubeadm`, for master components only, namely `apiserver`, `controller-manager` and `scheduler`.

**Which issue this PR fixes**: closes #38407

**Special notes for your reviewer**: /cc @aaronlevy @luxas @dgoodwin

**Release note**:
```release-note
kubeadm: add optional self-hosted deployment for apiserver, controller-manager and scheduler.
```
2017-01-20 12:34:56 -08:00
Kubernetes Submit Queue dcf14add92 Merge pull request #37228 from sjenning/teardown-terminated-volumes
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

kubelet: storage: teardown terminated pod volumes

This is a continuation of the work done in https://github.com/kubernetes/kubernetes/pull/36779

There really is no reason to keep volumes for terminated pods attached on the node.  This PR extends the removal of volumes on the node from memory-backed (the current policy) to all volumes.

@pmorie raised a concern an impact debugging volume related issues if terminated pod volumes are removed.  To address this issue, the PR adds a `--keep-terminated-pod-volumes` flag the kubelet and sets it for `hack/local-up-cluster.sh`.

For consideration in 1.6.

Fixes #35406

@derekwaynecarr @vishh @dashpole

```release-note
kubelet tears down pod volumes on pod termination rather than pod deletion
```
2017-01-20 12:34:52 -08:00
Paulo Pires 724ce6a8a5
kubeadm: add temporary --self-hosted flag. 2017-01-20 17:41:47 +00:00
Seth Jennings e2750a305a reclaim terminated pod volumes 2017-01-20 11:08:35 -06:00
Kubernetes Submit Queue 0e1a166c4d Merge pull request #39158 from feiskyer/cri-proto3
Automatic merge from submit-queue (batch tested with PRs 40168, 40165, 39158, 39966, 40190)

CRI: upgrade protobuf to v3

For #38854, this PR upgrades CRI protobuf version to v3, and also updated related packages for confirming to new api.  

**Release note**:

```
CRI: upgrade protobuf version to v3.
```
2017-01-20 08:28:49 -08:00
Lucas Käldström 23d3451bfe
Add cloud-controller-manager to the CI/release builds 2017-01-20 10:51:36 +02:00
Kubernetes Submit Queue 7751f06a1a Merge pull request #40167 from spxtr/verify-boiler
Automatic merge from submit-queue (batch tested with PRs 39772, 39831, 39481, 40167, 40149)

Add //hack:verify-boilerplate rule.

This pattern is working well in test-infra. I'll add the gofmt and go vet rules next.
2017-01-19 17:56:47 -08:00
Pengfei Ni b962580224 Update flags underscore 2017-01-20 09:56:46 +08:00
Kubernetes Submit Queue 51919b4e1e Merge pull request #39772 from mikedanese/v1beta1
Automatic merge from submit-queue

promote certificates api to beta

Mostly posting to see what breaks but also this API is ready to be promoted.

```release-note
Promote certificates.k8s.io to beta and enable it by default. Users using the alpha certificates API should delete v1alpha1 CSRs from the API before upgrading and recreate them as v1beta1 CSR after upgrading.
```

@kubernetes/api-approvers @jcbsmpsn @pipejakob
2017-01-19 17:48:16 -08:00
Mike Danese 44b7246568 autogenerated 2017-01-19 14:24:45 -08:00
Mike Danese 96c146c8f2 promote certificates.k8s.io to beta 2017-01-19 13:13:20 -08:00
Garrett Rodrigues ad1e5e98c2 Updated top level owners file to match new format 2017-01-19 11:29:16 -08:00
Joe Finney 0690573c30 Add //hack:verify-boilerplate rule. 2017-01-19 11:10:48 -08:00
Eric Paris d4f1742084 Merge pull request #40150 from deads2k/fix-cycle-2
remove go get failing import comment
2017-01-19 13:01:05 -05:00
deads2k 2ac83e31ac remove go get failing import comment 2017-01-19 10:39:07 -05:00
deads2k 11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
Dr. Stefan Schimanski 969bcc79ac Add genericapiserver to linted packages 2017-01-19 13:06:47 +01:00
Dr. Stefan Schimanski 3d9449a353 genericapiserver: fix imports 2017-01-19 13:06:47 +01:00
Kubernetes Submit Queue f90bb1772b Merge pull request #39846 from andrewrynhard/add_authorization_mode
Automatic merge from submit-queue

Add authorization mode to kubeadm

This PR adds an option in `kubeadm` to allow a user to specify an [authorization plugin](https://kubernetes.io/docs/admin/authorization/). It defaults to RBAC.
2017-01-18 22:49:58 -08:00
Kubernetes Submit Queue b29d9cdbcf Merge pull request #39898 from ixdy/bazel-release-tars
Automatic merge from submit-queue

Build release tars using bazel

**What this PR does / why we need it**: builds equivalents of the various kubernetes release tarballs, solely using bazel.

For example, you can now do
```console
$ make bazel-release
$ hack/e2e.go -v -up -test -down
```

**Special notes for your reviewer**: this is currently dependent on 3b29803eb5, which I have yet to turn into a pull request, since I'm still trying to figure out if this is the best approach.

Basically, the issue comes up with the way we generate the various server docker image tarfiles and load them on nodes:
* we `md5sum` the binary being encapsulated (e.g. kube-proxy) and save that to `$binary.docker_tag` in the server tarball
* we then build the docker image and tag using that md5sum (e.g. `gcr.io/google_containers/kube-proxy:$MD5SUM`)
* we `docker save` this image, which embeds the full tag in the `$binary.tar` file.
* on cluster startup, we `docker load` these tarballs, which are loaded with the tag that we'd created at build time. the nodes then use the `$binary.docker_tag` file to find the right image.

With the current bazel `docker_build` rule, the tag isn't saved in the docker image tar, so the node is unable to find the image after `docker load`ing it.

My changes to the rule save the tag in the docker image tar, though I don't know if there are subtle issues with it. (Maybe we want to only tag when `--stamp` is given?)

Also, the docker images produced by bazel have the timestamp set to the unix epoch, which is not great for debugging. Might be another thing to change with a `--stamp`.

Long story short, we probably need to follow up with bazel folks on the best way to solve this problem.

**Release note**:

```release-note
NONE
```
2017-01-18 14:24:48 -08:00
Andrew Rynhard f46bf42ba0 Add authorization mode to kubeadm 2017-01-18 14:02:53 -08:00
Kubernetes Submit Queue 302d3ab1d7 Merge pull request #39625 from deads2k/rbac-36-beta
Automatic merge from submit-queue (batch tested with PRs 39625, 39842)

Add RBAC v1beta1

Add `rbac.authorization.k8s.io/v1beta1`.  This scrubs `v1alpha1` to remove cruft, then add `v1beta1`.  We'll update other bits of infrastructure to code to `v1beta1` as a separate step.

```release-note
The `attributeRestrictions` field has been removed from the PolicyRule type in the rbac.authorization.k8s.io/v1alpha1 API. The field was not used by the RBAC authorizer.
```

@kubernetes/sig-auth-misc @liggitt @erictune
2017-01-18 10:19:11 -08:00
deads2k d1fec7068f generated 2017-01-18 10:35:46 -05:00
deads2k e74efe41a0 add rbac v1beta1 2017-01-18 09:49:33 -05:00
deads2k 4f915039e4 move pkg/client/transport to client-go 2017-01-18 07:56:01 -05:00
Zihong Zheng 6b9860cf54 Allows kubectl create -f to filter by selector. 2017-01-17 19:18:51 -08:00
Clayton Coleman 5a5d31555b
Swagger doc generation needs to work on meta/v1 2017-01-17 16:17:19 -05:00
Kubernetes Submit Queue e5fe366eaf Merge pull request #39894 from deads2k/client-03-remove-old
Automatic merge from submit-queue

Remove packages which are now apimachinery

Removes all the content from the packages that were moved to `apimachinery`.  This will force all vendoring projects to figure out what's wrong.  I had to leave many empty marker packages behind to have verify-godep succeed on vendoring heapster.

@sttts straight deletes and simple adds
2017-01-17 12:00:00 -08:00
deads2k 76af9ded47 disable setgen that no one uses and generates improperly 2017-01-17 11:10:33 -05:00
deads2k de725e56e2 prevent anonymous auth and allow all 2017-01-17 10:16:33 -05:00
Kubernetes Submit Queue 3aa29bca4f Merge pull request #40009 from kargakis/fix-dryrun-for-rollout
Automatic merge from submit-queue (batch tested with PRs 39911, 40002, 39969, 40012, 40009)

kubectl: fix rollback dryrun when version is not specified

@kubernetes/sig-cli-misc
2017-01-17 06:47:00 -08:00
deads2k e100e8990b update generation bash to handle vendor dir 2017-01-17 09:06:34 -05:00
Michail Kargakis 9c820a5793 kubectl: fix rollback dryrun when version is not specified 2017-01-17 12:01:09 +01:00
Dr. Stefan Schimanski 1c4849c403 Fix hack/verify-staging-imports.sh on Mac 2017-01-17 09:36:10 +01:00
Kubernetes Submit Queue adbf7137bb Merge pull request #39916 from smarterclayton/generate_for_staging
Automatic merge from submit-queue

Generate changes for staged repos (apimachinery, apiserver)

Restores OpenAPI types, deepcopy, and bazel for meta/v1 types.

Fixes #39912
2017-01-16 16:04:36 -08:00
Clayton Coleman 62d1ae96c1
Generate for staging directories that are not client-go 2017-01-16 16:13:29 -05:00
deads2k a3e71b2cef move name generation to generic api server storage helpers 2017-01-16 16:04:04 -05:00
Kubernetes Submit Queue 17a6f41367 Merge pull request #39859 from k82cn/test_script
Automatic merge from submit-queue (batch tested with PRs 39947, 39936, 39902, 39859, 39915)

Moved _pkg to embeded script.

fixes #39840
2017-01-16 09:26:17 -08:00
Brendan Burns 31eca372c9 Add the ability to edit fields within a config map. 2017-01-14 21:12:27 -08:00
Kubernetes Submit Queue 6261c1b3d6 Merge pull request #39105 from spxtr/morebazel
Automatic merge from submit-queue (batch tested with PRs 39609, 39105)

Stop running most unit tests outside of bazel.

Lets not duplicate our efforts. The two I still run here are the two we currently skip in bazel. We should fix those.
2017-01-13 21:20:33 -08:00
Jeff Grafton b9e060a630 Update scripts to look for binary artifacts in bazel-bin/ 2017-01-13 16:17:48 -08:00
Jeff Grafton bc4b6ac397 Build release tarballs in bazel and add `make bazel-release` rule 2017-01-13 16:17:44 -08:00
Andy Goldstein cb39d0d811 Fix expected error text 2017-01-13 16:58:16 -05:00
Eric Paris 57b12c9d09 Make verify-godeps.sh easier to debug
This does 3 things:

1. env var to retain the /tmp/godep
2. env var to use a specified /tmp/godep
3. rework of preload-dep to support more non-github things, like go4.org
2017-01-13 13:42:58 -05:00
Klaus Ma c1f4565293 Moved _pkg to embeded script. 2017-01-13 16:03:19 +08:00
David McMahon 902ffd53bc Complete *-munge-docs.sh deprecation. 2017-01-12 15:34:03 -08:00
Kubernetes Submit Queue d50c027d0c Merge pull request #39537 from liggitt/legacy-policy
Automatic merge from submit-queue (batch tested with PRs 39803, 39698, 39537, 39478)

include bootstrap admin in super-user group, ensure tokens file is correct on upgrades

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

Possible issues with cluster bring-up scripts:

- [x] known_tokens.csv and basic_auth.csv is not rewritten if the file already exists
  * new users (like the controller manager) are not available on upgrade
  * changed users (like the kubelet username change) are not reflected
  * group additions (like the addition of admin to the superuser group) don't take effect on upgrade
  * this PR updates the token and basicauth files line-by-line to preserve user additions, but also ensure new data is persisted
- [x] existing 1.5 clusters may depend on more permissive ABAC permissions (or customized ABAC policies). This PR adds an option to enable existing ABAC policy files for clusters that are upgrading

Follow-ups:
- [ ] both scripts are loading e2e role-bindings, which only be loaded in e2e tests, not in normal kube-up scenarios
- [ ] when upgrading, set the option to use existing ABAC policy files
- [ ] update bootstrap superuser client certs to add superuser group? ("We also have a certificate that "used to be" a super-user. On GCE, it has CN "kubecfg", on GKE it's "client"")
- [ ] define (but do not load by default) a relaxed set of RBAC roles/rolebindings matching legacy ABAC, and document how to load that for new clusters that do not want to isolate user permissions
2017-01-12 15:06:31 -08:00
Timothy St. Clair fbc5323dad Refactor registry to use store vs. etcd 2017-01-12 09:23:38 -06:00
Jordan Liggitt 21b422fccc
Allow enabling ABAC authz 2017-01-11 17:20:51 -05:00
Dr. Stefan Schimanski 1122bf2c58 Add more generated files as exceptions for readonly directories 2017-01-11 21:38:08 +01:00
Kubernetes Submit Queue 6e5b455b77 Merge pull request #39038 from ncdc/fix-kubectl-get-list
Automatic merge from submit-queue

Fix kubectl get -f <file> -o <nondefault printer> so it prints all items in the file

**What this PR does / why we need it**: Fix kubectl get -f <file> -o <nondefault printer> so it prints all the objects in the file, instead of just the first one. Also add a test for this feature.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```

cc @AdoHe @deads2k @liggitt @fabianofranz @kubernetes/kubectl @kubernetes/sig-cli-misc
2017-01-11 09:58:38 -08:00
Andy Goldstein 613ada4cd7 Fix kubectl get -f <file> -o <nondefault printer>
Fix kubectl get -f <file> -o <nondefault printer> so it prints all the
objects in the file, instead of just the first one. Also add a test for
this feature.
2017-01-11 10:30:13 -05:00
deads2k 98acd800da allow generated changes in readonly package 2017-01-11 08:37:03 -05:00
deads2k 70778cccfe k8s.io/apimachinery scripts 2017-01-11 08:15:34 -05:00
Kubernetes Submit Queue efff7c0336 Merge pull request #39577 from kargakis/fix-openshift-example
Automatic merge from submit-queue (batch tested with PRs 39684, 39577, 38989, 39534, 39702)

examples: fix OpenShift example

Fixes https://github.com/kubernetes/kubernetes/issues/39575
2017-01-10 22:24:11 -08:00
Kubernetes Submit Queue 3a7af8fba0 Merge pull request #39673 from liggitt/deads2k-fix-bindata
Automatic merge from submit-queue (batch tested with PRs 39673, 39536, 39617, 39540, 39686)

Generate stable bindata output

fixes #30621

bindata generation produces spurious diffs when run with different go versions because gzip output is not stable between versions.

It also produces spurious diffs when invoked directly vs via make/go:generate.

This PR:
* adds data to bindata uncompressed (makes translation files human-readable, and the zip files were already compressed... for reference the file was 27.7 KB before, and 20.1 KB with this change)
* runs the generation from KUBE_ROOT, so it doesn't matter whether it is invoked directly or via go:generate

supercedes https://github.com/kubernetes/kubernetes/pull/39631
2017-01-10 20:38:13 -08:00
Kubernetes Submit Queue 609e3e3890 Merge pull request #39619 from deads2k/fed-20-rename
Automatic merge from submit-queue (batch tested with PRs 34488, 39511, 39619, 38342, 39491)

rename kubernetes-discovery to kube-aggregator

Rename `kubernetes-discovery` to `kube-aggregator`.  Move and bulk rename.

@kubernetes/sig-api-machinery-misc
2017-01-10 16:07:14 -08:00
Kubernetes Submit Queue 9ef9630976 Merge pull request #39486 from ncdc/allow-missing-keys-in-templates
Automatic merge from submit-queue (batch tested with PRs 39486, 37288, 39477, 39455, 39542)

Allow missing keys in templates by default

Switch to allowing missing keys in jsonpath templates by default.

Add support for allowing/disallowing missing keys in go templates
(default=allow).

Add --allow-missing-template-keys flag to control this behavior (default=true /
allow missing keys).

Fixes #37991

@kubernetes/sig-cli-misc @kubernetes/api-reviewers @smarterclayton @fabianofranz @liggitt @pwittrock
2017-01-10 14:33:10 -08:00
Kubernetes Submit Queue b84c9b4bfd Merge pull request #39612 from sttts/sttts-readonly
Automatic merge from submit-queue (batch tested with PRs 39648, 38167, 39591, 39415, 39612)

Add hack/verify-readonly-packages.sh

Create a `.readonly` file in a package. Any change between `$KUBE_VERIFY_GIT_BRANCH` and `HEAD` will lead to output like:

```shell
$ hack/verify-readonly-packages.sh
Readonly packages changed compared to "master" branch: pkg/generated
```

This is part of https://github.com/kubernetes/kubernetes/issues/39528
2017-01-10 13:33:16 -08:00
Kubernetes Submit Queue 7c3fff1a95 Merge pull request #39551 from chrislovecnm/reconciler-time-increases
Automatic merge from submit-queue (batch tested with PRs 39628, 39551, 38746, 38352, 39607)

Increasing times on reconciling volumes fixing impact to AWS.

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

We are currently blocked by API timeouts with PV volumes.  See https://github.com/kubernetes/kubernetes/issues/39526.  This is a workaround, not a fix.

**Special notes for your reviewer**:

A second PR will be dropped with CLI cobra options in it, but we are starting with increasing the reconciliation periods.  I am dropping this without major testing and will test on our AWS account. Will be marked WIP until I run smoke tests.

**Release note**:

```release-note
Provide kubernetes-controller-manager flags to control volume attach/detach reconciler sync.  The duration of the syncs can be controlled, and the syncs can be shut off as well. 
```
2017-01-10 11:54:15 -08:00
Jordan Liggitt 1127d5c08b
Run bindata generation from KUBE_ROOT
Avoid path differences when running via go:generate and invoking directly
2017-01-10 14:28:19 -05:00
Jordan Liggitt 00d26fcfc0
Generate translation bindata file without compression
gzip output is not stable between go releases, so bindata.go shows spurious diffs when compressed

also, half the output is human readable, and the other half is already zip compressed
2017-01-10 14:28:19 -05:00
deads2k 453651cbfc rename kubernetes-discovery to kube-aggregator 2017-01-10 12:27:42 -05:00
deads2k facc34fea5 move tests which need to stay in k8s.io/kubernetes for API scheme 2017-01-10 10:04:32 -05:00
chrislovecnm ac49139c9f updates from review 2017-01-09 17:20:19 -07:00
chrislovecnm a973c38c7d The capability to control duration via controller-manager flags,
and the option to shut off reconciliation.
2017-01-09 16:47:13 -07:00
Dr. Stefan Schimanski 5a53dd859a Add hack/verify-readonly-packages 2017-01-09 17:25:16 +01:00
Andy Goldstein 80c5cd8b88 Allow missing keys in templates by default
Switch to allowing missing keys in jsonpath templates by default.

Add support for allowing/disallowing missing keys in go templates
(default=allow).

Add --allow-missing-template-keys flag to control this behavior
(default=true / allow missing keys).
2017-01-09 10:35:46 -05:00
Michail Kargakis 68f23120a7 examples: fix OpenShift example 2017-01-09 09:58:35 +01:00
Clayton Coleman 0cd27a62da
Federation does not generate swagger spec correctly 2017-01-06 23:45:04 -05:00
Clayton Coleman c5d755dbec
Refactor tests to match new versioned code structure 2017-01-06 23:45:03 -05:00
Tim Hockin 52c07683ef Merge pull request #39448 from bowei/remove-dns
Remove dns
2017-01-06 17:31:05 -08:00
Bowei Du 266bf80404 Remove kube-dns from golang.sh 2017-01-06 12:57:46 -08:00
Bowei Du 0992e2bfc9 Remove DNS code from the main repo (code is now in http://github.com/kubernetes/dns) 2017-01-06 12:57:45 -08:00
Jeff Grafton d5705a6f5f Generate a dummy BUILD file in _output/local/go to keep Bazel out of trouble 2017-01-05 22:05:17 -08:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Jeff Grafton f8288ed1f3 Create BUILD files in top-level subdirectories 2017-01-05 14:14:12 -08:00
Jeff Grafton a53c5f2a4f use gazel to autofix formatting 2017-01-05 14:14:12 -08:00
Jeff Grafton ab0c903c7f Update to gazel v13 2017-01-05 14:14:06 -08:00
Kubernetes Submit Queue 13780bba82 Merge pull request #39433 from deads2k/generic-04-no-dep-01
Automatic merge from submit-queue

move no k8s.io/kubernetes dependencies round 01

Builds on the previous, adds unit testing the staging dir.

moves

 1. pkg/healthz -> apiserver/pkg/healthz
 2. pkg/util/flushwriter -> apiserver/pkg/util/flushwriter
 3. pkg/auth/authenticator -> apiserver/pkg/authentication/authenticator
 4. pkg/auth/authorizer -> apiserver/pkg/authorization/authorizer

@sttts
2017-01-05 10:18:54 -08:00
Kubernetes Submit Queue 2876c23523 Merge pull request #39449 from deads2k/generic-12-enforce-import
Automatic merge from submit-queue

add import cycle checking for staging to verify scripts

Adds an import cycle check to verify scripts since we can't yet use import-boss.  See https://github.com/kubernetes/gengo/pull/27 for details, but since the rule is very simple and global, this ought to provide sufficient protection.

@kubernetes/sig-api-machinery-misc
2017-01-05 09:12:05 -08:00
deads2k a672b501df add apiserver to list of unit tested packages 2017-01-05 11:09:42 -05:00
deads2k 4075258bf2 add import cycle checking for staging to verify scripts 2017-01-05 10:25:20 -05:00
Kubernetes Submit Queue f4a8713088 Merge pull request #36229 from wojtek-t/bump_etcd_version
Automatic merge from submit-queue (batch tested with PRs 36229, 39450)

Bump etcd to 3.0.14 and switch to v3 API in etcd.

Ref #20504

**Release note**:

```release-note
Switch default etcd version to 3.0.14.
Switch default storage backend flag in apiserver to `etcd3` mode.
```
2017-01-04 17:36:06 -08:00
Jordan Liggitt b8c2ad6d42
Deprecate RBAC UserAll, convert v1alpha1 User * rolebindings to Group system:authenticated 2017-01-04 17:11:16 -05:00
Kubernetes Submit Queue 6b70211568 Merge pull request #38844 from nikhiljindal/fednewkubectlTests
Automatic merge from submit-queue

Adding test-federation-cmd.sh to test kubectl with federation apiserver

There are 2 parts to the PR:
* Adding ability to run kubectl tests for a subset of resources.
* Adding test-federation-cmd.sh that runs kubectl tests for resources that are supported by federation-apiserver.

cc @kubernetes/sig-federation @kubernetes/sig-api-machinery 

```release-note
Adding kubectl tests for federation
```
2017-01-04 13:07:17 -08:00
nikhiljindal 5424d50c03 Adding test-federation-cmd.sh to test kubectl with federation apiserver 2017-01-04 11:17:05 -08:00
deads2k 442d2c1404 move pkg/auth/user to staging 2017-01-04 10:27:04 -05:00
Kubernetes Submit Queue e3c3b2ad6d Merge pull request #39371 from php-coder/fix_local_up_cluster_msg
Automatic merge from submit-queue (batch tested with PRs 39405, 39371)

hack/local-up-cluster.sh: fix typo in error message

This commit fixes typo in error message and also removes stale comment from `hack/local-up-cluster.sh`.
2017-01-04 02:22:05 -08:00
Kubernetes Submit Queue 34ea3a17af Merge pull request #39001 from xilabao/fix-group-in-create-clusterrolebinding
Automatic merge from submit-queue

fix group in create clusterrolebinding

group lost.

```
#kubectl create clusterrolebinding test --clusterrole=a --group=b
clusterrolebinding "test" created

#kubectl get clusterrolebinding test -o yaml
apiVersion: rbac.authorization.k8s.io/v1alpha1
kind: ClusterRoleBinding
metadata:
  creationTimestamp: 2016-12-20T03:13:24Z
  name: test
  resourceVersion: "284"
  selfLink: /apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindingstest
  uid: 44d3476d-c662-11e6-a439-7427ea6f0fe3
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: a
subjects: null
```
2017-01-03 16:49:24 -08:00
Kubernetes Submit Queue 8623fdf0b1 Merge pull request #39344 from spxtr/boilerplate_test
Automatic merge from submit-queue (batch tested with PRs 39022, 39331, 39070, 39344)

Add a build rule for the boilerplate unit test.

We recently added unit tests that just run whenever you run `hack/verify_boilerplate.sh`, which really isn't the right time to do that. This adds a build rule instead.
2017-01-03 10:32:23 -08:00
Slava Semushin 83a3cc4eea hack/local-up-cluster.sh: fix typo in error message.
And also remove stale comment.
2017-01-03 16:43:22 +01:00
Dr. Stefan Schimanski 87dd990bb7 Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request 2017-01-03 14:57:33 +01:00
Dr. Stefan Schimanski 2d58ffc129 Move pkg/{apiserver -> genericapiserver/api} 2017-01-03 14:54:03 +01:00
spxtr 796e18f1c7 Add a build rule for the boilerplate unit test. 2017-01-01 22:54:32 -08:00
Jeff Grafton 98534200bc Update boilerplate.py to support 2017 2017-01-01 13:37:39 -08:00
Yifan Gu 9a86ed33e5 hack/verify-flags/exceptions.txt: Update the exceptions.
Run hack/verify-flags-underscore.py -e > hack/verify-flags/exceptions.txt
2016-12-30 15:32:02 -08:00
Kubernetes Submit Queue f9d2153372 Merge pull request #39301 from xilabao/add-psp-example-to-local-up-cluster
Automatic merge from submit-queue

create psp policy in local-up-cluster.sh

run the command
```
PSP_ADMISSION=true ALLOW_PRIVILEGED=true ALLOW_SECURITY_CONTEXT=true ALLOW_ANY_TOKEN=true ENABLE_RBAC=true RUNTIME_CONFIG="extensions/v1beta1=true,extensions/v1beta1/podsecuritypolicy=true" hack/local-up-cluster.sh
```
create psp policies for rbac
2016-12-29 17:24:44 -08:00
Mike Danese 087016dd1c update gazel to v8 2016-12-29 13:01:42 -08:00
Jerzy Szczepkowski cdd8ce7b20 Added e2e test for HA master that creates multizone workers.
Added e2e test for HA master that creates multizone workers.
2016-12-29 09:35:01 +01:00
xilabao f98af5b325 create psp policy in local-up-cluster.sh 2016-12-29 16:08:42 +08:00
Joe Finney 2d3ce59c45 No more unit tests to skip. 2016-12-27 16:19:43 -08:00
Tim Hockin 0777ecd030 Fix race in service IP allocation repair loop 2016-12-26 21:59:27 -08:00
Kubernetes Submit Queue 1ee7163308 Merge pull request #36802 from brendandburns/i18n
Automatic merge from submit-queue

Begin paths for internationalization in kubectl

This is just the first step, purposely simple so we can get the interface correct.

@kubernetes/sig-cli @deads2k
2016-12-24 13:09:12 -08:00
Brendan Burns 277306449b Add initial translation support. 2016-12-23 20:45:52 -08:00
wlan0 1e48fd18cb add cloud-controller-manager as the first step in breaking controller-manager 2016-12-22 14:37:15 -08:00
Kubernetes Submit Queue 9a0a724313 Merge pull request #39067 from xilabao/fix-newconfig-file-in-test-cmd
Automatic merge from submit-queue (batch tested with PRs 39076, 39068, 39067)

fix the newconfig.yaml in test-cmd.sh

fix #39066
2016-12-22 00:54:22 -08:00
xilabao 6b19a711ec fix group in create clusterrolebinding 2016-12-22 10:14:11 +08:00
Joe Finney c4d0ecb924 Stop running most unit tests outside of bazel. 2016-12-21 14:35:58 -08:00
Jeff Grafton 30a5efa33b Add flag to node e2e test specifying location of ssh privkey 2016-12-21 11:52:41 -08:00
Jeff Grafton 05c09b1aa3 Disable verify-test-owners.sh and make `go vet` more obvious 2016-12-21 11:44:04 -08:00
deads2k 8b25c21e79 add create rolebinding 2016-12-21 09:03:27 -05:00
Angus Salkeld 17a711d8fd Add new command "kubectl set selector" 2016-12-21 12:30:56 +01:00
Kubernetes Submit Queue c3aac2b938 Merge pull request #38968 from liggitt/anonymous-abac
Automatic merge from submit-queue (batch tested with PRs 36751, 38968)

Convert * users/groups to system:authenticated group in ABAC

Part of enabling anonymous auth by default in 1.6 means protecting earlier policies that did not intend to grant access to anonymous users.

This modifies ABAC policies that match `user` or `group` `*` to only match authenticated users.

Docs PR to update examples to use `system:authenticated` or `system:unauthenticated` groups explicitly: https://github.com/kubernetes/kubernetes.github.io/pull/1992

```release-note
ABAC policies using "user":"*" or "group":"*" to match all users or groups will only match authenticated requests. To match unauthenticated requests, ABAC policies must explicitly specify "group":"system:unauthenticated"
```
2016-12-20 23:31:43 -08:00
xilabao 695e5ddb24 fix the newconfig.yaml in test-cmd.sh 2016-12-21 15:11:35 +08:00
Kubernetes Submit Queue e843f77c6a Merge pull request #38919 from brendandburns/fix
Automatic merge from submit-queue

Add a KUBERNETES_NODE_* section to build kubelet/kube-proxy for windows

@pires @ixdy 

Addresses https://github.com/kubernetes/kubernetes/issues/38785 (I hope)
2016-12-20 15:32:40 -08:00
Justin Santa Barbara ed1baf1db1 Fix spelling in package naming linter error message 2016-12-20 15:48:14 -05:00
Kubernetes Submit Queue 46afb00f4c Merge pull request #38984 from deads2k/fed-16-make-image
Automatic merge from submit-queue

create kuberentes-discovery image

Creates an image for `kubernetes-discovery` since this is the API registration, aggregation, and proxy image.
2016-12-20 07:05:40 -08:00
deads2k 47073be356 create kuberentes-discovery image 2016-12-20 07:42:49 -05:00
Wojciech Tyczynski 498a893fa3 Switch to etcd v3 API by default 2016-12-20 11:57:46 +01:00
Kubernetes Submit Queue 3994845f11 Merge pull request #33965 from euank/coreos-kube-up-now-with-less-cloud-init
Automatic merge from submit-queue

Coreos kube-up now with less cloud init

This update includes significant refactoring. It moves almost all of the
logic into bash scripts, modeled after the `gci` cluster scripts.

The reason to do this is:
1. Avoid duplicating the saltbase manifests by reusing gci's parsing logic (easier maintenance)
2. Take an incremental step towards sharing more code between gci/trusty/coreos, again for better maintenance
3. Pave the way for making future changes (e.g. improved rkt support, kubelet support) easier to share

The primary differences from the gci scripts are the following:
1. Use of the `/opt/kubernetes` directory over `/home/kubernetes`
2. Support for rkt as a runtime
3. No use of logrotate
4. No use of `/etc/default/`
5. No logic related to noexec mounts or gci-specific firewall-stuff

It will make sense to move 2 over to gci, as well as perhaps a few other small improvements. That will be a separate PR for ease of review.

Ref #29720, this is a part of that because it removes a copy of them.

Fixes #24165

cc @yifan-gu 

Since this logic largely duplicates logic from the gci folder, it would be nice if someone closely familiar with that gave an OK or made sure I didn't fall into any gotchas related to that, so cc @andyzheng0831
2016-12-20 01:13:45 -08:00
Kubernetes Submit Queue 503f3d8aa5 Merge pull request #38935 from k82cn/remove_mesos_from_flags_exception
Automatic merge from submit-queue (batch tested with PRs 38426, 38917, 38891, 38935)

Remove cluster/mesos from hack/verify-flags/exceptions.txt

`cluster/mesos` scripts was removed; so remove it from `hack/verify-flags/exceptions.txt`.

The diff was generated by `hack/verify-flags-underscore.py -e > hack/verify-flags/exceptions.txt`.
2016-12-19 18:18:27 -08:00
Kubernetes Submit Queue cca2e41564 Merge pull request #36511 from apelisse/owners-hack-jenkins
Automatic merge from submit-queue

Curating Owners: hack/jenkins

cc @rmmh @spxtr @ixdy @fejta

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2016-12-19 17:27:14 -08:00
Antoine Pelisse 0aebb8376e Update OWNERS: Create test-infra-maintainers 2016-12-19 15:41:51 -08:00
Antoine Pelisse bc003d0afa Update OWNERS approvers and reviewers: hack/jenkins 2016-12-19 15:39:03 -08:00
Dr. Stefan Schimanski d582c2d46d Update bazel and linted files 2016-12-19 23:13:14 +01:00
Kubernetes Submit Queue 523ff93471 Merge pull request #38977 from deads2k/fed-15-limit-discovery
Automatic merge from submit-queue (batch tested with PRs 38525, 38977)

add service status detection to kubernetes-discovery

This adds an inspection of services and endpoints before adding the APIService to kubernetes-discovery.  This keeps a single bad API service from killing old clients since proxying will fail.
2016-12-19 13:23:06 -08:00
deads2k 8f1677b7c8 add service status detection to kubernetes-discovery 2016-12-19 14:56:20 -05:00
Jordan Liggitt 742ef34484
Convert user/group * to match authenticated users only in ABAC 2016-12-19 13:41:35 -05:00
Jerzy Szczepkowski 0c669fe6cc Added MULTIZONE flag to e2e remove master script.
Added MULTIZONE flag to e2e remove master script.
The script is used by HA tests which set-up multizone clusters.
2016-12-19 14:37:42 +01:00
Klaus Ma fa1a189fe2 Remove cluster/mesos from hack/verify-flags/exceptions.txt 2016-12-19 06:33:03 +08:00
Kubernetes Submit Queue 7e1cacaa91 Merge pull request #38440 from justinsb/conversion_gen_safe_at_some_speeds
Automatic merge from submit-queue

conversion-gen: add --skip-unsafe flag

We should expose the SkipUnsafe option, for legacy compatability, so
that conversion-go can be used in other projects, and for platforms
where unsafe is not available.

Make unsafe code generation the default though, and have the help text
hint that the resulting code is sub-optimal.
2016-12-18 09:16:16 -08:00
Euan Kemp 5a2d0801b5 cluster/coreos: update veify-flags exceptions 2016-12-17 21:36:32 -08:00
Brendan Burns ab0e245bc6 Add a KUBERNETES_NODE_* section to build kubelet/kube-proxy for windows 2016-12-17 21:07:18 -08:00
Kubernetes Submit Queue 5b2823adb9 Merge pull request #38191 from sttts/sttts-move-master-options
Automatic merge from submit-queue

Move non-generic apiserver code out of the generic packages
2016-12-17 01:25:45 -08:00
Kubernetes Submit Queue 6c9a4139f3 Merge pull request #38614 from soltysh/remove_ext_jobs
Automatic merge from submit-queue (batch tested with PRs 37468, 36546, 38713, 38902, 38614)

Remove extensions/v1beta1 Job

Fixes https://github.com/kubernetes/kubernetes/issues/32763. This endpoint was deprecated in 1.5 and was planned to be removed in 1.6. 

**Release note**:
```release-note
Remove extensions/v1beta1 Jobs resource, and job/v1beta1 generator.
```
2016-12-16 18:55:37 -08:00
Kubernetes Submit Queue 9a1c607673 Merge pull request #38713 from alejandroEsc/ae/localup1
Automatic merge from submit-queue (batch tested with PRs 37468, 36546, 38713, 38902, 38614)

local-up-cluster additions

**What this PR does / why we need it**:
Changes to local-cluster-up: These include: 1)  a simple additional help option. 2) additional error message to not being able to run `docker ps`. 3) fail faster when etcd is not found in path. Hopefully these make developing a bit more pleasant.

**Release note**:
```NONE
```
2016-12-16 18:55:32 -08:00
Matt Liggett 69cd805532 Merge pull request #38804 from Random-Liu/disable-au
Node E2E: Disable AU in node e2e test.
2016-12-16 15:32:23 -08:00
Maciej Szulik 9f064c57ce Remove extensions/v1beta1 Job 2016-12-17 00:07:24 +01:00
Kubernetes Submit Queue 29e7096b8e Merge pull request #38888 from madhusudancs/fed-newtest-add-develop
Automatic merge from submit-queue (batch tested with PRs 38888, 38895)

Bundle federation/develop directory in the test tarball for federation testing.

cc @kubernetes/sig-federation-misc
2016-12-16 13:35:26 -08:00
Kubernetes Submit Queue faf959b522 Merge pull request #38869 from deads2k/api-52-in-cluster
Automatic merge from submit-queue

use in-cluster kubeconfig for genericapiserver

Allow the use of the in-cluster config to communicate with the core API server for delegated authn/authz for an addon API server.

@kubernetes/sig-api-machinery @sttts
2016-12-16 11:30:27 -08:00
Madhusudan.C.S 6560825390 Bundle federation/develop directory in the test tarball for federation testing. 2016-12-16 11:10:16 -08:00
deads2k bbcbdaffd1 use in-cluster kubeconfig for genericapiserver 2016-12-16 12:40:33 -05:00
Dr. Stefan Schimanski 7267299c3c genericapiserver: move MasterCount and service options into master 2016-12-16 17:23:43 +01:00
Alejandro Escobar 7d9c06f82d local-up-cluster changes: added help option, added error message for why docker ps fails and how to recover, added test to check if etcd is in your path to fail fast when not found.
from etcd.sh split the start process into validate fucntion + start function so that the validate piece can be reused elsewhere. the up-cluster script has been changed to remove duplicate docker logic to the one used in buid-tools/common.sh and the validate etcd function is now used here.

moved docker daemon check function to util.sh and made function name changes and upstream changes.
2016-12-16 07:41:35 -08:00
Kubernetes Submit Queue 0d80ee0b8d Merge pull request #38767 from kargakis/fix-setting-container-name-in-create-deployment
Automatic merge from submit-queue

kubectl: fix 'create deployment' to set container name correctly

@kubernetes/kubectl @kubernetes/sig-cli
2016-12-16 04:38:22 -08:00
shashidharatd b58216e333 Stop cleaning federation namespace in e2e tests 2016-12-16 14:21:40 +05:30
Madhusudan.C.S 5a7644c502 [Federation][init-11] Switch federation e2e tests to use the new federation control plane bootstrap via the `kubefed init` command. 2016-12-16 11:22:44 +05:30
Kubernetes Submit Queue c1c0583d09 Merge pull request #35945 from jianhuiz/federation-apiserver-batch-job-client
Automatic merge from submit-queue

Federation apiserver batch job client

generate internal and 1.5 client for federated job
requires #35943

@quinton-hoole @nikhiljindal @deepak-vij
#34261
2016-12-15 16:56:18 -08:00
jianhuiz c885dd40d3 update client generation scripts to include batch/Job for federation 2016-12-15 09:58:33 -08:00
Jeremy Whitlock c0b890d4bd hack/dev-build-*: Run dev build instead of release build
The current dev-build-*.sh scripts do a full release build which means
running tests and also doing cross-platform builds.  This is unnecessary
and after discussing this in Slack it was suggested to either blow away
these files or fix them.  This should fix them.
2016-12-15 10:35:16 -07:00
Random-Liu e5efc21de6 Disable AU in node e2e test. 2016-12-15 01:33:09 -08:00
Kubernetes Submit Queue 68b93b05f3 Merge pull request #38783 from jessfraz/cleanup
Automatic merge from submit-queue (batch tested with PRs 38783, 36396)

hack/cherry_pick_pull.sh: cleanup patch files

this was driving me nuts.
it will now remove the patch files from /tmp
2016-12-14 17:54:49 -08:00
Kubernetes Submit Queue 23cd9d7b05 Merge pull request #38736 from ixdy/build-tools-rename-back
Automatic merge from submit-queue

Rename root BUILD to BUILD.bazel, and rename build-tools/ back to build/

**What this PR does / why we need it**: undoes #35453. `build-tools/` was intended to be a temporary workaround until https://github.com/bazelbuild/bazel/issues/552 was fixed, which is has been, as of bazel 0.4.1.

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

FYI @thockin 

since this is likely to be rebase hell, my list of actions:
```console
$ git mv BUILD BUILD.bazel
$ git commit -a
$ git mv build-tools/ build/
$ sift -l 'build-tools' | xargs sed -i -e 's:build-tools/:build/:g'
$ git checkout HEAD docs/
$ git commit -a
```
2016-12-14 16:01:00 -08:00
Kubernetes Submit Queue 4d467de5c5 Merge pull request #37708 from juanvallejo/jvallejo/add-restclient-config-helper-for-parsing-global-timeout
Automatic merge from submit-queue (batch tested with PRs 37708, 34410)

Add restclientconfig helper fn for parsing timeout

Related downstream PR: https://github.com/openshift/origin/pull/12062 (example of use-case for this patch)

**Release note**:
```release-note
release-note-none
```

This patch adds a package `pkg/client/unversioned/clientcmd/util` and
defines a `ParseTimeout` helper function for parsing time from a
user-defined string. This allows code re-use in other packages that
require the creation of a new restclient (and therefore must set the
`--global-timeout` flag value manually).

@fabianofranz @kubernetes/cli-review
2016-12-14 15:09:50 -08:00
Jess Frazelle 50343c20c9
hack/cherry_pick_pull.sh: cleanup patch files
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-12-14 14:33:17 -08:00
Kubernetes Submit Queue d8efc779ed Merge pull request #38154 from caesarxuchao/rename-release_1_5
Automatic merge from submit-queue (batch tested with PRs 38154, 38502)

Rename "release_1_5" clientset to just "clientset"

We used to keep multiple releases in the main repo. Now that [client-go](https://github.com/kubernetes/client-go) does the versioning, there is no need to keep releases in the main repo. This PR renames the "release_1_5" clientset to just "clientset", clientset development will be done in this directory.

@kubernetes/sig-api-machinery @deads2k 

```release-note
The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go
```
2016-12-14 14:21:51 -08:00
Jeff Grafton 27d096d27d Rename build-tools/ back to build/ 2016-12-14 13:42:15 -08:00
Chao Xu f6f71c32b6 change release_1_5 to clientset in staging/copy.sh
modify update-codegen.sh
2016-12-14 12:39:36 -08:00
Michail Kargakis bf78c00a96 kubectl: fix 'create deployment' to set container name correctly 2016-12-14 17:32:33 +01:00
aaronxu 3b20730620 spell check for test/* 2016-12-14 06:03:00 -08:00
Random-Liu b7ec229e2c Add run kubelet mode. 2016-12-13 19:08:55 -08:00
Kubernetes Submit Queue 92dae03816 Merge pull request #38726 from MrHohn/kube-dns-rename2
Automatic merge from submit-queue (batch tested with PRs 38727, 38726, 38347, 38348)

Second pass of renaming kube-dns configure files

Continue work of #38523.

Not sure why cluster/centos/deployAddons.sh was omitted in previous PR. Also deletes the non-use `DNS_REPLICAS` var and changes `-rc` suffix in hack/local-up-cluster.sh.

@thockin @bowei @deads2k
2016-12-13 17:31:49 -08:00
Zihong Zheng 7921764b0f Second pass of renaming kube-dns configure files 2016-12-13 15:16:34 -08:00
Kubernetes Submit Queue 3cc2625c13 Merge pull request #38700 from sttts/sttts-speed-up-make
Automatic merge from submit-queue (batch tested with PRs 35436, 37090, 38700)

Significantly speed-up make

- do not call `dirname` for every go file => gives **>8 seconds** on each make run
- do not preserve time during rsync from `_output/local/go/bin` to `_output/local/bin/<os>/<arch>`:
  
  We do a touch after our rebuild heuristic triggers.
  
  If in `_output/local/go/bin` you have an older binary and go decides that it's good enough, the following rsync will "preserve the timestamp" of the binary copy in `_output/local/bin/<os>/<arch>`. This reverts the effect of any previous `touch` (compare `Makefile.generated_files`).

  We do a complete rsync of binaries for each go target, not only the one which is rebuilt. This means that later go targets will overwrite the timestamps of freshly touched binaries. Hence, our rebuild heuristic will trigger again and again when running `make`.

  This PR remove the "preserve mtime" from the rsync call. Hence, the effect of touch is not reverted anymore by later rsyncs.
2016-12-13 12:36:36 -08:00
Dr. Stefan Schimanski 036df76242 make: don't preserve rsync time, conflicting with touch on generators 2016-12-13 15:12:45 +01:00
Dan Winship bb60f0415a Add a package for handling version numbers (including non-semvers) 2016-12-13 08:53:00 -05:00
Dr. Stefan Schimanski 399da6d176 make: avoid dirname process per go file 2016-12-13 13:41:32 +01:00
Kubernetes Submit Queue b14f57ca7e Merge pull request #38620 from wojtek-t/increase_wait_for_nodes_timeout
Automatic merge from submit-queue (batch tested with PRs 38617, 38620)

Increase timeout for waiting for nodes
2016-12-13 03:46:29 -08:00
Wojciech Tyczynski 6051870a48 Allow for configuring timeout for waiting for nodes 2016-12-13 09:55:34 +01:00
Zach Loafman 50c4b283ee hack/e2e.go / kops: Add --kops-admin-access to restrict API access 2016-12-12 23:25:13 -08:00
Kubernetes Submit Queue b4d09bf672 Merge pull request #38544 from ConnorDoyle/coverage-bsd-2
Automatic merge from submit-queue (batch tested with PRs 38315, 38624, 38572, 38544)

Fix code coverage in build script on OS X.

Fixes #20223

- Fixes code coverage in build script on BSD systems (including OS X).
- Supersedes #38536.

Successfully tested on two platforms:

```
Darwin <hostname> 16.1.0 Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016; root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64
```

```
Linux <hostname> 4.4.14-040414-generic #201606241434 SMP Fri Jun 24 18:36:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
```

cc @ixdy @mfanjie @balajismaniam @smarterclayton @soltysh

**Release note**:
```release-note
```
2016-12-12 19:42:37 -08:00
Kubernetes Submit Queue f8cab39f1d Merge pull request #38624 from deads2k/fed-10-proxy
Automatic merge from submit-queue (batch tested with PRs 38315, 38624, 38572, 38544)

kubernetes-discovery proxy

The last commit adds an authenticating (but not authorizing) proxy to `kubernetes-discovery`.  The other commits are in the submit queue already.

@sttts @cjcullen This is it.  After this we can start e2e wiring.
2016-12-12 19:42:33 -08:00
Kubernetes Submit Queue 8abbedae54 Merge pull request #38315 from mikedanese/pin-gazel
Automatic merge from submit-queue

Pin gazel to a version and support cgo

This fixes the bazel build.

@krousey who is buildcop
2016-12-12 19:32:29 -08:00
Kubernetes Submit Queue 8af269fd7c Merge pull request #38557 from aaron12134/benchmark-go-newline-format
Automatic merge from submit-queue

Leak filling for newline format on benchmark-go.sh

**What this PR does / why we need it**:  make hack/benchmark-go.sh 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**: First commit :D , did I make a wrong modification? 

**Release note**:

```release-note
```
2016-12-12 15:02:05 -08:00
Connor Doyle 6a7ac2331b Fix code coverage in build script on OS X. 2016-12-12 14:38:54 -08:00
Kubernetes Submit Queue d6e27fac03 Merge pull request #38576 from fejta/log
Automatic merge from submit-queue

Interrupt/Terminate all child processes on timeout. Auto-gen stepName

Signal all children of the finishRunning command. See http://stackoverflow.com/questions/22470193/why-wont-go-kill-a-child-process-correctly

Most commands started by e2e.go are shell scripts like `hack/ginkgo-e2e.sh`, `hack/e2e-internal/e2e-down.sh`, etc which quickly starts a subprocess such as the ginkgo binary. We spend ~1s in ginkgo-e2e.sh and hours inside the ginkgo binary. Therefore when we want to timeout it is important that we signal the child processes as well, which we can accomplish by starting the command in a new process group, and signaling `-pid` instead of `pid`

Ref https://github.com/kubernetes/test-infra/issues/1316 https://github.com/kubernetes/test-infra/issues/1250
Test results: https://github.com/kubernetes/kubernetes/pull/37868
2016-12-12 14:16:34 -08:00
Mike Danese 837eee43ac pin gazel to v3 2016-12-12 13:30:06 -08:00
Kubernetes Submit Queue 74de0fdb63 Merge pull request #38135 from MHBauer/go-generate-flag-location
Automatic merge from submit-queue

goflags must be after subcommand

**What this PR does / why we need it**:
if GOFLAGS is set when calling make, kubernetes will fail to build

as an example, I often have `GOFLAGS=-v` so I can have some idea of progress during compilation

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2016-12-12 13:28:24 -08:00
deads2k b81645e382 add proxying capability to kubernetes-discovery 2016-12-12 16:26:33 -05:00
Erick Fejta bf7aa86932 Interrupt/Terminate all child processes on timeout. Auto-gen stepName 2016-12-12 12:01:52 -08:00
deads2k bae26c2030 fix delegated authn client cert presentation 2016-12-12 09:30:59 -05:00