Commit Graph

4379 Commits (bdd880a1b49e85730836aeade58355981ea63db3)

Author SHA1 Message Date
Kubernetes Submit Queue 46dc7e5244 Merge pull request #35841 from mbohlool/o2
Automatic merge from submit-queue

Update verify-openapi-spec script to check for extra generated spec

hack/verify-openapi-spec.sh only check for existing spec changes. If for some reason (here most probably I forgot to delete a file in api/openapi-spec folder in #35388 after a rebase) there is an old spec exists in the spec folder, it won't panic but it should. This resulted in an unused out of date v1.spec file in the api/openapi-spec folder that this PR also removes.
2016-11-01 23:15:16 -07:00
Kubernetes Submit Queue 21c0743c71 Merge pull request #36005 from zmerlynn/kops-configurable-timeout
Automatic merge from submit-queue

e2e.go/kops: Bump timeout to 20m, fix KUBERNETES_PROVIDER

**What this PR does / why we need it**: I don't have a ton of proof, but I think https://k8s-testgrid.appspot.com/google-aws#kops-aws-updown builds 4045-4047 are just AWS and DNS slowness.

In addition, my original PR was meant to change `KUBERNETES_PROVIDER` based on `KUBERNETES_CONFORMANCE_PROVIDER`.
2016-11-01 15:56:57 -07:00
Zach Loafman 02ec4c373b e2e.go/kops: Make up timeout configurable, bump to 20m
Along the way: Fix ginkgo-e2e.sh. This change got dropped in the
original PR, but it was meant to allow a conformance-style
kubectl-auth test and still have a legit cloud provider.
2016-11-01 14:56:34 -07:00
Zihong Zheng 4523ce8f32 Adds a test for apply --prune --prune-whitelist 2016-11-01 14:02:31 -07:00
Saad Ali 1c51ac4fc1 Revert "fixed some issues with kubectl set resources" 2016-11-01 13:53:17 -07:00
deads2k 4850314a5c add script to check for updates to the files for generation 2016-11-01 15:59:50 -04:00
Madhusudan.C.S 2342f6eefb [Federation][join-01] Implement `kubefed join` command.
Also, add unit tests for `kubefed join`.
2016-11-01 12:45:28 -07:00
Kubernetes Submit Queue 1fa8369074 Merge pull request #35639 from ncdc/lister-gen
Automatic merge from submit-queue

Add tooling to generate listers

Add lister-gen tool to auto-generate listers. So far this PR only demonstrates replacing the manually-written `StoreToLimitRangeLister` with the generated `LimitRangeLister`, as it's a small and easy swap.

cc @deads2k @liggitt @sttts @nikhiljindal @lavalamp @smarterclayton @derekwaynecarr  @kubernetes/sig-api-machinery @kubernetes/rh-cluster-infra
2016-11-01 09:29:06 -07:00
Kubernetes Submit Queue 44b684ad53 Merge pull request #33663 from pmorie/selinux-fixes
Automatic merge from submit-queue

SELinux Overhaul

Overhauls handling of SELinux in Kubernetes.  TLDR: Kubelet dir no longer has to be labeled `svirt_sandbox_file_t`.

Fixes #33351 and #33510.  Implements #33951.
2016-11-01 05:04:17 -07:00
Dr. Stefan Schimanski 5dc31d35a0 Add --tls-sni-cert-key to the apiserver for SNI support 2016-11-01 09:50:56 +01:00
mbohlool 034652b290 verify-openapi-spec.sh should not ignore extra file in the spec folder api/openapi-spec 2016-11-01 01:13:11 -07:00
Kubernetes Submit Queue d461262bf8 Merge pull request #35497 from liggitt/node-address
Automatic merge from submit-queue

Allow apiserver to choose preferred kubelet address type

Follow up to #33718 to stay compatible with clusters using DNS names for master->node communications. Adds the `--kubelet-preferred-address-types` apiserver flag for clusters that prefer a different node address type.

```release-note
The apiserver can now select which type of kubelet-reported address to use for master->node communications, using the --kubelet-preferred-address-types flag.
```
2016-10-31 18:33:27 -07:00
Jordan Liggitt 1a7f7c5399
Allow apiserver to choose preferred kubelet address type 2016-10-31 16:02:38 -04:00
Jacob Beacham cf6b6778dc Adding CLI tests for kubeadm. 2016-10-31 11:12:51 -07:00
Chao Xu 04f291e5b4 disable update-staging-client-go until code freeze 2016-10-31 10:57:14 -07:00
Kubernetes Submit Queue 9ecc131c05 Merge pull request #31220 from mfojtik/pause-patch
Automatic merge from submit-queue

Use PATCH to resume/pause deployment

Alternative version of: https://github.com/kubernetes/kubernetes/pull/30919
Fixes: https://github.com/kubernetes/kubernetes/issues/20437
2016-10-31 08:44:58 -07:00
Andy Goldstein 7b85985a72 Add generated listers 2016-10-31 11:13:43 -04:00
Andy Goldstein f85ac9023a Add lister-gen 2016-10-31 11:13:43 -04:00
Kubernetes Submit Queue f67ecd73f7 Merge pull request #35800 from deads2k/rbac-18-fix-local-up
Automatic merge from submit-queue

make localupcluster work with RBAC enabled

When `ENABLE_RBAC=true` is set to true, `local-up-cluster` fails because it can't reach the endpoint (get a 403).  This changes to an endpoint that the default policy allows anyone to see.
2016-10-31 05:28:54 -07:00
Michal Fojtik 0faa27e62d Use PATCH when pausing/resuming objects and CalculatePatches to get the patch 2016-10-31 13:13:59 +01:00
Kubernetes Submit Queue cda55a7847 Merge pull request #35783 from wojtek-t/support_rollback
Automatic merge from submit-queue

Better logging and support for running non-default version from etcd image

Ref #20504
2016-10-31 04:06:52 -07:00
Wojciech Tyczynski 62299921b5 Correctly support custom etcd migration 2016-10-31 09:03:39 +01:00
Justin Santa Barbara cebfc821a4 Create simple version of ratelimit package
Allows for more testing.
2016-10-30 20:55:03 -04:00
Justin Santa Barbara a3ba760a27 Federation: separate notion of zone-name & dns-suffix
We can put subdomains into hosted zones (for example,
foo.federation.example.com can be hosted in example.com)

By allowing sharing a common hosted zone, this means the user doesn't
have to do as much setup.
2016-10-30 20:50:09 -04:00
Kubernetes Submit Queue 8a202eddfe Merge pull request #35733 from mikedanese/set-gen
Automatic merge from submit-queue

bazel: implement set-gen as a bazel genrule

cc @caesarxuchao who is the gengo master until @lavalamp is back.
2016-10-30 08:43:41 -07:00
Kubernetes Submit Queue bc5682bbaa Merge pull request #35050 from JacobTanenbaum/resource_fixes
Automatic merge from submit-queue

fixed some issues with kubectl set resources

when using kubectl set resources it resets all resource fields that are not being set.

for example
  # kubectl set resources deployments nginx --limits=cpu=100m

followed by

  # kubectl set resources deployments nginx --limits=memory=256Mi

would result in the nginx deployment only limiting memory at 256Mi with the previous
limit placed on the cpu being wiped out. This behavior is corrected so that each invocation
only modifies fields set in that command and changed the testing so that the desired behavior
is checked.

Also a typo:

 you must specify an update to requests or limits or  (in the form of --requests/--limits)

corrected to

 you must specify an update to requests or limits (in the form of --requests/--limits)

 Implemented both the dry run and local flags.

Added test cases to show that both flags are operating as intended.
Removed the print statement "running in local mode" as in PR#35112
2016-10-30 06:18:56 -07:00
Kubernetes Submit Queue 6343db835a Merge pull request #35454 from bowei/image-for-issue-32551
Automatic merge from submit-queue

Add test image for networking related tests

This test image is to support the e2e test for #32551
2016-10-30 01:56:10 -07:00
Kubernetes Submit Queue a06a08a906 Merge pull request #34489 from caesarxuchao/time-copy.sh
Automatic merge from submit-queue

Verify and update client-go staging area for every PR

We need to keep the staging area up-to-date to prevent PRs from breaking client-go.

It's marked as "WIP" because we need to decide the [versioning strategy](https://github.com/kubernetes/client-go/issues/9) for client-go first. This PR contains breaking changes for client-go.

This is blocking #29934 and potentially #34441

cc @kubernetes/sig-api-machinery
2016-10-29 16:24:07 -07:00
Kubernetes Submit Queue 7f309f5fae Merge pull request #35471 from caesarxuchao/client-gen-multi-versions
Automatic merge from submit-queue

Let release_1_5 clientset include multiple versions of a group

Fix #35237 

This PR make versioned clientset to include multiple versions of a group. Currently only `batch` has `v1` and `v2alpha1`. The clientset interface now looks like:
```go
	BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface
	BatchV1() v1batch.BatchV1Interface
	// Deprecated: please explicitly pick a version if possible.
	Batch() v1batch.BatchV1Interface
```

Commit "update client-gen to say internalversion rather than unversioned" fixes https://github.com/kubernetes/kubernetes/issues/24481. 


cc @kubernetes/sig-api-machinery @soltysh @deads2k @nikhiljindal 



```release-note
release_1_5 clientset supports multiple versions of a group.
```
2016-10-29 15:40:13 -07:00
Kubernetes Submit Queue 7c9c8cbf28 Merge pull request #34952 from kargakis/update-observedgeneration-for-overlapping-deployments
Automatic merge from submit-queue

Make overlapping deployments deletable

@kubernetes/deployment ptal

Fixes https://github.com/kubernetes/kubernetes/issues/34466 by 1) not adding the overlapping annotation in the working deployment, 2) updates observedGeneration for overlapping deployments, and 3) updates the kubectl deployment reaper to do non-cascading deletion for deployments with the overlapping annotation.
2016-10-29 14:50:16 -07:00
Chao Xu d3c0d04285 add update-staging-client-go.sh and verify-staging-client-go.sh;
disable verify-staging-client-go.sh until 1.5 code freeze
2016-10-29 14:20:39 -07:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Kubernetes Submit Queue 739f78fad2 Merge pull request #33250 from ymqytw/edit_before_create
Automatic merge from submit-queue

support editing before creating resource

Support `kubectl create -f config.yaml --edit`
Support editing before creating resource from files, urls and stdin.
The behavior is similar to `kubectl edit`
It won't create anything when edit make no change.

partial: #18064

Based on: #33686 and #33973

```release-note
Support editing before creating resource from files, urls and stdin, e.g. `kubectl create -f config.yaml --edit`
It won't create anything when edit make no change.
```
2016-10-29 11:45:43 -07:00
Kubernetes Submit Queue 4ec036c8af Merge pull request #35452 from deads2k/auth-02-front-proxy
Automatic merge from submit-queue

allow authentication through a front-proxy

This allows a front proxy to set a request header and have that be a valid `user.Info` in the authentication chain.  To secure this power, a client certificate may be used to confirm the identity of the front proxy

@kubernetes/sig-auth fyi
@erictune per-request
@liggitt you wrote the openshift one, ptal.
2016-10-29 07:52:09 -07:00
Kubernetes Submit Queue bb992150fa Merge pull request #35694 from wojtek-t/update_etcd_3_0_13
Automatic merge from submit-queue

Update Godeps etcd to 3.0.13

Ref #20504
2016-10-29 05:00:55 -07:00
Ryan Hitchman 20754c0f5c Improve update_owners.py username detection and error message.
Also, skip _output.
2016-10-28 13:23:19 -07:00
deads2k 5b3e2b230b make localupcluster work with RBAC enabled 2016-10-28 13:19:25 -04:00
deads2k 3f9a4d51d5 wire up authenticating front proxy: 2016-10-28 08:36:46 -04:00
Kubernetes Submit Queue e37b7cbde0 Merge pull request #35663 from janetkuo/statefulset
Automatic merge from submit-queue

Rename PetSet to StatefulSet

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

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

**Special notes for your reviewer**: cc @erictune @foxish @kubernetes/sig-apps @ymqytw 

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
2016-10-27 20:16:50 -07:00
Ryan Hitchman df04f33aa9 Make update_owners.py assign new tests to self by default. 2016-10-27 17:39:30 -07:00
Janet Kuo 10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
Mike Danese 5dc7554ab2 bazel: implement set-gen as a bazel genrule 2016-10-27 15:16:30 -07:00
Ryan Hitchman 8e4e8944b6 Add hack/verify-test-owners.sh to ensure tests always have owners. 2016-10-27 12:35:43 -07:00
Jacob Tanenbaum a77cecb957 Implemented both the dry run and local flags.
Added test cases to show that both flags are operating as intended.
Removed the print statement "running in local mode" as in PR#35112
2016-10-27 14:05:46 -04:00
Jacob Tanenbaum fe3bcad128 fixed some issues with kubectl set resources
when using kubectl set resources it resets all resource fields that are not being set.

for example
  # kubectl set resources deployments nginx --limits=cpu=100m

followed by

  # kubectl set resources deployments nginx --limits=memory=256Mi

would result in the nginx deployment only limiting memory at 256Mi with the previous
limit placed on the cpu being wiped out. This behavior is corrected so that each invocation
only modifies fields set in that command and changed the testing so that the desired behavior
is checked.

Also a typo:

 you must specify an update to requests or limits or  (in the form of --requests/--limits)

corrected to

 you must specify an update to requests or limits (in the form of --requests/--limits)

changelog:
 - fixed a typo in hack/make-rules/test-cmd.sh "effecting" to "affecting"
2016-10-27 14:05:46 -04:00
Wojciech Tyczynski 543c2c20ac Update etcd in tests to 3.0.13 2016-10-27 15:06:08 +02:00
Kubernetes Submit Queue 5423eaf431 Merge pull request #35431 from deads2k/client-16-remove-old
Automatic merge from submit-queue

remove the non-generated client

Removes the non-generated client from kube.  The package has a few methods left, but nothing that needs updating when adding new groups.

@ingvagabund
2016-10-27 05:12:33 -07:00
Kubernetes Submit Queue f11d01076e Merge pull request #35503 from wojtek-t/fix_migration
Automatic merge from submit-queue

Fix migration script to make it sh-friendly

Ref #22448

There is no bash in etcd image, so the script needs to be "sh-friendly".

Also, few fixes to the script.
2016-10-27 02:59:37 -07:00
Wojciech Tyczynski 44e66a97f3 Fix migration script 2016-10-27 10:17:56 +02:00
Vishnu kannan e861a5761d Adding a root filesystem override for kubelet mounter
This is useful for supporting hostPath volumes via containerized
mounters in kubelet.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 21:42:59 -07:00
Kubernetes Submit Queue 10061ac358 Merge pull request #35523 from luxas/remove_reconcile
Automatic merge from submit-queue

Deprecate the --reconcile-cidr flag

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: Follows up https://github.com/kubernetes/kubernetes/pull/34906

**Special notes for your reviewer**: I'm not sure why coreos had set `--reconcile-cidr` to `false` and what the implications are now.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Deprecate the --reconcile-cidr kubelet flag because it has no function anymore
```

PTAL @thockin @freehan @justinsb @yujuhong 
@kubernetes/sig-node @kubernetes/sig-network 

**I will add `hack/update-all.sh` contents soon to fix builds**
2016-10-26 20:18:37 -07:00
Kubernetes Submit Queue f300d7ed69 Merge pull request #35646 from vishh/klet-relative-mount
Automatic merge from submit-queue

rename kubelet flag mounter-path to experimental-mounter-path

```release-note
* Kubelet flag '--mounter-path' renamed to '--experimental-mounter-path'
```

The feature the flag controls is an experimental feature and this renaming ensures that users do not depend on this feature just yet.
2016-10-26 16:57:33 -07:00
Brian Grant 2ae2339d6a Merge pull request #35546 from thockin/kill-head-scary-warning-on-master
Remove obsolete munger on docs
2016-10-26 16:44:53 -07:00
Vishnu kannan adef4675a0 rename kubelet flag mounter-path to experimental-mounter-path
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 14:50:33 -07:00
Kubernetes Submit Queue d9873f4556 Merge pull request #35644 from thockin/build-fix-rsync
Automatic merge from submit-queue

Build: Use checksum to rsync results

If dependencies are touched, the Makefile will detect that tools like
deepcopy-gen need to be rebuilt.  It will rebuild them, but if Go decides the
dependencies are not ACTUALLY updated (maybe it was a test file - known
limitation of the current Makefile), it does not touch the resulting binary.
The Makefile touches the result explicitly to mark that the dep change has
been handled.  But rsync blows away that change with the older file, and
helpfully preserves the timestamp.  This repeats on every build.

Now rsync ignores it if the checksum is the same.  Result = faster build.

@wojtek-t @gmarek
2016-10-26 12:42:42 -07:00
deads2k 969e945a9e delete non-generated client 2016-10-26 15:14:41 -04:00
Lucas Käldström 6846e0b48a Remove usage of --reconcile-cidr 2016-10-26 20:26:07 +03:00
Tim Hockin 7aa91bbff6 Use checksum to rsync results
If dependencies are touched, the Makefile will detect that tools like
deepcopy-gen need to be rebuilt.  It will rebuild them, but Go decides the
dependencies are not actually updated (maybe it was a test file - known
limitation of the current Makefile) and does not touch the resulting binary.
Then the Makefile touches the result explicitly to mark thatthe dep change has
been handled.  Then rsync blows away that change with the older file, and
helpfully preserves the timestamp.

Now rsync ignores it if the checksum is the same.  Result = faster build.
2016-10-26 16:30:18 +02:00
Paul Morie ea423110cc Remove SELinux relabel of Kubelet dir from test-e2e-node.sh 2016-10-26 09:38:03 -04:00
Paul Morie 38f6f9b956 Remove SELinux relabel of Kubelet dir from local-up-cluster.sh 2016-10-26 09:38:03 -04:00
Kubernetes Submit Queue fc7f64a99a Merge pull request #35388 from mbohlool/co2
Automatic merge from submit-queue

Add GroupVersion tags to OpenAPI spec and remove all specs except main one

Tags are used as a grouping mechanism in OpenAPI. We generated one spec per GroupVersion before for this grouping but by adding those tags in this PR, those files have no use. We can always add them back if there were a use-case for them.

**Release note**:

```release-note
Deprecate OpenAPI spec for GroupVersion endpoints in favor of single spec /swagger.json
```

Reference: #13414
2016-10-25 21:25:37 -07:00
Kubernetes Submit Queue a898f3d996 Merge pull request #34381 from liggitt/kubelet-auth
Automatic merge from submit-queue

kubelet authn/authz

Implements https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/kubelet-auth.md

Part of [Authenticated/Authorized access to kubelet API](https://github.com/kubernetes/features/issues/89) feature
2016-10-25 17:40:27 -07:00
Tim Hockin b0fa2056a6 Remove 'this is HEAD' warning on docs 2016-10-26 00:06:59 +02:00
mbohlool 75451b49f4 - Add GroupVersion as tags to OpenAPI spec
- Remove all end-point specs as they are not useful in light of GroupVersion tags in main spec
2016-10-25 14:27:48 -07:00
Bowei Du efa3db9f78 Add test image for networking related tests 2016-10-25 13:34:03 -07:00
Ryan Hitchman 78eeb76386 Make hack/update_owners.py get list from local repo, add --check option. 2016-10-25 12:26:21 -07:00
Kubernetes Submit Queue 85207190f5 Merge pull request #35373 from mikedanese/bindata
Automatic merge from submit-queue

add genrule for hack/update-bindata.sh
2016-10-25 11:54:30 -07:00
Kubernetes Submit Queue ebd53c6f76 Merge pull request #35468 from bprashanth/exp_shim_local
Automatic merge from submit-queue

Pass --experimental-runtime-integration-type in local-up-cluster

why not?
2016-10-25 11:02:30 -07:00
Jordan Liggitt 426caf5bd1
Kubelet auth flags 2016-10-25 03:40:08 -04:00
Mike Danese 61bd6aa6a2 remove docs/user-guide from bindata search path 2016-10-24 18:00:08 -07:00
Mike Danese 224e32bcb3 make godep licenses/copyright check case insensitive 2016-10-24 18:00:08 -07:00
Mike Danese 1cd2968917 godep: vendor go-bindata 2016-10-24 18:00:08 -07:00
Mike Danese d380cb1da3 fix realpath issue on mac 2016-10-24 17:10:47 -07:00
bprashanth 9d7c57ff2e Pass --experimental-runtime-integration-type in local-up-cluster 2016-10-24 15:01:45 -07:00
Mike Danese ea632fa813 Revert "disable bazel build"
This reverts commit ee15c80de2.
2016-10-24 14:47:26 -07:00
Mike Danese 27116c6818 rename build/ to build-tools/ 2016-10-24 14:41:56 -07:00
ymqytw c641834bb3 support editing before creating resource 2016-10-24 09:56:37 -07:00
Bowei Du 65966995e9 Update linted_packages 2016-10-22 21:40:08 -07:00
Bowei Du a6550b332e Add verbose mode to boilerplate
hack/verify-boilerplate.sh -v will now print out why the file does
not match along with a diff if possible.

Note: boilerplate.py now has a unit test that is run along with
hack/verify-boilerplate.sh.
2016-10-22 21:40:08 -07:00
Mike Danese ee15c80de2 disable bazel build 2016-10-22 15:50:06 -07:00
mbohlool 3e67cf8b9b Add authentication to openapi Spec 2016-10-22 02:43:42 -07:00
Mike Danese 999c967767 ignore BUILD in the flags-underscore.py validation 2016-10-21 17:32:33 -07:00
Mike Danese b250a8809d don't check BUILD file when verifying godeps 2016-10-21 17:32:33 -07:00
Mike Danese a2eec91a53 add bazel presubmits to verify BUILD files are up to date 2016-10-21 17:32:33 -07:00
Kubernetes Submit Queue e56cfc5322 Merge pull request #35221 from eparis/sort-LC_ALL
Automatic merge from submit-queue

use LC_ALL=C on all sort commands

Most of these don't matter, but this makes it predicable no matter who runs the commands.
2016-10-20 21:27:17 -07:00
Kubernetes Submit Queue 230fe1aeab Merge pull request #34994 from jingxu97/Oct/mounterPathFlag-10-17
Automatic merge from submit-queue

Add `--mounter-path` flag to kubelet that will allow overriding the `mount` command used by kubelet

In order to be able to use new mounter library, this PR adds the
mounterPath flag to kubelet which passes the flag to the mount
interface. If flag is empty, mount uses default mount path.
2016-10-20 17:00:45 -07:00
Kubernetes Submit Queue eff02ce282 Merge pull request #35233 from ixdy/dead-code-cleanup
Automatic merge from submit-queue

Delete some old, dead release code
2016-10-20 16:17:47 -07:00
Jing Xu 34ef93aa0c Add mounterPath to mounter interface
In order to be able to use new mounter library, this PR adds the
mounterPath flag to kubelet which passes the flag to the mount
interface. If flag is empty, mount uses default mount path.
2016-10-20 14:15:27 -07:00
Jeff Grafton c32da484ff Delete some old, dead release code 2016-10-20 13:57:15 -07:00
Eric Paris 9214f8ab4f Make all useage of sort deterministic
Lots of places used sort (or sort -u) but didn't set LC_ALL=C. This
means it could be slightly different on different people's systems. Make
it deterministic.
2016-10-20 16:47:20 -04:00
Kubernetes Submit Queue 29fc947cbb Merge pull request #34770 from lukaszo/curl_flake
Automatic merge from submit-queue

Retry curl when it failed during download

Fixes #34769

For now I'm adding retry only to etcd installation as I saw it recently to fail in one of my PRs. We may change it also in other places if it also happens.
2016-10-20 02:10:27 -07:00
Kubernetes Submit Queue 7007064e1e Merge pull request #35160 from mml/luc-cleanup
Automatic merge from submit-queue

Remove unneeded double quotes from hack/local-up-cluster.sh.
2016-10-19 17:29:12 -07:00
Matt Liggett 1decca8202 Remove unneeded double quotes from hack/local-up-cluster.sh.
They freak out vim syntax highlighting when they are combined with a '/'
character.
2016-10-19 15:12:11 -07:00
Kubernetes Submit Queue 10a0d2a468 Merge pull request #35120 from eparis/hack-sort
Automatic merge from submit-queue

Use LC_ALL=C with sort

In some user env LANG=C might lose:

Wrong:
```
echo -e "test/images/port-forward-tester\ntest/images/porter" | LANG=C sort
test/images/porter
test/images/port-forward-tester
```
Right:
```
echo -e "test/images/port-forward-tester\ntest/images/porter" | LC_ALL=C sort
test/images/port-forward-tester
test/images/porter
```
2016-10-19 08:45:19 -07:00
Eric Paris b670f76232 Use LC_ALL=C with sort
In some user env LANG=C might lose:

Wrong:
```
echo -e "test/images/port-forward-tester\ntest/images/porter" | LANG=C sort
test/images/porter
test/images/port-forward-tester
```
Right:
```
echo -e "test/images/port-forward-tester\ntest/images/porter" | LC_ALL=C sort
test/images/port-forward-tester
test/images/porter
```
2016-10-19 09:47:21 -04:00
Davanum Srinivas 20d1818d78 Enable local-up-cluster.sh to start with the secured port
Generate a kubeconfig for use with controller-manager, kubelet,
scheduler etc. This kubeconfig should use the secure https
port of the api server with appropriate ca cert for the components
to talk to api server.

With this change, one can set API_PORT=0 to completely switch off
insecure access for testing admission controllers etc.

Fixes #33375
2016-10-19 06:36:01 -04:00
Łukasz Oleś 1cda616a9b Retry curl when it failed during download
Fixes #34769
2016-10-19 11:04:49 +02:00
Kubernetes Submit Queue 61e0113019 Merge pull request #34906 from luxas/remove_old_networking
Automatic merge from submit-queue

WIP: Remove the legacy networking mode

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
Removes the deprecated configure-cbr0 flag and networking mode to avoid having untested and maybe unstable code in kubelet, see: #33789

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

**Special notes for your reviewer**: There are a lot of deployments who rely on this networking mode. Not sure how we deal with that: force switch to kubenet or just delete the old deployment?

But please review the code changes first (the first commit)

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Removed the deprecated kubelet --configure-cbr0 flag, and with that the "classic" networking mode as well
```

PTAL @kubernetes/sig-network @kubernetes/sig-node @mikedanese
2016-10-19 01:03:39 -07:00
Kubernetes Submit Queue 2e5303d206 Merge pull request #34612 from jellonek/jell/fix_version_generation
Automatic merge from submit-queue

build: Fix version generation.

This PR provides update to version string generation procedure to handle additional case - working on branch delivered from release tag, instead of working on `-(alpha|beta).no` suffixed tag.

Reason of it is that actually if someone would start working on branch forked from release tag (`v1.4.1` for example), will add some commits and then would try to build k8s/run conformance tests - will end up with broken version string in form similar to `v1.4.1.X+YYYY` where `X` is a dictance/number of commits from base tag and `YYYY` will be first 14 characters from commit hash.
Such version - containing four dotted parts is rejected during conformance tests with error similar to:
```
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:843
Oct 11 12:38:33.726: Failed to get server version: Unable to parse server version "v1.4.1.5+somecommithash": Invalid character(s) found in patch number "1.5"
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/util.go:413
```

This PR provides a cure for this situation creating version string in form `v1.4.1-X+YYYY` which then should be readable for version validation checks. 

Release note:
```release-note
Fix version string generation for local version different from release and not based on `-alpha.no` or `-beta.no` suffixed tag.
```
2016-10-18 21:11:36 -07:00
Clayton Coleman 85368d070b
bump(k8s.io/gengo):4a9ebbace691333e73f9978d798b1bad6c53a50d 2016-10-18 21:07:28 -04:00
Kubernetes Submit Queue 6931fb1830 Merge pull request #34984 from mwielgus/configmap-fed-client
Automatic merge from submit-queue

ConfigMap in federated client

cc: @quinton-hoole @nikhiljindal
2016-10-18 16:21:50 -07:00
Kubernetes Submit Queue 4b7024efe7 Merge pull request #27784 from deads2k/catch-mutators
Automatic merge from submit-queue

add optional mutation checks for shared informer cache

We need to make sure that no one is mutating caches if they're using a shared informer.  It is important that whatever is tracking those changes gets the object *before* anyone else possibly could.

This adds the ability to track the original objects in the cache and their current values.  Go doesn't have an exit hook or a way to say "wait for non-daemon go-funcs to complete before exit", so this runs a gofunc on a loop that can panic the entire process.  It's gated behind an env var.

@derekwaynecarr did I get the right spots to make sure that e2e runs with this flag?
@smarterclayton @kubernetes/rh-cluster-infra
2016-10-18 14:38:57 -07:00
Kubernetes Submit Queue 62cc431920 Merge pull request #34944 from jellonek/mac_compatible_copy
Automatic merge from submit-queue

docs generation: Use macOS compatible copying method

Replace option unknown for bsd version of `cp` used on macOS with compatible between systems replacement.

Closes #34890

```release-note
NONE
```
2016-10-18 11:07:10 -07:00
Kubernetes Submit Queue a5da5c0952 Merge pull request #34946 from jellonek/macos_compatible_copying
Automatic merge from submit-queue

utils: Use macOS copatible copying method

Same as in #34944, releated to #34890

```release-note
NONE
```
2016-10-18 11:07:01 -07:00
Michail Kargakis 12455bf5e1 hack: add test for overlapping selectors in deployments 2016-10-18 17:46:34 +02:00
deads2k aee54ae57e add optional mutation checks for shared informer cache 2016-10-18 09:19:38 -04:00
Kubernetes Submit Queue 6e2f5f8f6d Merge pull request #28742 from jessfraz/test-go1.7rc1
Automatic merge from submit-queue

Update to go 1.7

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

Closes #33070
Closes #32999

```release-note
Updated Go to 1.7
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

This is to test go version 1.7
2016-10-18 05:59:04 -07:00
Piotr Skamruk edd311f7cd docs generation: Use macos compatible copy method
Closes #34890
2016-10-18 11:11:03 +02:00
Piotr Skamruk b45dfd5e8f utils: Use macOS copatible copying method
Same as in #34944, releated to #34890
2016-10-18 11:09:38 +02:00
Kubernetes Submit Queue a47ac1fa30 Merge pull request #34972 from jessfraz/add-remote-settings-to-cp-script
Automatic merge from submit-queue

hack/: update cherry-pick script to have settings to override remote names

**What this PR does / why we need it**: 
it allows you to override the remote names for the cherry-pick script in case you have it named differently
2016-10-18 00:27:21 -07:00
Kubernetes Submit Queue c19569f03f Merge pull request #34502 from fabianofranz/cli_usability_improvements
Automatic merge from submit-queue

Improvements to CLI usability and maintainability

Improves `kubectl` from an usability perspective by

1. Fixing how we handle terminal width in help. Some sections like the flags use the entire available width, while others like long descriptions breaks lines but don't follow a well established max width (screenshot below). This PR adds a new responsive writer that will adjust to terminal width and set 80, 100, or 120 columns as the max width, but not more than that given POSIX best practices and recommendations for better readability.
![terminal_width](https://cloud.githubusercontent.com/assets/158611/19253184/b23a983e-8f1f-11e6-9bae-667dd5981485.png)
2. Adds our own normalizers for long descriptions and cmd examples which allows us better control about how things like lists, paragraphs, line breaks, etc are printed. Features markdown support. Looks like `templates.LongDesc` and `templates.Examples` instead of `dedent.Dedend`.
3. Allows simple reordering and reuse of help and usage sections.
3. Adds `verify-cli-conventions.sh` which intends to run tests to make sure cmd developers are using what we propose as [kubectl conventions](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md). Just a couple simple tests for now but the framework is there and it's easy to extend.
4. Update [kubectl conventions](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md) to use our own normalizers instead of `dedent.Dedent`.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Improves how 'kubectl' uses the terminal size when printing help and usage.
```

@kubernetes/kubectl
2016-10-17 23:41:23 -07:00
Jess Frazelle 954e67906e
hack/: update cherry-pick script to have settings to override remote names
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-17 16:10:49 -07:00
Marcin a333687889 Add config map to federated client 2016-10-17 23:44:16 +02:00
Kubernetes Submit Queue 19e9f7e400 Merge pull request #34958 from euank/local-up-guess-path
Automatic merge from submit-queue

local-up: Add option to guess binary path

This adds a `-O` flag which guesses the right output directory.

The reason for having two flags, not one, is because bash's `getopt` doesn't let you do optional arguments easily, so having both makes the code simpler.

I also removed the redundant empty check; the bash argument check meant that was never hit.

cc @jayunit100 and @jbeda (arbitrary people from the git log)
2016-10-17 12:43:45 -07:00
Euan Kemp 973b417aa5 local-up: Add option to guess binary path 2016-10-17 11:55:29 -07:00
Kubernetes Submit Queue f90deb2bdd Merge pull request #34829 from deads2k/api-25-gc-admission
Automatic merge from submit-queue

add ownerref permission checks

Adds an admission plugin that ensures that anyone adding an `ownerReference` to a resource has delete rights on the resource they're setting up a delete for.

@caesarxuchao example admission plugin that tests for ownerReference diffs and uses an authorizer to drive the decision.

@liggitt @ncdc we've talked about this before
2016-10-17 09:34:31 -07:00
Fabiano Franz 3f7579cacb Tools for checking CLI conventions 2016-10-17 11:50:02 -02:00
deads2k 14c164a328 add ownerref permission checks 2016-10-17 09:38:05 -04:00
Kubernetes Submit Queue 714f816a34 Merge pull request #34719 from errordeveloper/api-and-disco-ports
Automatic merge from submit-queue

Add flags for alternative API and discovery ports

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

We had many issues reported due to the fact that we are using port 443 by default, and we should allow users to override whatever defaults we pick. This doesn't touch on `localhost:8080` yet, which should just generally get rid of.

**Which issue this PR fixes**: fixes #34311 #34307 #33638

**Special notes for your reviewer**: cc @pires 

**Release note**:
```release-note
Add `kubeadm` flags `--api-port` and `--discovery-port`, change default API port to 6443
```
2016-10-17 05:54:38 -07:00
Kubernetes Submit Queue c4f509e65d Merge pull request #32769 from mfojtik/customize-api-path-clientgen
Automatic merge from submit-queue

clientgen: allow to pass custom apiPath when generating client sets

This PR allow to pass the `--clientset-api-path` parameter to clientgen that allows to customize the default API path set in clients. This allows projects like OpenShift to re-use the client with different API path (`/oapi` in our case).
2016-10-17 04:52:04 -07:00
Ilya Dmitrichenko 203d1338f1
Sort known flags 2016-10-17 12:08:11 +01:00
Ilya Dmitrichenko 327dec43fb
Add flags for alternative API and discovery ports (close #34311 #34307 #33638) 2016-10-17 12:08:11 +01:00
Kubernetes Submit Queue 40e1aa6b25 Merge pull request #34542 from Crassirostris/logs-generator
Automatic merge from submit-queue

Add logs generator

@piosz 

Tool to test logging mechanisms, mentioned in #34310
2016-10-17 03:32:31 -07:00
Piotr Skamruk 66a85555a2 build: Fix version generation. 2016-10-17 09:13:22 +02:00
Lucas Käldström 0800df74ab Remove the legacy networking mode --configure-cbr0 2016-10-16 21:26:41 +03:00
Mik Vyatskov 7ab1fc4600 Add logs generator 2016-10-16 16:38:36 +02:00
Kubernetes Submit Queue 3f4c438946 Merge pull request #34836 from mikedanese/prune-1
Automatic merge from submit-queue

kubectl: apply prune should fallback to basic delete when a resource has no reaper

Fixes #34790

cc @kubernetes/kubectl @MrHohn
2016-10-15 18:38:20 -07:00
Kubernetes Submit Queue 9174429776 Merge pull request #33546 from k82cn/k8s_15834
Automatic merge from submit-queue

Updated err message when retrieving resources by name with --all-name…

fixes #15834
2016-10-15 06:50:00 -07:00
Kubernetes Submit Queue c0bd6e8ea5 Merge pull request #33958 from juanvallejo/jvallejo/add-global-timeout-flag
Automatic merge from submit-queue

Add global timeout flag

**Release note**:
```release-note
Add a new global option "--request-timeout" to the `kubectl` client
```

UPSTREAM: https://github.com/kubernetes/client-go/pull/10

This patch adds a global timeout flag (viewable with `kubectl -h`) with
a default value of `0s` (meaning no timeout).

The timeout value is added to the default http client, so that zero
values and default behavior are enforced by the client.

Adding a global timeout ensures that user-made scripts won't hang for an
indefinite amount of time while performing remote calls (right now, remote
calls are re-tried up to 10 times when each attempt fails, however, there is
no option to set a timeout in order to prevent any of these 10 attempts from
hanging indefinitely).

**Example**
```
$ kubectl get pods # no timeout flag set - default to 0s (which means no
timeout)
NAME                      READY     STATUS    RESTARTS   AGE
docker-registry-1-h7etw   1/1       Running   1          2h
router-1-uv0f9            1/1       Running   1          2h

$ kubectl get pods --request-timeout=0 # zero means no timeout no timeout flag set
NAME                      READY     STATUS    RESTARTS   AGE
docker-registry-1-h7etw   1/1       Running   1          2h
router-1-uv0f9            1/1       Running   1          2h

$kubectl get pods --request-timeout=1ms
Unable to connect to the server: net/http: request canceled while
waiting for connection (Client.Timeout exceeded while awaiting headers)
```
2016-10-14 23:29:58 -07:00
Mike Danese c17a8a773d kubectl: apply prune should fallback to basic delete when a resource has no reaper 2016-10-14 15:04:38 -07:00
Klaus Ma 005b8dad14 Updated err message when retrieving resources by name with --all-namespaces. 2016-10-14 22:21:01 +08:00
juanvallejo fd087caadb Add global timeout flag
This patch adds a global timeout flag (viewable with `kubectl -h`) with
a default value of `0s` (meaning no timeout).

The timeout value is added to the default http client, so that zero
values and default behavior are enforced by the client.

**Example**
```
$ kubectl get pods # no timeout flag set - default to 0s (which means no
timeout)
NAME                      READY     STATUS    RESTARTS   AGE
docker-registry-1-h7etw   1/1       Running   1          2h
router-1-uv0f9            1/1       Running   1          2h

$ kubectl get pods --timeout=0 # zero means no timeout no timeout flag set
NAME                      READY     STATUS    RESTARTS   AGE
docker-registry-1-h7etw   1/1       Running   1          2h
router-1-uv0f9            1/1       Running   1          2h

$kubectl get pods --timeout=1ms
Unable to connect to the server: net/http: request canceled while
waiting for connection (Client.Timeout exceeded while awaiting headers)
```
2016-10-14 09:57:40 -04:00
Jacob Tanenbaum 901bbee2fd Add 'kubectl set limit'
Add a way to set resource limits/requests on running pods

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

I squashed the commits to make rebasing easier
Change log:

- fixed a typo that caused the command to be run with kubectl set set instead of the correct kubectl set limit

- added a ResourcesWithPodTemplates to pkg/kubectl/cmd/util/factory.go
     instead of hardcoding these resources move there description all in one place

- Fixing some of the flow control in kubectl set limit

- update the help info

- changed the name of ResourcesWithPodTemplates to ResourcesWithPodSpecs to more accuratly describe what it is doing
    and changed the variable names to lower case to conform to go's variable naming convention

- changing the name of the command from 'set limit' to 'set resources'

- Adding the new file pkg/kubectl/cmd/set/set_resources.go

- changes to the test cases to reflect the change from 'kubectl set limit' to 'kubectl set resources'

- comment removed

- adding the man page to the git repository attempting to fix Jenkins tests

- adding the user guide

- fixed a few typos

- typo in hack/cmd-test.sh

- implamenting suggestions for command help text

- adding the dry-run flag

- removing the "remove" option in favor of zeroing out request/limits in order to remove them

- changed limits/requests to requests/limit

- changing ResourcesWithPodSpec

- updated generated docs and removed whitespace

- change priint on success message from "resource limits/requests updated" to "resource requirements updated"

- minor rebasing issues - 'hack/test-cmd.sh' now passes

- cmdutil.PrintSuccess added another argument

- fixing mungedocs failure

- removed whitespace from hack/make-rules/test-cmd.sh and an erroneous entry from pkg/cloudprovider/providers/openstack/MAINTAINERS.md

- fixed typo in Short: field of the cobra command

- rebased

- Creating a new factory in the ResourcesWithPodSpecs() so that the testing will pass

- changing ResourcesWithPodSpecs, it doesn't need to be a method of factory
2016-10-14 08:35:32 -04:00
Kubernetes Submit Queue d7c0eb322c Merge pull request #34276 from freehan/cri-runtime-config
Automatic merge from submit-queue

add UpdateRuntimeConfig interface

Expose UpdateRuntimeConfig interface in RuntimeService for kubelet to pass a set of configurations to runtime. Currently it only takes PodCIDR.

The use case is for kubelet to pass configs to runtime. Kubelet holds some config/information which runtime does not have, such as PodCIDR. I expect some of kubelet configurations will gradually move to runtime, but I believe cases like PodCIDR, which dynamically assigned by k8s master, need to stay for a while.
2016-10-13 23:10:42 -07:00
Jess Frazelle 20db0ad0ab
fix unit test for TLS and linted packages
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-13 21:19:18 -07:00
Jess Frazelle 3193174142
Remove go patches for darwin
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-13 21:12:15 -07:00
Jess Frazelle 3803fee972
Update to go1.7.1
Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-10-13 21:12:15 -07:00
Kubernetes Submit Queue ff06372a11 Merge pull request #34749 from david-mcmahon/cache-fix
Automatic merge from submit-queue

Increase job cache limit to 300 and leave a TODO.
2016-10-13 19:08:01 -07:00
Kubernetes Submit Queue 819f92c9e2 Merge pull request #34745 from ixdy/verify-generated-verbosity
Automatic merge from submit-queue

Increase build verbosity for verify-generated-{protobuf,runtime}.sh

Print out more details of the build process to help with debugging #34675.
2016-10-13 15:03:01 -07:00
Kubernetes Submit Queue a944748ccb Merge pull request #34341 from apprenda/kubeadm-require-root
Automatic merge from submit-queue

kubeadm implement preflight checks

Checks that user running kubeamd init and join is root and will only execute
command if user is root. Moved away from using kubectl error handling to
having kubeadm handle its own errors. This should allow kubeadm to have
more meaningful errors, exit codes, and logging for specific kubeadm use
cases.

fixes #33908
2016-10-13 15:02:53 -07:00
Kubernetes Submit Queue f638a87b47 Merge pull request #34619 from deads2k/rbac-13-local-up
Automatic merge from submit-queue

add flag for enabling RBAC on local-up-cluster

Enables cases like `ALLOW_ANY_TOKEN=true ENABLE_RBAC=true hack/local-up-cluster.sh ` to startup an api server so you can test RBAC against it.

@pweil- You can try this using `oc login localhost:6443 --token=username/group1,group2,system:masters`.  Then you should have full rights.  You can use `oc login --token=username` or `kubectl create -f - --token=otheruser/othergroup` to simulate other users.
2016-10-13 13:58:50 -07:00
Jeff Grafton 809e528d96 Increase build verbosity for rsync operations in verify-generated-{protobuf,runtime}.sh 2016-10-13 13:40:07 -07:00
David McMahon c5a61a6f99 Increase job cache limit to 300 and leave a TODO. 2016-10-13 12:09:06 -07:00
Devan Goodwin 4231c046dd Fix errors and improve output in kubeadm pre-flight checks.
Add skip-preflight-checks to known flags.
Fix bug with preflight checks not returning system is-active as errors.
Fix error handling to use correct function.
2016-10-13 11:10:19 -03:00
Kubernetes Submit Queue 6a2f0932e4 Merge pull request #33379 from grosskur/kube-dns-bind-address
Automatic merge from submit-queue

kube-dns: Add --dns-bind-address flag

Currently, `kube-dns` always binds to `0.0.0.0` when starting the SkyDNS server. Sometimes it's useful to have it bind to a different address for testing. So add a new `--dns-bind-address` flag that can be used to configure this (default is `0.0.0.0`).
2016-10-13 06:26:27 -07:00
Kubernetes Submit Queue 50f689f596 Merge pull request #34128 from spxtr/nodeinfo
Automatic merge from submit-queue

Do a kubectl get nodes after turning up the e2e cluster.

https://github.com/kubernetes/test-infra/issues/366
2016-10-13 05:37:02 -07:00
Minhan Xia 480bcb9760 add UpdateRuntimeConfig interface 2016-10-12 22:33:58 -07:00
Kubernetes Submit Queue adfbe8d952 Merge pull request #33629 from mbohlool/o2
Automatic merge from submit-queue

Generate unique Operation IDs for root OpenAPI spec

This PR adds a customization method GetOperationID to OpenAPI spec generation and then use it to make sure root spec has unique operation IDs by mostly adding GroupVersion to the start of operation ID.
2016-10-12 21:06:24 -07:00
mbohlool 5ba06cf2bc Make Kubernetes OpenAPI operation IDs unique 2016-10-12 14:54:12 -07:00
Mike Danese 25e4dccefe kubeadm: fix conversion macros and add kubeadm to round trip testing 2016-10-12 13:26:23 -07:00
deads2k 127e335802 add flag for enabling RBAC on local-up-cluster 2016-10-12 11:32:09 -04:00
Kubernetes Submit Queue 12b133577e Merge pull request #33278 from Crassirostris/gcl-e2e-test
Automatic merge from submit-queue

Add gcl cluster logging test

This PR changes default logging destination for tests to gcp and adds test for cluster logging using google cloud logging

Fix #20760
2016-10-12 06:54:25 -07:00
Wojciech Tyczynski 1cfbb446c8 Try to bring down cluster in case of failure 2016-10-12 10:54:04 +02:00
Kubernetes Submit Queue 894d8605dc Merge pull request #34415 from colemickens/colemickens-hack-hyperkube
Automatic merge from submit-queue

Fix hack/dev-push-hyperkube.sh

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: This fixes `hack/dev-push-hyperkube.sh`. It simplifies/standardizes its usage and fixes it for the changes to the build system.
2016-10-11 03:15:38 -07:00
Mik Vyatskov b9c72ee1cb Add gcl cluster logging test 2016-10-11 09:36:11 +02:00
Kubernetes Submit Queue 580f0ec159 Merge pull request #34387 from m1093782566/m109-fix-bindata
Automatic merge from submit-queue

Add hint message for go-bindata

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

Add hint message for go-bindata
2016-10-10 23:53:50 -07:00
Kubernetes Submit Queue 6af180b0d7 Merge pull request #34019 from deads2k/rbac-12-default-bindings
Automatic merge from submit-queue

Add default cluster role bindings

Add default cluster roles bindings to rbac bootstrapping.  Also adds a case for allowing escalation when you have no authenticator.

@liggitt I expect you may need to make peace with this.
2016-10-10 23:53:34 -07:00
Kubernetes Submit Queue 6656929b15 Merge pull request #34153 from zmerlynn/log-dump-optionally-use-kubectl
Automatic merge from submit-queue

log-dump.sh: Add a LOG_DUMP_USE_KUBECTL mode, refactor

**What this PR does / why we need it**: This refactors log-dump.sh so that it can optionally just use `"kubectl get node"` output, for dumping logs off a cluster that was brought up using something other than kube-up.sh (e.g. kops or kubeadm).

Note that for obvious reasons, if the cluster is fried, it'll probably fail to hit the apiserver and all bets are off, but for the 95% case where you're debugging tests, this is good. To cover the remaining 5%, you could actually squirrel away the relevant external IPs after the e2e.go:Up stage (because we better be able to hit the apiserver then) and fetch them from cache later.

**Special notes for your reviewer**: Sorry for so many changes. :)
2016-10-10 16:20:20 -07:00
Zach Loafman 4338351be2 log-dump.sh: Add a LOG_DUMP_USE_KUBECTL mode, refactor
This refactors log-dump.sh so that it can optionally just use "kubectl
get node" output, for dumping logs off a cluster that was brought up
using sometihng other than kube-up.sh (e.g. kops or kubeadm).

Note that for obvious reasons, if the cluster is fried, it'll probably
fail to hit the apiserver and all bets are off, but for the 95% case
where you're debugging tests, this is good. To cover the remaining 5%,
you could actually squirrel away the relevant external IPs after the
e2e.go:Up stage (because we better be able to hit the apiserver then)
and fetch them from cache later.
2016-10-10 13:41:49 -07:00
deads2k f73d1ea90a make sure that the bootstrap rbac rules are getting created in test-cmd 2016-10-10 15:00:36 -04:00
Kubernetes Submit Queue cf707989b3 Merge pull request #34260 from jessfraz/ocd-about-cherry-pick-script
Automatic merge from submit-queue

hack: update cherry-pick script to show subject when patch is split

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

This is a continuation of #34049, which worked, but then I realized some patch files have more than one subject, see example: https://github.com/kubernetes/kubernetes/pull/34228

This cleans the output so it looks like this:

```
Automated cherry pick of #32593

Cherry pick of #32593 on release-1.4.

#32593: Fix audit_test regex for iso8601 timestamps
```

pretty!!!

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

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->

Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-10 11:00:35 -07:00
Kubernetes Submit Queue 3c9600e4c4 Merge pull request #32154 from jessfraz/listen-for-signal-hack-e2e
Automatic merge from submit-queue

hack/e2e.go: listen for Interrupt signal and attempt cleanup if run with --down

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: adds a listener on ^C, so if `hack/e2e.go` is run with `--down` and the user ^C, then it will attempt to cleanup the resources.

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

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
NONE
```



Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-10-10 08:10:26 -07:00
Michail Kargakis 75f30ec46f kubectl: add --revision flag in rollout status 2016-10-10 15:04:46 +02:00
Kubernetes Submit Queue 42392fea3c Merge pull request #34009 from wojtek-t/upgrade_etcd_image
Automatic merge from submit-queue

Support upgrade/downgrade in etcd image.

Ref #22448 #20504
2016-10-10 01:05:35 -07:00
Wojciech Tyczynski e54bc86ab3 Support upgrade/downgrade in etcd image. 2016-10-10 08:40:59 +02:00
Cole Mickens 19b5ca791c hack: fix dev-push-hyperkube.sh 2016-10-09 07:19:30 -07:00
Kubernetes Submit Queue 0603af42c6 Merge pull request #34001 from mbohlool/h2o
Automatic merge from submit-queue

Generate and store federation OpenAPI spec in source tree

A follow up of #33628 to also add federation spec to source tree.
2016-10-08 17:46:51 -07:00
Kubernetes Submit Queue de55cb85ab Merge pull request #34359 from ixdy/build-gcs-dir-suffix
Automatic merge from submit-queue

Add support for adding a suffix to the GCS upload dir in jenkins/build

Second step of fixing kubernetes/test-infra#670. Sequences after https://github.com/kubernetes/release/pull/135.

cc @luxas
2016-10-08 15:50:14 -07:00
Kubernetes Submit Queue a99adcdf49 Merge pull request #34343 from mikedanese/prune-tests
Automatic merge from submit-queue

kubectl: add two more test of kubectl apply --prune

@pwittrock
2016-10-08 14:29:56 -07:00
m1093782566 de54d7efef add hint message for bindata
Change-Id: I295cd6819d41bf87a6379bfab3ae1f2a8819ed55
2016-10-08 16:41:57 +08:00
Kubernetes Submit Queue 5562715ae5 Merge pull request #34249 from kargakis/retain-old-revisions
Automatic merge from submit-queue

controller: save older revisions for Deployment's replica sets

@jwforres the only usable way  I could find for multiple old revisions for a single replica set is to stuff them as comma-separated values.

@kubernetes/deployment this retains old revisions served by a replica set inside an annotation.

Fixes https://github.com/kubernetes/kubernetes/issues/33844
2016-10-08 01:32:47 -07:00
Kubernetes Submit Queue 7790e5e566 Merge pull request #34275 from bvandewalle/bindAddressParameter
Automatic merge from submit-queue

user-parameter support for API_BIND_ADDRESS in local-up-cluster.sh

**What this PR does / why we need it**:
Fixes #34262. 
user-parameter for the secure api bind address when running a local dev cluster.
Default bind-address is `0.0.0.0` if not specified by the user. I'm guessing this was the intended behaviour of the original code.

Allow to reach the secure API on different interfaces/IPs when running a dev local-up-cluster.
2016-10-08 00:38:57 -07:00
Kubernetes Submit Queue 2ecd96100e Merge pull request #33783 from derekwaynecarr/phase-1-pod-cgroups
Automatic merge from submit-queue

Add cgroup-driver and cgroups-per-qos flags to kubelet

Add the flags needed to support pod-level cgroups to kubelet.

/cc @vishh @dchen1107 @dubstack
2016-10-07 17:56:01 -07:00
Jeff Grafton f8ea21328f Add support for adding a suffix to the GCS upload dir in jenkins/build 2016-10-07 13:59:43 -07:00
Jess Frazelle da786a8dc5
hack/e2e.go: listen for Interrupt signal and attempt cleanup if using --down
Signed-off-by: Jess Frazelle <me@jessfraz.com>
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-07 13:06:54 -07:00
Mike Danese 6d17a87809 kubectl: add two more test of kubectl apply --prune 2016-10-07 10:30:41 -07:00
Kubernetes Submit Queue 3be8e3e44b Merge pull request #33981 from freehan/e2e-deletens-on-failure
Automatic merge from submit-queue

add delete-namespace-on-failure flag

I have been doing this for a while. 

Setting `--delete-namespace=false --clean-start=true` only works if you have only one e2e test running in a loop. 

This PR lets someone to set `delete-namespace-on-failure=false` and run multiple tests in parallel and preserve the crime scene. It makes it easier to reproduce failures. 

Let me know if this is worth it or there are some other tricks I am not aware.
2016-10-07 04:34:27 -07:00
Michail Kargakis 89eaa918be controller: save older revisions for Deployment's replica sets 2016-10-07 11:45:06 +02:00
Kubernetes Submit Queue a89e4785ba Merge pull request #31949 from asalkeld/fix-coverage
Automatic merge from submit-queue

Ignore troublesome paths that cause coverage to fail

**What this PR does / why we need it**:
`KUBE_COVER=y make check` currently fails, this patch fixes it.

**Which issue this PR fixes** 
fixes #31691

**Special notes for your reviewer**:
None

**Release note**:

```release-note
NONE
```

This avoids the whole command failing because of errors like the following:
```
# cover k8s.io/kubernetes/pkg/client/restclient
cover: internal error: block 268 overlaps block 270
```
2016-10-07 02:40:07 -07:00
Kubernetes Submit Queue 83921597ef Merge pull request #29236 from juanvallejo/jvallejo_add-configuration-missing-error-type
Automatic merge from submit-queue

Update client config invalid option errors to be more specific

This patch adds better error handling for cases where a global option (such as --context or --cluster) causes an invalid config to be returned.

```release-note
release-note-none
```
2016-10-07 01:24:49 -07:00
Mike Danese 62960aace7 add a test for kubectl apply --prune 2016-10-06 17:49:02 -07:00
Bernard Van De Walle f1b1c92ada adding paraneter for API_BIND_ADDRESS in local-up-cluster.sh. Default value is 0.0.0.0 2016-10-06 14:30:29 -07:00
juanvallejo 6f925b1f82
handle invalid client config option errors
This patch provides a more relevant error message when a client
configuration option is passed with an invalid or non-existent value.

`$ kubectl get pods --cluster="non-existent"`
```
error: No configuration file found, please login or point to an existing
file
```

`$ kubectl get pods --cluster="non-existent"`
```
error: cluster "non-existent" does not exist
```
2016-10-06 16:28:51 -04:00
mbohlool 628d6f56b9 Add script to generate and store federation openapi spec in source tree 2016-10-06 13:10:01 -07:00
Jess Frazelle 81e99fad98 hack: update cherry-pick script to show subject when patch is split
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-06 11:50:39 -07:00
Kubernetes Submit Queue cfbb5e1040 Merge pull request #34150 from mbohlool/co2
Automatic merge from submit-queue

Fix a typo in openapi spec generation

A typo in util.sh resulted in the wrong spec stored in source tree. The commit should be explanatory.
2016-10-06 08:44:59 -07:00
Michal Fojtik aea9b486a0 clientgen: allow to pass custom apiPath when generating client sets 2016-10-06 11:27:29 +02:00
Wojciech Tyczynski 0e61d817c5 Start testing etcd2->etcd3 migration in test-update-storage-objects 2016-10-06 09:32:49 +02:00
Wojciech Tyczynski 19e50d56dc Run integration tests with 3.0.10 etcd underneath 2016-10-06 09:32:49 +02:00
Kubernetes Submit Queue 63139f937c Merge pull request #30787 from jbeda/rsync
Automatic merge from submit-queue

Speed up dockerized builds

This PR speeds up dockerized builds.  First, we make sure that we are as incremental as possible.  The bigger change is that now we use rsync to move sources into the container and get data back out.

To do yet:
* [x] Add a random password to rsync.  This is 128bit MD4, but it is better than nothing.
* [x] Lock down rsync to only come from the host.
* [x] Deal with remote docker engines -- this should be necessary for docker-machine on the mac.
* [x] Allow users to specify the port for the rsync daemon.  Perhaps randomize this or let docker pick an ephemeral port and detect the port?
* [x] Copy back generated files so that users can check them in.  This is done for `zz_generated.*` files generated by `make generated_files` 
  * [x] This should include generated proto files so that we can remove the hack-o-rama that is `hack/hack/update-*-dockerized.sh` 
* [x] Start "versioning" the build container and the data container so that the CI system doesn't have to be manually kicked.
* [x] Get some benchmarks to qualify how much faster.

This replaces #28518 and is related to #30600.

cc @thockin @spxtr @david-mcmahon @MHBauer 

Benchmarks by running `make clean ; sync ; time bash -xc 'time build/make-build-image.sh ; time sync ; time build/run.sh make ; time sync; time build/run.sh make'` on a GCE n1-standard-8 with PD-SSD.

| setup | build image | sync | first build | sync | second build | total |
|-------|-------------|----- |----------|------|--------------|------|
| baseline | 0m11.420s | 0m0.812s | 7m2.353s | 0m42.380s | 7m8.381s | 15m5.348s |
| this pr | 0m10.977s | 0m15.168s | 7m31.096s | 1m55.692s | 0m16.514s | 10m9.449s |
2016-10-05 19:51:09 -07:00
Kubernetes Submit Queue 7766b408b8 Merge pull request #31467 from vmware/fix-vsphere-cloud-provider.kerneltime
Automatic merge from submit-queue

Add support for vpshere cloud provider in kubeup

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
vSphere cloud provider added in 1.3 was not configured when deploying via kubeup

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

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Add support for vSphere Cloud Provider when deploying via kubeup on vSphere.
```

When deploying on vSphere using kube up add configuration
for vSphere cloud provider.
2016-10-05 19:12:17 -07:00
Ritesh H Shukla ea22d0cc5f Update exceptions list for underscores introduced in kubeup for vSphere. 2016-10-05 16:57:33 -07:00
mbohlool 4ed8328e8d Fix a typo in util.sh that resulted in wrong openapi spec generation 2016-10-05 15:59:38 -07:00
Kubernetes Submit Queue 05192d9d57 Merge pull request #33319 from juanvallejo/jvallejo/add-option-to-set-nodeport
Automatic merge from submit-queue

Add option to set a service nodeport

**Release note**:
```release-note
Add kubectl --node-port option for specifying the service nodeport
```

This patch adds the option to set a nodeport when creating a NodePort
service. In case of a port allocation error due to a specified port
being out of the valid range, the error now includes the valid
range. If a `--node-port` value is not specified, it defaults to zero, in
which case the allocator will default to its current behavior of
assigning an available port.

This patch also adds a new helper function in `cmd/util/helpers.go` to
retrieve `Int32` cobra flags.

**Example**
```
# create a nodeport service with an invalid port
$ kubectl create service nodeport mynodeport --tcp=8080:7777 --node-port=1
The Service "mynodeport" is invalid: spec.ports[0].nodePort: Invalid
value: 1: provided port is not in the valid range. Valid ports range
from 30000-32767

# create a nodeport service with a valid port
$ kubectl create service nodeport mynodeport --tcp=8080:7777 --node-port=30000
service "mynodeport" created

# create a nodeport service with a port already in use
$ kubectl create service nodeport mynodeport --tcp=8080:7777 --node-port=30000
The Service "mynodeport" is invalid: spec.ports[0].nodePort: Invalid value: 3000: provided port is already allocated

$ kubectl describe service mynodeport
Name:                   mynodeport
Namespace:              default
Labels:                 app=mynodeport
Selector:               app=mynodeport
Type:                   NodePort
IP:                     172.30.81.254
Port:                   8080-7777       8080/TCP
NodePort:               8080-7777       30000/TCP
Endpoints:              <none>
Session Affinity:       None
No events.
```

@fabianofranz
2016-10-05 15:00:32 -07:00
Kubernetes Submit Queue a516ec3085 Merge pull request #34129 from mwielgus/daemonset-client
Automatic merge from submit-queue

Daemonset in federated clientset

Only hack/update-codegen.sh was edited manually.

cc: @nikhiljindal @quinton-hoole @kubernetes/sig-cluster-federation
2016-10-05 13:09:10 -07:00
Joe Finney d5e0b1cf84 Dump node info after cluster up. 2016-10-05 12:46:43 -07:00
Kubernetes Submit Queue d4088fc47b Merge pull request #34020 from juanvallejo/jvallejo/allow-empty-annotation-values
Automatic merge from submit-queue

Allow empty annotation values

Related downstream issue: https://github.com/openshift/origin/issues/11175

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

Annotations with empty values can be used, for example, in diagnostics
logging. This patch removes the client-side check for empty values in
an annotation key-value pair.

**Before**
```
$ kubectl annotate pod zookeeper-1 node-selector="" --overwrite
error: invalid annotation format: node-selector=
```

**After**
```
$ kubectl annotate pod zookeeper-1 node-selector="" --overwrite
pod "zookeper-1" annotated
```

```
$ kubectl get po/zookeeper-1 --template='{{.metadata.annotations}}'
map[... node-selector: test-label:test]
```

@fabianofranz @liggitt
2016-10-05 11:48:02 -07:00
Marcin 64d5335f98 Daemonset in federated clientset 2016-10-05 19:58:49 +02:00
derekwaynecarr 0071cca51e Add generated code for kubelet flags 2016-10-05 13:48:37 -04:00
juanvallejo a872657371
Allow empty annotation values
Annotations with empty values can be used, for example, in diagnostics
logging. This patch removes the client-side check for empty values in
an annotation key-value pair.

**Before**
```
$ kubectl annotate pod zookeeper-1 node-selector="" --overwrite
error: invalid annotation format: node-selector=
```

**After**
```
$ kubectl annotate pod zookeeper-1 node-selector="" --overwrite
pod "zookeper-1" annotated
```

```
$ kubectl get po/zookeeper-1 --template='{{.metadata.annotations}}'
map[... node-selector: test-label:test]
```
2016-10-05 13:17:08 -04:00