Commit Graph

5205 Commits (01b736c4d9b5a410632366a4beb9612aea72eeaf)

Author SHA1 Message Date
Kubernetes Submit Queue 7e18392f16 Merge pull request #43671 from k82cn/skip_e2e_4_mac
Automatic merge from submit-queue

Skip e2e test for Mac.

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

Enable secrets in federation kubectl tests

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

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

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

test/e2e_node: prepull images with CRI

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

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

Marked WIP till #40525 makes its way into master

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

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

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

Ensures we don't set up unnecessary objects.

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

Enable audit log in local cluster

fixes #42318

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

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

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

**Release note**:

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

Fix the ginkgo nocolor parameter

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



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

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

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

**Release note**:

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

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

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

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


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

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

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

**Special notes for your reviewer**:

**Release note**:

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

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

rebase fixes

latest pr. changes.

small change moving return nil out of switch.

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

more optimization in humanreadable code.

pushed up current test changes, this is purely temporary

finished writing tests

updated test and function names.

changed output extensions from .sh to output.

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

made a few changes to testing.

fixed testing issues, created better test and cleanup

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

Add plugin/pkg/scheduler to linted packages

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

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

**Special notes for your reviewer**:

**Release note**:

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

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

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

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

combine kube-apiserver and kube-aggregator

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

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



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

Ignore GoVersion and GodepVersion in staging-godep diff

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

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

**Special notes for your reviewer**:

**Release note**:

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

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

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

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

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

add singular resource names to discovery

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

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

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


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

Export godep patch files to artifacts

**What this PR does / why we need it**:
If a godep patch file is created, and a `${WORKSPACE}/_artifacts` directory exists, copy the patch file out to it.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

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

add local option to APIService

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

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

expose -untilItFails in hack/e2e.go

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

Cleanup make test-integration

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

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

Instead of:

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

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

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

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

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

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

create configmap from-env-file

Allow ConfigMaps to be created from Docker based env files.

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

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

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

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

Retry kubectl test replace on conflict

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

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

Verify generated protobuf script should fail on staging/ changes too

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

Update hack scripts to use godep v79 and ensure_godep_version

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

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

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

**Release note**:

```release-note
NONE
```

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

Improve code coverage for scheduler/api/validation

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

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

Thanks
**Special notes for your reviewer**:

**Release note**:

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

Update startup scripts for kube-dns ConfigMap and ServiceAccount

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

@bowei 

cc @liggitt 

**Release note**:

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

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

Fixes #42412

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

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

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

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

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

Replaces #42560
2017-03-14 10:19:17 -07:00
shiywang 52e4be2578 Be able to specify the timeout to wait for pod for kubectl logs/attach 2017-03-14 23:00:31 +08:00
Kubernetes Submit Queue 5e29e1ee05 Merge pull request #42623 from liggitt/kubectl-version
Automatic merge from submit-queue

Fix v0.0.0 in kubectl built from master

Fixes https://github.com/kubernetes/kubernetes/issues/40813
2017-03-13 15:06:31 -07:00
Vishnu kannan 46708be3e8 linter fixes
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-03-13 10:58:26 -07:00
deads2k b27de102cb add local option to APIService 2017-03-13 10:10:50 -04:00
Kubernetes Submit Queue e1ec10f248 Merge pull request #42851 from madhusudancs/fed-down-improvements
Automatic merge from submit-queue

[Federation] Unjoin only the joined clusters while bringing down the federation control plane.

A few other minor improvements.

**Release note**:

```release-note
NONE
```
2017-03-12 16:29:37 -07:00
Madhusudan.C.S ed10bb7643 [Federation] Unjoin only the joined clusters while bringing down the federation control plane.
A few other minor improvements.
2017-03-12 13:05:26 -07:00
Dr. Stefan Schimanski 792d1f3dc0 hack/verify-staging-imports.sh: check that plugins are not imported by default 2017-03-12 19:51:31 +01:00
Dr. Stefan Schimanski f88bae8191 hack/godep-restore.sh: use godep v79 which works 2017-03-12 18:43:10 +01:00
Kubernetes Submit Queue 328e555f72 Merge pull request #41794 from shashidharatd/federation-upgrade-tests-1
Automatic merge from submit-queue (batch tested with PRs 41794, 42349, 42755, 42901, 42933)

[Federation][e2e] Add framework for upgrade test in federation

Adding framework for federation upgrade tests. please refer to #41791

cc @madhusudancs @nikhiljindal @kubernetes/sig-federation-pr-reviews
2017-03-10 22:02:15 -08:00
Kubernetes Submit Queue d2d3884f83 Merge pull request #42362 from soltysh/deployment_generators
Automatic merge from submit-queue (batch tested with PRs 38805, 42362, 42862)

Fix deployment generator after introducing deployments in apps/v1beta1

This PR does two things:

1. Switches all generator to produce versioned objects, to bypass the problem of having an object in multiple versions, which then results in not having stable generator (iow. producing exactly the same object).
2. Introduces new generator for `apps/v1beta1` deployments.

@kargakis @janetkuo ptal

@kubernetes/sig-apps-pr-reviews @kubernetes/sig-cli-pr-reviews ptal

This is a followup to https://github.com/kubernetes/kubernetes/pull/39683, so I'm adding 1.6 milestone.

```release-note
Introduce new generator for apps/v1beta1 deployments
```
2017-03-10 14:01:21 -08:00
Kubernetes Submit Queue a54d493216 Merge pull request #42608 from xilabao/patch-8
Automatic merge from submit-queue (batch tested with PRs 42608, 42444)

fix typo in know-flags

ref to https://github.com/kubernetes/kubernetes/pull/41417
2017-03-10 12:50:22 -08:00
shashidharatd f2fa2f6dd6 New packages added to hack/.linted_packages 2017-03-11 01:39:56 +05:30
shashidharatd 662f0ef531 Add framework for federation upgrade tests 2017-03-11 01:39:56 +05:30
Maciej Szulik aa4390750c Introduce new generator for apps/v1beta1 deployments 2017-03-10 12:08:01 +01:00
Kubernetes Submit Queue ab6fecfa3a Merge pull request #42811 from gnufied/validation-no-probe
Automatic merge from submit-queue (batch tested with PRs 42811, 42859)

 Validation PVs for mount options

We are going to move the validation in its own package and we will be calling validation for individual volume types as needed.

Fixes https://github.com/kubernetes/kubernetes/issues/42573
2017-03-09 18:47:52 -08:00
tanshanshan 6fd76dc139 fix 2017-03-10 10:44:21 +08:00
Hemant Kumar 12d6b87894 Validation PVs for mount options
We are going to move the validation in its own package
and we will be calling validation for individual volume types
as needed.
2017-03-09 18:24:37 -05:00
Kubernetes Submit Queue 4540674b04 Merge pull request #42758 from krousey/downgrades
Automatic merge from submit-queue (batch tested with PRs 42734, 42745, 42758, 42814, 42694)

Implement automated downgrade testing.

Node version cannot be higher than the master version, so we must
switch the node version first. Also, we must use the upgrade script
from the appropriate version for GCE.
2017-03-09 15:06:56 -08:00
Kris cc84e0895a Implement automated downgrade testing.
Node version cannot be higher than the master version, so we must
switch the node version first. Also, we must use the upgrade script
from the appropriate version for GCE.
2017-03-09 12:45:20 -08:00
Zihong Zheng 3acff7d3ef Update startup scripts for kube-dns ConfigMap and ServiceAccount 2017-03-09 11:10:23 -08:00
Kubernetes Submit Queue 376282227f Merge pull request #42726 from sttts/sttts-unify-godep-scripts
Automatic merge from submit-queue

Ensure a fixed godep version in hack/*-godep*.sh

No godep pinning asks for trouble when godep changes behaviour once again.

Moreover, call `hack/godep-restore.go` from `hack/update-all-staging.sh`. This was an actual bug.
2017-03-09 07:37:47 -08:00
Kubernetes Submit Queue 1a3c3be58b Merge pull request #42786 from gyliu513/feature-gates
Automatic merge from submit-queue (batch tested with PRs 42786, 42553)

Updated comments for TaintBasedEvictions.

**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**:
2017-03-09 07:37:35 -08:00
Dr. Stefan Schimanski 798d9c2ed3 Unify godep code in hack/*-godep*.sh 2017-03-09 15:03:13 +01:00
Kubernetes Submit Queue 72c94b1aa8 Merge pull request #42728 from sttts/sttts-udpate-all-dirty-checkout
Automatic merge from submit-queue

Don't try to run hack/verify-staging-* on dirty repository

When the repo is dirty after running all `update-*` scripts in `hack/update-all.sh`, the staging verify scripts still fail. This PR removes these from `hack/update-all.sh`. Instead give useful instructions or continue automatically with `hack/update-all-staging.sh`.
2017-03-09 05:09:44 -08:00
Dr. Stefan Schimanski c128e4686a Don't try to run hack/verify-staging-* on dirty repository 2017-03-09 13:05:31 +01:00
Guangya Liu ed28695d3e Updated comments for TaintBasedEvictions. 2017-03-09 17:06:31 +08:00
Michael Fraenkel 7eb49628c6 create configmap from-env-file 2017-03-08 07:58:01 -08:00
nikhiljindal 3b8ba56e7d Enable secret tests 2017-03-07 15:40:20 -08:00
nikhiljindal ded881db20 Set wait for deletion for federation apiserver kubectl tests 2017-03-07 15:40:20 -08:00
Jordan Liggitt 2d06607885
Fix v0.0.0 in kubectl built from master 2017-03-07 01:09:57 -05:00
xilabao c64f146a34 fix typo in know-flags 2017-03-06 19:06:57 -06:00
Anthony Yeh cec3899b96 Deployment: Remove Overlap and SelectorUpdate annotations.
These are not used anymore since ControllerRef now protects against
fighting between controllers with overlapping selectors.
2017-03-06 15:12:08 -08:00
Kubernetes Submit Queue 79883dc48d Merge pull request #42070 from luxas/remove_kube_discovery
Automatic merge from submit-queue

Remove the kube-discovery binary from the tree

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

kube-discovery was a temporary solution to implementing proposal: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/bootstrap-discovery.md

However, this functionality is now gonna be implemented in the core for v1.6 and will fully replace kube-discovery:
 - https://github.com/kubernetes/kubernetes/pull/36101 
 - https://github.com/kubernetes/kubernetes/pull/41281
 - https://github.com/kubernetes/kubernetes/pull/41417

So due to that `kube-discovery` isn't used in any v1.6 code, it should be removed.
The image `gcr.io/google_containers/kube-discovery-${ARCH}:1.0` should and will continue to exist so kubeadm <= v1.5 continues 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
Remove cmd/kube-discovery from the tree since it's not necessary anymore
```
@jbeda @dgoodwin @mikedanese @dmmcquay @lukemarsden @errordeveloper @pires
2017-03-04 12:58:23 -08:00
Kubernetes Submit Queue 7e37b895d7 Merge pull request #41417 from luxas/kubeadm_test_token
Automatic merge from submit-queue

kubeadm: Hook up kubeadm against the BootstrapSigner

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

This PR makes kubeadm able to use the BootstrapSigner. 
Depends on a few other PRs I've made, I'll rebase and fix this up after they've merged.

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

Example usage:
```console
lucas@THENINJA:~/luxas/kubernetes$ sudo ./kubeadm init --kubernetes-version v1.7.0-alpha.0.377-2a6414bc914d55
[sudo] password for lucas: 
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.0-alpha.0.377-2a6414bc914d55
[init] Using Authorization mode: RBAC
[preflight] Running pre-flight checks
[preflight] Starting the kubelet service
[certificates] Generated CA certificate and key.
[certificates] Generated API server certificate and key.
[certificates] Generated API server kubelet client certificate and key.
[certificates] Generated service account token signing key.
[certificates] Generated service account token signing public key.
[certificates] Generated front-proxy CA certificate and key.
[certificates] Generated front-proxy client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/scheduler.conf"
[apiclient] Created API client, waiting for the control plane to become ready
[apiclient] All control plane components are healthy after 21.301384 seconds
[apiclient] Waiting for at least one node to register and become ready
[apiclient] First node is ready after 8.072688 seconds
[apiclient] Test deployment succeeded
[token-discovery] Using token: 67a96d.02405a1773564431
[apiconfig] Created RBAC rules
[addons] Created essential addon: kube-proxy
[addons] Created essential addon: kube-dns

Your Kubernetes master has initialized successfully!

To start using your cluster, you need to run:
export KUBECONFIG=/etc/kubernetes/admin.conf

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
    http://kubernetes.io/docs/admin/addons/

You can now join any number of machines by running the following on each node:

kubeadm join --token 67a96d.02405a1773564431 192.168.1.115:6443

other-computer $ ./kubeadm join --token 67a96d.02405a1773564431 192.168.1.115:6443
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[preflight] Skipping pre-flight checks
[preflight] Starting the kubelet service
[discovery] Trying to connect to API Server "192.168.1.115:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://192.168.1.115:6443"
[discovery] Cluster info signature and contents are valid, will use API Server "https://192.168.1.115:6443"
[discovery] Successfully established connection with API Server "192.168.1.115:6443"
[bootstrap] Detected server version: v1.7.0-alpha.0.377+2a6414bc914d55
[bootstrap] The server supports the Certificates API (certificates.k8s.io/v1beta1)
[csr] Created API client to obtain unique certificate for this node, generating keys and certificate signing request
[csr] Received signed certificate from the API server, generating KubeConfig...
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"

Node join complete:
* Certificate signing request sent to master and response
  received.
* Kubelet informed of new secure connection details.

Run 'kubectl get nodes' on the master to see this machine join.

# Wrong secret!
other-computer $ ./kubeadm join --token 67a96d.02405a1773564432 192.168.1.115:6443
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[preflight] Skipping pre-flight checks
[preflight] Starting the kubelet service
[discovery] Trying to connect to API Server "192.168.1.115:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://192.168.1.115:6443"
[discovery] Failed to connect to API Server "192.168.1.115:6443": failed to verify JWS signature of received cluster info object, can't trust this API Server
[discovery] Trying to connect to API Server "192.168.1.115:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://192.168.1.115:6443"
[discovery] Failed to connect to API Server "192.168.1.115:6443": failed to verify JWS signature of received cluster info object, can't trust this API Server
^C

# Poor method to create a cluster-info KubeConfig (a KubeConfig file with no credentials), but...
$ printf "kind: Config\n$(sudo ./kubeadm alpha phas --client-name foo --server https://192.168.1.115:6443 --token foo | head -6)\n" > cluster-info.yaml
$ cat cluster-info.yaml
kind: Config
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFM01ESXlPREl3TXpBek1Gb1hEVEkzTURJeU5qSXdNekF6TUZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTmt0ClFlUVVrenlkQjhTMVM2Y2ZSQ0ZPUnNhdDk2Wi9Id3A3TGJiNkhrSFRub1dvbDhOOVpGUXNDcCtYbDNWbStTS1AKZWFLTTFZWWVDVmNFd0JXNUlWclIxMk51UzYzcjRqK1dHK2NTdjhUOFBpYUZjWXpLalRpODYvajlMYlJYNlFQWAovYmNWTzBZZDVDMVJ1cmRLK2pnRGprdTBwbUl5RDRoWHlEZE1vZk1laStPMytwRC9BeVh5anhyd0crOUFiNjNrCmV6U3BSVHZSZ1h4R2dOMGVQclhKanMwaktKKzkxY0NXZTZJWEZkQnJKbFJnQktuMy9TazRlVVdIUTg0OWJOZHgKdllFblNON1BPaitySktPVEpLMnFlUW9ua0t3WU5qUDBGbW1zNnduL0J0dWkvQW9hanhQNUR3WXdxNEk2SzcvdgplbUM4STEvdzFpSk9RS2dxQmdzQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFNL1JQbTYzQTJVaGhPMVljTUNqSEJlUjROOHkKUzB0Q2RNdDRvK0NHRDJKTUt5NDJpNExmQTM2L2hvb01iM2tpUkVSWTRDaENrMGZ3VHpSMHc5Q21nZHlVSTVQSApEc0dIRWdkRHpTVXgyZ3lrWDBQU04zMjRXNCt1T0t6QVRLbm5mMUdiemo4cFA2Uk9QZDdCL09VNiswckhReGY2CnJ6cDRldHhWQjdQWVE0SWg5em1KcVY1QjBuaUZrUDBSYWNDYUxFTVI1NGZNWDk1VHM0amx1VFJrVnBtT1ZGNHAKemlzMlZlZmxLY3VHYTk1ME1CRGRZR2UvbGNXN3JpTkRIUGZZLzRybXIxWG9mUGZEY0Z0ZzVsbUNMWk8wMDljWQpNdGZBdjNBK2dYWjBUeExnU1BpYkxaajYrQU9lMnBiSkxCZkxOTmN6ODJMN1JjQ3RxS01NVHdxVnd0dz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
    server: https://192.168.1.115:6443
  name: kubernetes

lucas@THENINJA:~/luxas/kubernetes$ sudo ./kubeadm token list
TOKEN                     TTL         EXPIRES   USAGES                   DESCRIPTION
67a96d.02405a1773564431   <forever>   <never>   authentication,signing   The default bootstrap token generated by 'kubeadm init'.

# Any token with the authentication usage set works as the --tls-bootstrap-token arg here
other-computer $ ./kubeadm join --skip-preflight-checks --discovery-file cluster-info.yaml --tls-bootstrap-token 67a96d.02405a1773564431
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[preflight] Skipping pre-flight checks
[preflight] Starting the kubelet service
[discovery] Created cluster-info discovery client, requesting info from "https://192.168.1.115:6443"
[discovery] Synced cluster-info information from the API Server so we have got the latest information
[bootstrap] Detected server version: v1.7.0-alpha.0.377+2a6414bc914d55
[bootstrap] The server supports the Certificates API (certificates.k8s.io/v1beta1)
[csr] Created API client to obtain unique certificate for this node, generating keys and certificate signing request
[csr] Received signed certificate from the API server, generating KubeConfig...
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"

Node join complete:
* Certificate signing request sent to master and response
  received.
* Kubelet informed of new secure connection details.

Run 'kubectl get nodes' on the master to see this machine join.

# Delete the RoleBinding that exposes the cluster-info ConfigMap publicly. Now this ConfigMap will be private
lucas@THENINJA:~/luxas/kubernetes$ kubectl -n kube-public edit rolebindings kubeadm:bootstrap-signer-clusterinfo

# This breaks the token joining method
other-computer $ sudo ./kubeadm join --token 67a96d.02405a1773564431 192.168.1.115:6443
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[preflight] Skipping pre-flight checks
[preflight] Starting the kubelet service
[discovery] Trying to connect to API Server "192.168.1.115:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://192.168.1.115:6443"
[discovery] Failed to request cluster info, will try again: [User "system:anonymous" cannot get configmaps in the namespace "kube-public". (get configmaps cluster-info)]
[discovery] Failed to request cluster info, will try again: [User "system:anonymous" cannot get configmaps in the namespace "kube-public". (get configmaps cluster-info)]
^C

# But we can still connect using the cluster-info file
other-computer $ sudo ./kubeadm join --skip-preflight-checks --discovery-file /k8s/cluster-info.yaml --tls-bootstrap-token 67a96d.02405a1773564431
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[preflight] Skipping pre-flight checks
[preflight] Starting the kubelet service
[discovery] Created cluster-info discovery client, requesting info from "https://192.168.1.115:6443"
[discovery] Could not access the cluster-info ConfigMap for refreshing the cluster-info information, but the TLS cert is valid so proceeding...
[discovery] The cluster-info ConfigMap isn't set up properly (no kubeconfig key in ConfigMap), but the TLS cert is valid so proceeding...
[bootstrap] Detected server version: v1.7.0-alpha.0.377+2a6414bc914d55
[bootstrap] The server supports the Certificates API (certificates.k8s.io/v1beta1)
[csr] Created API client to obtain unique certificate for this node, generating keys and certificate signing request
[csr] Received signed certificate from the API server, generating KubeConfig...
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"

Node join complete:
* Certificate signing request sent to master and response
  received.
* Kubelet informed of new secure connection details.

Run 'kubectl get nodes' on the master to see this machine join.

# What happens if the CA in the cluster-info file and the API Server's CA aren't equal?
# Generated new CA for the cluster-info file, a invalid one for connecting to the cluster
# The new cluster-info file is here:
lucas@THENINJA:~/luxas/kubernetes$ cat cluster-info.yaml
kind: Config
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFM01ESXlPREUyTkRBME1Wb1hEVEkzTURJeU5qRTJOREEwTVZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBS3VHCmR3MXQ5Nmlkd1YrVmwxQjRVSmZWdGpNZ0NTd1poMG00bmR5Q1JCR3FIRkpMTGhIWjREM2N2ckg1Tk44UmZHS0EKb1cwVjN3Q3R2THl4UFdnZkZMbGtrdERPWnBDQ01oYzd2alYxU2FKUE9MS1BIUUtEdm1CVWFNcTdrUzN5NEg1VApMcUp3bFBUUXNVVW5YNWM5V0pzS2JIcEx6MnJZbC9Pam4veGRtd1lQa3JUTTJwSitMS0RjUkxLTEpiQjhGc2pzCnZBQTg2QURjY3phMDd0WEgxL1MzeTN0UDJMTDN0UVgvZWJIYWNPcHluYnVaNlIwdFhKeUpsTTVlOHRHMzFhWHMKQTV3cGo1d2Z1RGU1amRuTHgxNnFtbG5ueGV3OGp0bk4zSDExYUp6VlErOWlSQUZkUTN4WmN4dWdmQVM2ZndqRwo0QnJFeGpUOUFaRlVQb0VkR09NQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFJc0pKRFIzbWMxQ1lCd2ViSkRPNm1MdWkwTk4KS3BVdlBuazlMbWlnb2JmYVhjQWlnUlo2M1pIYTd4MXBHNGpKRG8zY3lxNWEybTAzZ245RFMrcEpKYTdpMmpXUQpaV1YvZ2ZRMEk4RGc0endXU3J0T056NHpTTXQ1cW5JZjVWRC95KzVVSmVRck1XSEVFS1VrdklSQzhuUmIvV1F2CmNRWEpiN1hMY0dtbWJyaXpDSUlDYmI4KzhmNDFUWTZnTmg5ZzduaVdGZlp2VG1jN05aMTNjQVJjajJ0UTAzeVMKbWVPcEc2REdMRENFWWYzRld0QmdleE5CcFlFYy9ydUNnUE9IcEdhelYya3JHdFFNLzI0OGQ2ZndwcVNQOGc4RgpVSHNWZWxiMExnNmgvZ3VSYlZ5SENlck5zTDBJdFFhdjlscmZmWkxQaVA5TzNLQ0pBWk9MbXhEOUhaaz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
    server: https://192.168.1.115:6443
  name: kubernetes

# Try to join an API Server with the wrong CA
other-computer $ sudo ./kubeadm join --skip-preflight-checks --discovery-file /k8s/cluster-info.yaml --tls-bootstrap-token 67a96d.02405a1773564431
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[preflight] Skipping pre-flight checks
[preflight] Starting the kubelet service
[discovery] Created cluster-info discovery client, requesting info from "https://192.168.1.115:6443"
[discovery] Failed to validate the API Server's identity, will try again: [Get https://192.168.1.115:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")]
[discovery] Failed to validate the API Server's identity, will try again: [Get https://192.168.1.115:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")]
[discovery] Failed to validate the API Server's identity, will try again: [Get https://192.168.1.115:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")]
[discovery] Failed to validate the API Server's identity, will try again: [Get https://192.168.1.115:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")]
^C
```

**Release note**:

```release-note
```
@jbeda @mikedanese @justinsb @pires @dmmcquay @roberthbailey @dgoodwin
2017-03-04 05:54:16 -08:00
Lucas Käldström 61a284d720
Hook up kubeadm against the BootstrapSigner/BootstrapTokenAuthenticator 2017-03-04 11:17:52 +02:00
Kubernetes Submit Queue db4fbf5958 Merge pull request #42369 from smarterclayton/get_warning
Automatic merge from submit-queue

Output of `kubectl get` is inconsistent for pods

Builds on top of fixes from #42283, only the last two commits are new. Reverts behavior of #39042 which was inconsistent and confusing.

Fixes #15853
2017-03-03 23:12:38 -08:00
Kubernetes Submit Queue f7c07a121d Merge pull request #42285 from liggitt/get-watch
Automatic merge from submit-queue (batch tested with PRs 41919, 41149, 42350, 42351, 42285)

Fix error printing objects from kubectl get -w

Fixes #42276
2017-03-03 16:44:45 -08:00
Kubernetes Submit Queue 9cc5480918 Merge pull request #41149 from sjenning/qos-memory-limits
Automatic merge from submit-queue (batch tested with PRs 41919, 41149, 42350, 42351, 42285)

kubelet: enable qos-level memory limits

```release-note
Experimental support to reserve a pod's memory request from being utilized by pods in lower QoS tiers.
```

Enables the QoS-level memory cgroup limits described in https://github.com/kubernetes/community/pull/314

**Note: QoS level cgroups have to be enabled for any of this to take effect.**

Adds a new `--experimental-qos-reserved` flag that can be used to set the percentage of a resource to be reserved at the QoS level for pod resource requests.

For example, `--experimental-qos-reserved="memory=50%`, means that if a Guaranteed pod sets a memory request of 2Gi, the Burstable and BestEffort QoS memory cgroups will have their `memory.limit_in_bytes` set to `NodeAllocatable - (2Gi*50%)` to reserve 50% of the guaranteed pod's request from being used by the lower QoS tiers.

If a Burstable pod sets a request, its reserve will be deducted from the BestEffort memory limit.

The result is that:
- Guaranteed limit matches root cgroup at is not set by this code
- Burstable limit is `NodeAllocatable - Guaranteed reserve`
- BestEffort limit is `NodeAllocatable - Guaranteed reserve - Burstable reserve`

The only resource currently supported is `memory`; however, the code is generic enough that other resources can be added in the future.

@derekwaynecarr @vishh
2017-03-03 16:44:39 -08:00
Kubernetes Submit Queue 5b8d600d72 Merge pull request #41919 from Cynerva/gkk/kubelet-auth
Automatic merge from submit-queue (batch tested with PRs 41919, 41149, 42350, 42351, 42285)

Juju: Disable anonymous auth on kubelet

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

This disables anonymous authentication on kubelet when deployed via Juju.

I've also adjusted a few other TLS options for kubelet and kube-apiserver. The end result is that:
1. kube-apiserver can now authenticate with kubelet
2. kube-apiserver now verifies the integrity of kubelet

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

https://github.com/juju-solutions/bundle-canonical-kubernetes/issues/219

**Special notes for your reviewer**:

This is dependent on PR #41251, where the tactics changes are being merged in separately.

Some useful pages from the documentation:
* [apiserver -> kubelet](https://kubernetes.io/docs/admin/master-node-communication/#apiserver---kubelet)
* [Kubelet authentication/authorization](https://kubernetes.io/docs/admin/kubelet-authentication-authorization/)

**Release note**:

```release-note
Juju: Disable anonymous auth on kubelet
```
2017-03-03 16:44:37 -08:00
Kubernetes Submit Queue 4728a0520f Merge pull request #42018 from luxas/kubeadm_cert_phase
Automatic merge from submit-queue (batch tested with PRs 42365, 42429, 41770, 42018, 35055)

kubeadm: Add --cert-dir, --cert-altnames instead of --api-external-dns-names

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

 - For the beta kubeadm init UX, we need this change
 - Also adds the `kubeadm phase certs selfsign` command that makes the phase invokable independently

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

This PR depends on https://github.com/kubernetes/kubernetes/pull/41897

**Release note**:

```release-note
```
@dmmcquay @pires @jbeda @errordeveloper @mikedanese @deads2k @liggitt
2017-03-03 09:24:46 -08:00
Kubernetes Submit Queue 66a0311fd3 Merge pull request #42429 from kargakis/sts-observed-generation-fix
Automatic merge from submit-queue (batch tested with PRs 42365, 42429, 41770, 42018, 35055)

controller: statefulsets respect observed generation

StatefulSets do not update ObservedGeneration even though the API field is in place. This means that clients can never be sure whether the StatefulSet controller has observed the latest spec of a StatefulSet.

@kubernetes/sig-apps-bugs
2017-03-03 09:24:42 -08:00
Seth Jennings cc50aa9dfb kubelet: enable qos-level memory request reservation 2017-03-02 15:04:13 -06:00
Clayton Coleman 34e4337e57
Don't print the "filtered" message on generic output
Unify the various output displays and make them simpler. Don't write to
glog, but only output the info when `-v 2` to stderr.
2017-03-02 15:58:25 -05:00
Clayton Coleman 4e7c10a520
Don't bypass filter on generic output
It is inconsistent and confusing (filtering is orthogonal from output)
and we don't want to regress behavior from 1.5.
2017-03-02 15:58:22 -05:00
Kubernetes Submit Queue 819364004f Merge pull request #42283 from smarterclayton/deployment_describe
Automatic merge from submit-queue

Describers with pod templates should have consistent output

Added a test to verify it.

Fixes #38698
2017-03-02 11:43:04 -08:00
Kubernetes Submit Queue 4672314029 Merge pull request #41682 from perotinus/unpwandtokens
Automatic merge from submit-queue (batch tested with PRs 41984, 41682, 41924, 41928)

Add options to kubefed telling it to generate HTTP Basic and/or token credentials for the Federated API server

fixes #41265.

**Release notes**:
```release-note
Adds two options to kubefed, `-apiserver-enable-basic-auth` and `-apiserver-enable-token-auth`, which generate an HTTP Basic username/password and a token respectively for the Federated API server.
```
2017-03-02 10:51:10 -08:00
Lucas Käldström 579a743482
kubeadm: Add --cert-dir, --apiserver-cert-extra-sans, remove --api-external-dns-names and add the phase command for certs. Also use the CertificatesDir var everywhere instead of the HostPKIPath variable and fix some bugs in certs.go 2017-03-02 20:51:02 +02:00
Michail Kargakis dbab67aa32 controller: statefulsets respect observed generation 2017-03-02 19:43:06 +01:00
Clayton Coleman b78321c67f
Fix test cases with more details 2017-03-02 08:28:54 -05:00
Kubernetes Submit Queue e9d34a692d Merge pull request #42309 from cblecker/godep-race
Automatic merge from submit-queue (batch tested with PRs 42128, 42064, 42253, 42309, 42322)

Fix godep race in local builds

**What this PR does / why we need it**:
This fixes a small race condition when building a godep version other than the latest. As you're building godep once, and then building it again after checkout, this can cause inconsistency in the version selected for use. This fix tells the first `go get` to only download and not build. Then we build manually after checking out the target version.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-03-02 05:00:54 -08:00
Kubernetes Submit Queue 98ff34cc38 Merge pull request #42064 from luxas/kubeadm_beta_init_ux
Automatic merge from submit-queue (batch tested with PRs 42128, 42064, 42253, 42309, 42322)

kubeadm: Rename some flags for beta UI and fixup some logic

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

In this PR:
 - `--api-advertise-addresses` becomes `--apiserver-advertise-address`
   - The API Server's logic here is that if the address is `0.0.0.0`, it chooses the host's default interface's address. kubeadm here uses exactly the same logic. This arg is then passed to `--advertise-address`, and the API Server will advertise that one for the service VIP.
 - `--api-port` becomes `--apiserver-bind-port` for clarity

ref the meeting notes: https://docs.google.com/document/d/1deJYPIF4LmhGjDVaqrswErIrV7mtwJgovtLnPCDxP7U/edit#

**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
```
@jbeda @dmmcquay @pires @lukemarsden @dgoodwin @mikedanese
2017-03-02 05:00:50 -08:00
xilabao 183fd62a52 Enable audit log in local cluster 2017-03-02 17:02:50 +08:00
Jan Safranek 5f62491e22 Update golint 2017-03-02 08:56:09 +01:00
Jan Safranek 584b57b8b4 Add storage.k8s.io/v1 2017-03-02 08:55:25 +01:00
Jess Frazelle 5bb53133a9
update staging client
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-03-01 13:05:44 -08:00
Jess Frazelle fe84363ce2
Add settings API and admission controller
export functions from pkg/api/validation

add settings API

add settings to pkg/registry

add settings api to pkg/master/master.go

add admission control plugin for pod preset

add new admission control plugin to kube-apiserver

add settings to import_known_versions.go

add settings to codegen

add validation tests

add settings to client generation

add protobufs generation for settings api

update linted packages

add settings to testapi

add settings install to clientset

add start of e2e

add pod preset plugin to config-test.sh

Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-03-01 13:04:28 -08:00
Kubernetes Submit Queue 4f7d150b22 Merge pull request #41824 from DirectXMan12/feature/hpa-v2-use-cm-api
Automatic merge from submit-queue

HPA Controller: Use Custom Metrics API

This commit switches over the HPA controller to use the custom metrics
API.  It also converts the HPA controller to use the generated client
in k8s.io/metrics for the resource metrics API.

In order to enable support, you must enable
`--horizontal-pod-autoscaler-use-rest-clients` on the
controller-manager, which will switch the HPA controller's MetricsClient
implementation over to use the standard rest clients for both custom
metrics and resource metrics.  This requires that at the least resource
metrics API is registered with kube-aggregator, and that the controller
manager is pointed at kube-aggregator.  For this to work, Heapster
must be serving the new-style API server (`--api-server=true`).

Before this merges, this will need kubernetes/metrics#2 to merge, and a godeps update to pull that in.
It's also semi-dependent on kubernetes/heapster#1537, but that is not required in order for this to merge.

**Release note**:
```release-note
Allow the Horizontal Pod Autoscaler controller to talk to the metrics API and custom metrics API as standard APIs.
```
2017-03-01 12:56:58 -08:00
Avesh Agarwal 490d2e08cb Fix local cluster up script for following kube-public namespace error:
Error from server (AlreadyExists): namespaces "kube-public" already exists
2017-03-01 15:38:02 -05:00
Jonathan MacMillan 3d3941c6d8 Adds support for HTTP basic and token authentication to kubefed. 2017-03-01 11:04:05 -08:00
Kubernetes Submit Queue c7b53794d0 Merge pull request #39683 from soltysh/move_deployments
Automatic merge from submit-queue

Add apps/v1beta1 deployments with new defaults

This pull introduces deployments under `apps/v1beta1` and fixes #23597 and #23304.

TODO:

* [x] - create new type `apps/v1beta1.Deployment`
* [x] - update kubectl (stop, scale)
* [ ] - ~~new `kubectl run` generator~~ - this will only duplicate half of generator code, I suggest replacing current to use new endpoint
* [ ] - ~~create extended tests~~ - I've added integration and cmd tests verifying new endpoints
* [ ] - ~~create `hack/test-update-storage-objects.sh`~~ - see above

This is currently blocked by https://github.com/kubernetes/kubernetes/pull/38071, due to conflicting name `v1beta1.Deployment`. 

```release-note
Introduce apps/v1beta1.Deployments resource with modified defaults compared to extensions/v1beta1.Deployments.
```

@kargakis @mfojtik @kubernetes/sig-apps-misc
2017-03-01 08:29:26 -08:00
Solly Ross 77069cd9ec Add staging repos to GOPATH in verify-godeps
This commit adds the staging repos to the GOPATH in
hack/verify-godeps.sh.  This allows vendored librarys
to depend on staging repos and not break verify-godeps.

This also adds `hack/godep-restore.sh`, which acts like
`godep restore`, but sets the GOPATH appropriate as well.
2017-03-01 10:23:30 -05:00
Solly Ross d6fe1e8764 HPA Controller: Use Custom Metrics API
This commit switches over the HPA controller to use the custom metrics
API.  It also converts the HPA controller to use the generated client
in k8s.io/metrics for the resource metrics API.

In order to enable support, you must enable
`--horizontal-pod-autoscaler-use-rest-clients` on the
controller-manager, which will switch the HPA controller's MetricsClient
implementation over to use the standard rest clients for both custom
metrics and resource metrics.  This requires that at the least resource
metrics API is registered with kube-aggregator, and that the controller
manager is pointed at kube-aggregator.  For this to work, Heapster
must be serving the new-style API server (`--api-server=true`).
2017-03-01 10:21:50 -05:00
Kubernetes Submit Queue 2249550b57 Merge pull request #42316 from feiskyer/cri-local
Automatic merge from submit-queue

This PR adds a new environmental variable ENABLE_CRI for customizing CRI

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

This PR adds a new environmental variable `ENABLE_CRI` for customizing CRI (e.g. switching between dockershim and dockertools) and sets `--enable-cri=true` by default.

**Which issue this PR fixes** 

Fixes #42315.

**Release note**:

```release-note
NONE
```

Maybe we should also cherry-pick this to 1.6 branch.

cc @yujuhong @Random-Liu
2017-03-01 07:09:19 -08:00
Maciej Szulik 18f756cea8 Updated linted packages 2017-03-01 15:14:41 +01:00
Maciej Szulik c272630b1b Deployments under apps/v1beta1 with new defaults 2017-03-01 15:14:41 +01:00
Kubernetes Submit Queue ac05be73ac Merge pull request #42326 from soltysh/fix_update_stage
Automatic merge from submit-queue

Fix update stage

This PR addressed following problems:

1. Removes comments from all staging godeps and makes sure that they are not placed there. This saves false positive during update when `Comment` field is cut by one digit.
2. Moves updating staging to a separate script (`hack/update-all-staging.sh`), `hack/update-all.sh` only runs verification of staging deps.  

@sttts ptal
2017-03-01 06:11:13 -08:00
Kubernetes Submit Queue ed479163fa Merge pull request #42116 from vishh/gpu-experimental-support
Automatic merge from submit-queue

Extend experimental support to multiple Nvidia GPUs

Extended from #28216

```release-note
`--experimental-nvidia-gpus` flag is **replaced** by `Accelerators` alpha feature gate along with  support for multiple Nvidia GPUs. 
To use GPUs, pass `Accelerators=true` as part of `--feature-gates` flag.
Works only with Docker runtime.
```

1. Automated testing for this PR is not possible since creation of clusters with GPUs isn't supported yet in GCP.
1. To test this PR locally, use the node e2e.
```shell
TEST_ARGS='--feature-gates=DynamicKubeletConfig=true' FOCUS=GPU SKIP="" make test-e2e-node
```

TODO:

- [x] Run manual tests
- [x] Add node e2e
- [x] Add unit tests for GPU manager (< 100% coverage)
- [ ] Add unit tests in kubelet package
2017-03-01 04:52:50 -08:00
Maciej Szulik 9a4d7ee678 Move updating staging to a separate script 2017-03-01 13:34:34 +01:00
Lucas Käldström 5cbefbcbca
kubeadm: Rename --api-advertise-addresses to --apiserver-advertise-address and --api-port to --apiserver-bind-port 2017-03-01 14:33:19 +02:00
Kubernetes Submit Queue 089947d996 Merge pull request #41921 from apprenda/kubeadm_join_ux_update_2
Automatic merge from submit-queue (batch tested with PRs 41921, 41695, 42139, 42090, 41949)

kubeadm: join ux changes

**What this PR does / why we need it**: Update `kubeadm join` UX according to https://github.com/kubernetes/community/pull/381

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

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

**Release note**:
```release-note
NONE
```
2017-03-01 04:09:59 -08:00
Kubernetes Submit Queue f1939a77b7 Merge pull request #42075 from deads2k/agg-22-auth-auto
Automatic merge from submit-queue (batch tested with PRs 41597, 42185, 42075, 42178, 41705)

auto discovery CA for extension API servers

This is what the smaller pulls were leading to.  Only the last commit is unique and I expect I'll still tweak some pod definitions, but this is where I was going.

@sttts @liggitt
2017-03-01 00:36:07 -08:00
Pengfei Ni 36f551ab1d This PR adds a new environmental variable ENABLE_CRI for customing
CRI config.

Signed-off-by: Pengfei Ni <feiskyer@gmail.com>
2017-03-01 15:21:13 +08:00
Christoph Blecker fa135fa4a6
Fix godep race in local builds 2017-02-28 20:17:55 -08:00
Kubernetes Submit Queue aaaa7e4425 Merge pull request #41335 from irfanurrehman/kubefed-flag-cleanup
Automatic merge from submit-queue (batch tested with PRs 42200, 39535, 41708, 41487, 41335)

[Federation][Kubefed] Flag cleanup

This PR is for the issue https://github.com/kubernetes/kubernetes/issues/41333

**Special notes for your reviewer**:
@marun @madhusudancs 


**Release note**:

```
Kubefed init unlearned the following flags:
--storage-backend

Users should instead use the following flag to pass additional arguments:
--apiserver-arg-overrides to api server
```
2017-02-28 20:16:11 -08:00
Jordan Liggitt 31b3e01f1e
Fix error printing objects from kubectl get -w 2017-02-28 22:36:26 -05:00
Vishnu kannan 318f4e102a adding an e2e for GPUs
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-28 13:42:08 -08:00
Derek McQuay 1d37c6be49
kubeadm: join ux changes 2017-02-28 11:06:08 -08:00
deads2k 3d039f60cf allow incluster authentication info lookup 2017-02-28 13:29:59 -05:00
Kubernetes Submit Queue 49d1814b3a Merge pull request #42229 from sttts/sttts-staging-update-all
Automatic merge from submit-queue

Add hack/update-staging-* to update-all.sh
2017-02-28 05:23:42 -08:00
Kubernetes Submit Queue 4a17b8b100 Merge pull request #42067 from deads2k/agg-21-cleanup-default
Automatic merge from submit-queue

clean up generic apiserver options

Clean up generic apiserver options before we tag any levels.  This makes them more in-line with "normal" api servers running on the platform.

Also remove dead example code.

@sttts
2017-02-28 05:23:34 -08:00
Kubernetes Submit Queue 24482ca82e Merge pull request #42140 from madhusudancs/fed-e2e-presubmit-infra-00
Automatic merge from submit-queue

Move push-federation-images.sh to federation and implement similar functionality in jenkins build directory for presubmits.

This is required for federation presubmit e2es.

```release-note
NONE
```
2017-02-28 03:27:11 -08:00
Irfan Ur Rehman b1bb51b6e8 [Federation][kubefed] Remove unnecessary flags from init and use overrides instead 2017-02-28 16:23:54 +05:30
Dr. Stefan Schimanski 63347df079 Add hack/update-staging-* to update-all.sh 2017-02-28 06:46:11 +01:00
Vishnu kannan b86882955b update flags script
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-27 21:24:45 -08:00
Vishnu Kannan cc5f5474d5 add support for node allocatable phase 2 to kubelet
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2017-02-27 21:24:44 -08:00
Madhusudan.C.S 8de2f05f63 Move push-federation-images.sh to federation and implement similar functionality in jenkins build directory for presubmits. 2017-02-27 17:54:37 -08:00
Kubernetes Submit Queue c274e9d715 Merge pull request #42056 from ncdc/shared-informers-16-remove-legacy-code
Automatic merge from submit-queue (batch tested with PRs 42053, 41282, 42056, 41663, 40927)

Fully remove hand-written listers and informers

Note: the first commit is from #41927. Adding do-not-merge for now as we'll want that to go in first, and then I'll rebase this on top.

Update statefulset controller to use a lister for PVCs instead of a client request. Also replace a unit test's dependency on legacylisters with the generated ones. cc @kargakis @kow3ns @foxish @kubernetes/sig-apps-pr-reviews 

Remove all references to pkg/controller/informers and pkg/client/legacylisters, and remove those packages.

@smarterclayton @deads2k this should be it!

cc @gmarek @wojtek-t @derekwaynecarr @kubernetes/sig-scalability-pr-reviews
2017-02-27 12:45:31 -08:00