Commit Graph

638 Commits (8c595af962a4557c5d19d224153f0b111c8ec50e)

Author SHA1 Message Date
yuexiao-wang 142c2dd67b Adjust the validating messages
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-09-21 09:58:50 +08:00
juanvallejo de21640573
add/update tests
Move negative check for testing "not patched" output to test-cmd-util.sh
as exiting with code 1 was causing patch_test.go to fail when the error
was expected as part of the test.
2017-09-14 16:23:23 -04:00
Shiyang Wang 87abe13022 fix return 0 error in DefaultSubCommandRun 2017-09-13 10:26:51 +08:00
Jordan Liggitt a6316fb3a5
Fix discovery restmapper finding resources in non-preferred versions 2017-09-08 22:35:23 -04:00
Kubernetes Submit Queue ee4e4a5418 Merge pull request #51186 from dixudx/fix_delete_uninitialized_resources
Automatic merge from submit-queue (batch tested with PRs 51186, 50350, 51751, 51645, 51837)

fix bug on kubectl deleting uninitialized resources

**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 #51185

**Special notes for your reviewer**:
/assign @caesarxuchao @ahmetb 

**Release note**:

```release-note
fix bug on kubectl deleting uninitialized resources
```
2017-09-05 17:29:59 -07:00
Maciej Szulik 6962427b35
Enable batch/v1beta1.CronJobs by default 2017-09-03 11:17:33 +02:00
Kubernetes Submit Queue 5c0b265a9b Merge pull request #50497 from dixudx/kubectl-include-uninitialized
Automatic merge from submit-queue (batch tested with PRs 51301, 50497, 50112, 48184, 50993)

Introduce new flag "--include-uninitialized" to kubectl

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

Introduce `--include-uninitialized` as a global flag to kubectl

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

**Special notes for your reviewer**:
/assign @caesarxuchao @smarterclayton @ahmetb @deads2k 

**Release note**:

```release-note
Add flag "--include-uninitialized" to kubectl annotate, apply, edit-last-applied, delete, describe, edit, get, label, set. "--include-uninitialized=true" makes kubectl commands apply to uninitialized objects, which by default are ignored if the names of the objects are not provided. "--all" also makes kubectl commands apply to uninitialized objects. Please see the [initializer](https://kubernetes.io/docs/admin/extensible-admission-controllers/) doc for more details.
```
2017-09-02 23:50:00 -07:00
Kubernetes Submit Queue bd813ce089 Merge pull request #51058 from thockin/codegen-dbg
Automatic merge from submit-queue (batch tested with PRs 51666, 49829, 51058, 51004, 50938)

Add debugging to the codegen process

This was useful when debugging a different problem.
2017-09-02 22:52:06 -07:00
Kubernetes Submit Queue a3aac42b9a Merge pull request #51636 from deads2k/cli-01-reconcile
Automatic merge from submit-queue (batch tested with PRs 50832, 51119, 51636, 48921, 51712)

add reconcile command to kubectl auth

This pull exposes the RBAC reconcile commands through `kubectl auth reconcile -f FILE`.  When passed a file which contains RBAC roles, rolebindings, clusterroles, or clusterrolebindings, it will compute covers and add the missing rules.

The logic required to properly "apply" rbac permissions is more complicated that a json merge since you have to compute logical covers operations between rule sets.  This means that we cannot use `kubectl apply` to update rbac roles without risking breaking old clients (like controllers).

To solve this problem, RBAC created reconcile functions to use during startup for "stock" roles.  We want to offer this power to users who are running their own controllers and extension servers.

This is an intersection between @kubernetes/sig-auth-misc and @kubernetes/sig-cli-misc
2017-09-02 19:26:25 -07:00
Antoine Pelisse 9287eb0c3e Change default validation to openapi
And also update the test to match the new error string.
2017-09-01 08:44:36 -07:00
Di Xu d80ff0f60c test fix 2017-09-01 15:05:00 +08:00
Di Xu 5e120cfc68 add tests 2017-09-01 10:46:13 +08:00
Antoine Pelisse d7eec6b51d Revert "Enable batch/v1beta1.CronJobs by default" 2017-08-31 09:54:16 -07:00
Di Xu 8a6a25f5f0 add tests 2017-08-31 16:31:02 +08:00
Kubernetes Submit Queue ffcd6d1dce Merge pull request #51465 from soltysh/cronjob_beta
Automatic merge from submit-queue (batch tested with PRs 50775, 51397, 51168, 51465, 51536)

Enable batch/v1beta1.CronJobs by default

This PR moves to CronJobs beta entirely, enabling `batch/v1beta1` by default.

Related issue: #41039 

@erictune @janetkuo ptal

```release-note
Promote CronJobs to batch/v1beta1.
```
2017-08-30 15:14:32 -07:00
David Eads aa637502e0 add reconcile command to kubectl auth 2017-08-30 16:04:00 -04:00
Kubernetes Submit Queue 04bc4ec716 Merge pull request #50398 from pci/gcloud-compute-list
Automatic merge from submit-queue (batch tested with PRs 47054, 50398, 51541, 51535, 51545)

Switch away from gcloud deprecated flags in compute resource listings

**What is fixed**

Remove deprecated `gcloud compute` flags, see linked issue.

**Which issue this PR fixes**:

fixes #49673 

**Special notes for your reviewer**:

The change in `gcloudComputeResourceList` in `test/e2e/framework/ingress_utils.go` isn't strictly needed as currently no affected resources are called on within that file, however the function has the _potential_ to access affected resources so I covered it as well. Happy to change if deemed unnecessary.

**Release note**:

```release-note
NONE
```
2017-08-30 01:51:29 -07:00
Kubernetes Submit Queue 4d5fc46536 Merge pull request #50998 from zjj2wry/set-env
Automatic merge from submit-queue (batch tested with PRs 51377, 46580, 50998, 51466, 49749)

feat(#21648 )Add kubectl set env command.

**What this PR does / why we need it**:
#21648
Moved from OpenShift to Kubenetes.
@kargakis @smarterclayton 

**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-08-29 22:57:06 -07:00
Philip Ingrey 697f92a5d2
Switch away from gcloud deprecated flags in compute resource listings 2017-08-30 06:41:09 +01:00
Maciej Szulik 2de214b044
Enable batch/v1beta1.CronJobs by default 2017-08-29 09:31:39 +02:00
ymqytw 838c47ee10 add apply test for retainKeys 2017-08-28 16:37:23 -07:00
zhengjiajin f441de6be8 Add bash test for kubectl scale --selector and --all 2017-08-27 15:42:20 +08:00
Tim Hockin e73b27cbce Add debugging to the codegen process 2017-08-25 14:08:42 -07:00
Kubernetes Submit Queue c19785cfea Merge pull request #49674 from crimsonfaith91/rollout
Automatic merge from submit-queue (batch tested with PRs 50033, 49988, 51132, 49674, 51207)

StatefulSet kubectl rollout command

**What this PR does / why we need it**: This PR implements StatefulSet kubectl rollout command, covering `history`, `status`, and `undo`.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
kubectl rollout `history`, `status`, and `undo` subcommands now support StatefulSets.
```
2017-08-25 11:07:15 -07:00
zhengjiajin 04be0131d0 Add bash test for kubectl set env command 2017-08-25 20:37:46 +08:00
crimsonfaith91 ebdbafd2c5 statefulSet kubectl rollout command 2017-08-24 16:43:03 -07:00
Kubernetes Submit Queue 05e7f6d073 Merge pull request #50948 from mengqiy/add_junit_location
Automatic merge from submit-queue

output junit report dir in cmd test

Output junit report dir for easier debug locally, otherwise people need to dive into the code to find the junit report dir. This will save people's time.

```release-note
None
```
2017-08-24 12:25:24 -07:00
ymqytw 4dba473190 output junit dir for easier debug 2017-08-23 11:29:52 -07:00
Kubernetes Submit Queue d5ab597eb3 Merge pull request #49935 from xiangpengzhao/remove-dep-alias
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

Remove deprecated kubectl command aliases

**What this PR does / why we need it**:
These command aliases have been deprecated for more than two years. It's time to remove them.

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

**Special notes for your reviewer**:
/sig cli

**Release note**:

```release-note
Remove deprecated kubectl command aliases `apiversions, clusterinfo, resize, rollingupdate, run-container, update`
```
2017-08-22 19:45:34 -07:00
Kubernetes Submit Queue d543a7c7ce Merge pull request #50765 from sttts/sttts-kube-gen-rename
Automatic merge from submit-queue

Rename k8s.io/{kube-gen -> code-generator}
2017-08-18 01:06:45 -07:00
Kubernetes Submit Queue 89abb48f7e Merge pull request #50823 from zjj2wry/set-image
Automatic merge from submit-queue (batch tested with PRs 50277, 50823, 50376, 50867)

fix issue(#50821)Add image check, if image not changed, transform false

**What this PR does / why we need it**:
closes #50821 
**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-08-17 22:24:23 -07:00
zhengjiajin a8c68d9211 add cmd test kubectl set image 2017-08-18 09:39:07 +08:00
Dr. Stefan Schimanski e3a3d108fb Fixup after k8s.io/{kube-gen -> code-generator} rename 2017-08-17 17:55:12 +02:00
Jeffrey Regan dbc22ad6fd Remove kubectl's dependence on schema file in pkg/api/validation.
**What this PR does / why we need it**:

Makes functions in validation/schema.go private to kubectl,
further isolating kubectl.

**Which issue this PR fixes**

Part of a series of PRs to address kubernetes/community#598

**Release note**:
```release-note
NONE
```
2017-08-16 16:38:28 -07:00
Maciej Szulik 43b8715d82
Promote CronJobs to batch/v1beta1 2017-08-16 08:42:21 +02:00
Shiyang Wang 1010916c1a add cmd-test for sort-by command 2017-08-11 15:53:31 +08:00
Kubernetes Submit Queue 190ee708a6 Merge pull request #48659 from shiywang/fix-sort
Automatic merge from submit-queue

Fix sort-by output problem

Fixes https://github.com/kubernetes/kubectl/issues/43

This bug was original introduced in pr here: https://github.com/kubernetes/kubernetes/pull/46265, I think next time if we touch something printer related package, maybe should let @smarterclayton have a review, although he is pretty busy I guess : ) and that package also changed a lot recently since he's been working on refactoring.
 
this is a quick and dirty fix, not sure if there's better way, I will add some regression test soon...

@kubernetes/sig-cli-pr-reviews 

```release-note
NONE
```

/assign @mengqiy 
/assign @smarterclayton
2017-08-09 10:56:49 -07:00
Kubernetes Submit Queue dd819b5013 Merge pull request #49886 from ironcladlou/int-test-logging
Automatic merge from submit-queue (batch tested with PRs 49992, 48861, 49267, 49356, 49886)

Set default vmodule flag in integration tests

Re-introduce a default glog vmodule flag to the integration test setup.
The default was removed in d08dfb9 because it was hard-coded and
prevented local override. This commit makes the default overridable.

```release-note
NONE
```

/cc @caesarxuchao
2017-08-02 05:16:07 -07:00
xiangpengzhao d6aca27b53 Remove deprecated kubectl command aliases 2017-08-02 03:08:48 -04:00
Kubernetes Submit Queue 6eea28381e Merge pull request #49720 from dhilipkumars/verifyAllFix
Automatic merge from submit-queue (batch tested with PRs 46519, 49794, 49720, 49692, 49821)

[make verify] Display list of failed tests to the user at the end

**What this PR does / why we need it**:
Minor improvement to verify all script as it now displays list of failed tests at the end, makes it easier for fixing errors
```
$KUBE_VERIFY_GIT_BRANCH=someBranch hack/make-rules/verify.sh -v -Q
.
.
.
========================
FAILED TESTS
========================
hack/make-rules/../../hack/verify-boilerplate.sh
hack/make-rules/../../hack/verify-godep-licenses.sh
hack/make-rules/../../hack/verify-readonly-packages.sh
```

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-08-01 03:04:44 -07:00
Dan Mace a98801c100 Set default vmodule flag in integration tests
Re-introduce a default glog vmodule flag to the integration test setup.
The default was removed in d08dfb9 because it was hard-coded and
prevented local override. This commit makes the default overridable.
2017-07-31 14:06:46 -04:00
Dan Mace d08dfb92c7 Enable garbage collection of custom resources
Enhance the garbage collector to periodically refresh the resources it
monitors (via discovery) to enable custom resource definition GC.

This implementation caches Unstructured structs for any kinds not
covered by a shared informer. The existing meta-only codec only supports
compiled types; an improved codec which supports arbitrary types could
be introduced to optimize caching to store only metadata for all
non-informer types.
2017-07-28 10:00:10 -04:00
Kubernetes Submit Queue 8f8b9fa971 Merge pull request #47267 from fabianofranz/kubectl_plugins_v1_part3
Automatic merge from submit-queue (batch tested with PRs 49619, 49598, 47267, 49597, 49638)

Flag support in kubectl plugins

Adds support to flags in `kubectl` plugins. Flags are declared in the plugin descriptor and are passed to plugins through env vars, similar to global flags (which already works).

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

**Release note**:

```release-note
Added flag support to kubectl plugins
```
PTAL @monopole @kubernetes/sig-cli-pr-reviews
2017-07-28 05:08:05 -07:00
dhilipkumars f9d5abb75e Remove blank lines-review comments 2017-07-28 14:21:20 +05:30
dhilipkumars 43a2999581 Display list of failed tests to the user 2017-07-27 19:10:17 +05:30
Dr. Stefan Schimanski edfbb9aa64 Fixup go2idl references 2017-07-20 07:41:37 +02:00
Kubernetes Submit Queue b78fc209a4 Merge pull request #49045 from ericchiang/remove-anytoken-authenticator-option
Automatic merge from submit-queue (batch tested with PRs 49058, 49072, 49137, 49182, 49045)

*: remove --insecure-allow-any-token option

~Since the authenticator is still used in e2e tests, don't remove
the actual package. Maybe a follow up?~

edit: e2e and integration tests have been switched over to the tokenfile
authenticator instead.

```release-note
The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging.
```

closes #49031

cc @kubernetes/sig-auth-pr-reviews
2017-07-19 10:27:29 -07:00
Kubernetes Submit Queue 164cae1151 Merge pull request #46755 from CaoShuFeng/cani-test-cmd
Automatic merge from submit-queue (batch tested with PRs 49120, 46755, 49157, 49165, 48950)

add cmd test for kubectl auth can-i

**Release note**:

```
NONE
```
2017-07-19 00:06:23 -07:00
Eric Chiang e2f2ab67f2 *: remove --insecure-allow-any-token option
e2e and integration tests have been switched over to the tokenfile
authenticator instead.

```release-note
The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging.
```
2017-07-18 16:03:15 -07:00
Fabiano Franz 71cbad7cbb Flag support in kubectl plugins 2017-07-18 15:35:40 -03:00
Dr. Stefan Schimanski 78ce38b926 deepcopy: run deepcopy-gen in client-go 2017-07-18 09:28:48 +02:00
Shiyang Wang f1afc3d09d fix sort-by output problem 2017-07-17 10:26:34 +08:00
Kubernetes Submit Queue 8ce6378512 Merge pull request #46091 from xilabao/new-output-in-edit
Automatic merge from submit-queue (batch tested with PRs 46091, 48280)

allow output patch string in edit command

**What this PR does / why we need it**:
allow user to get the patch from edit command if user is not familiar with the patch format.

```
# ./cluster/kubectl.sh create role a --verb=get,list --resource=no
role "a" created

# ./cluster/kubectl.sh edit role a --output-patch=true
Patch: {"rules":[{"apiGroups":[""],"resources":["nodes"],"verbs":["get","list","delete"]}]}
role "a" edited

# ./cluster/kubectl.sh create role b --verb=get,list --resource=no
role "b" created

# ./cluster/kubectl.sh patch role b -p '{"rules":[{"apiGroups":[""],"resources":["nodes"],"verbs":["get","list","delete"]}]}'
role "b" patched
```
**Which issue this PR fixes**: fixes #47173

**Special notes for your reviewer**:

**Release note**:

```release-note
Could get the patch from kubectl edit command
```
2017-07-16 18:04:42 -07:00
Kubernetes Submit Queue cab07f3af0 Merge pull request #46893 from yguo0905/image-spec
Automatic merge from submit-queue (batch tested with PRs 48890, 46893, 48872, 48896)

Support customized system spec in the node conformance test and create the GKE system spec

ref: https://github.com/kubernetes/kubernetes/issues/46891

- System specs are located in `test/e2e_node/system/specs`. Created one for validating GKE images in `test/e2e_node/system/specs/gke.yaml`.
- `--image-spec-name` can be used to specify a system spec in node e2e and conformance tests. This option maps to `SYSTEM_SPEC_NAME` in a test properties file, which is the user facing configuration. So, users can specify `SYSTEM_SPEC_NAME=gke` to run the image validation using the GKE system spec.
- If `SYSTEM_SPEC_NAME` is unspecified, the default spec (`system.DefaultSysSpec`) will be used.
- We can also use `make test-e2e-node SYSTEM_SPEC_NAME=gke` to run tests using GKE image spec.

**Release note**:
`None`
2017-07-14 16:49:52 -07:00
Yang Guo 22c9e23202 Supports customized system spec in the node conformance test and creates the GKE system spec 2017-07-14 09:39:19 -07:00
Anthony Yeh db869a6b0b
Add quick-verify make rule.
This is useful for humans to run to catch obvious problems before
pushing commits and waiting for CI to run verify checks.

Quick mode only runs a whitelist of verify scripts that are reasonably fast.
I set the initial bar arbitrarily at <10s each on my workstation.

The whole set runs in <30s for me, assuming I had already run `make` and
`hack/godep-restore.sh`. This is compared to the full `make verify`
which takes [I don't know how long because I gave up after 45min].
2017-07-12 16:29:31 -07:00
Anthony Yeh e3fed1ce6d
Allow verify-sh to run in SILENT mode.
Because of nounset, it was impossible to run without -v.
2017-07-12 15:02:52 -07:00
Kubernetes Submit Queue b07581e60f Merge pull request #47719 from xilabao/fix-set-selector-1
Automatic merge from submit-queue (batch tested with PRs 48196, 42783, 48507, 47719, 46138)

fix parse resource in setting selector

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-11 23:09:13 -07:00
xilabao 0ba41e7285 fix parse resource in setting selector 2017-07-07 10:36:29 +08:00
deads2k 3ee458d246 remove tpr API access 2017-07-03 11:25:59 -04:00
Kubernetes Submit Queue e4af9dccb0 Merge pull request #46923 from dims/nuke-wrapper-go-flags
Automatic merge from submit-queue (batch tested with PRs 47921, 45984, 46829, 46896, 46923)

Remove unnecessary wrapper flags

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

Drop KUBE_GOFLAGS, KUBE_GOGCFLAGS, KUBE_GOLDFLAGS references
from the build infrastructure

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-22 20:26:29 -07:00
Kubernetes Submit Queue dafe578377 Merge pull request #45984 from cblecker/hack-vet
Automatic merge from submit-queue (batch tested with PRs 47921, 45984, 46829, 46896, 46923)

Move govet verify into rest of verify*-.sh scripts

**What this PR does / why we need it**:
Instead of having two govet scripts, consolidate them to into one and have both the Makefile and verify.sh scripts target the same script. This also will allow proper syntax highlighting and timing when the vet script is run as part of `make verify`.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/kubernetes/test-infra/issues/2725

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/cc @fejta @rmmh
2017-06-22 20:26:21 -07:00
Kubernetes Submit Queue 4e1b608391 Merge pull request #45784 from xiangpengzhao/fix-integration-tips
Automatic merge from submit-queue

Give developer more help info when running integration tests without etcd found.

**What this PR does / why we need it**:
When running integration tests, if etcd version on env is lower than expected, developer will get info `You can use 'hack/install-etcd.sh' to install a copy in third_party/.` It would be better to have the same info if no etcd installed on env.

**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-06-22 18:53:22 -07:00
Chao Xu bad65b4c95 Don't revert, necessary change to make helpers to include k8s.io/api
Don't revert, change boundingdirs in Makefile for deepcopy-gen

manually fix pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go because external policy types are moved now
2017-06-22 11:30:43 -07:00
Christoph Blecker 97783f9093
Run hack/verify-govet.sh as part of verify make target
This commit ensures that:
- go vet will be run as part of the make verify target
- the vet make-rule script won't be run directly, as generated_files won't be run in that case
- that go vet errors show up in the build log with a start time, finish time, and SUCCESS/FAILED message as part of the verify make rule script
2017-06-21 11:10:25 -07:00
mbohlool 222f6ae37f Add test from #47578 2017-06-21 10:56:00 -07:00
Kubernetes Submit Queue cc645a8c6f Merge pull request #46327 from supereagle/mark-network-plugin-dir-deprecated
Automatic merge from submit-queue (batch tested with PRs 46327, 47166)

mark --network-plugin-dir deprecated for kubelet

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-19 11:23:54 -07:00
Kubernetes Submit Queue c31893978b Merge pull request #45918 from juanvallejo/jvallejo/fix-kubectl-set-resources-local
Automatic merge from submit-queue

fix --local flag for kubectl commands

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

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

Fixes the `--local` flag for `kubectl set ...` sub-commands.
**As of the 1.7 release**, `PrinterForCommand` was updated to [use a mapper and typer for unstructured objects](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/util/factory_builder.go#L52), which further prevented the use of `--local` when there was no connection to an api server.


**before** (with no connection to a server)
```
$ kubectl set resources -f pod.json --limits=cpu=200m,memory=512Mi --local
error: unable to connect to a server to handle "pods": Get https://10.13.137.149:8443/api: dial tcp 10.13.137.149:8443: getsockopt: connection refused
```

**after** (with no connection to a server)
```
$ kubectl set resources -f pod.json --limits=cpu=200m,memory=512Mi --local
NAME              READY     STATUS    RESTARTS   AGE
mypod   0/1                 0          <unknown>
```

cc @smarterclayton @fabianofranz
2017-06-16 08:19:13 -07:00
Anthony Yeh 394c6a5980
CRD: Test delete both with and without cascading. 2017-06-14 22:36:45 -07:00
Kubernetes Submit Queue 8cbf3a33d4 Merge pull request #47542 from enisoc/tpr-watch
Automatic merge from submit-queue (batch tested with PRs 47492, 47542, 46800, 47545, 45764)

Fix TPR watches.

Fixes #47027

TPR watch has been broken since #44350.
2017-06-14 21:43:41 -07:00
Kubernetes Submit Queue 304106f0f7 Merge pull request #47099 from mengqiy/add_junit_for_cmd_tests
Automatic merge from submit-queue (batch tested with PRs 47204, 46808, 47432, 47400, 47099)

support junit in test-cmd

Output junit result for cmd tests.

Fixes #45196

There will be a followup PR to refactor the cmd test into functions as test cases there is not a lot changes in `hack/make-rules/test-cmd-util.sh`

```release-note
NONE
```
2017-06-14 17:14:08 -07:00
Anthony Yeh 17cbc5e014
Fix TPR watches. 2017-06-14 16:58:49 -07:00
ymqytw 1480f6c368 refactor cmd test case into functions for easier generating junit results 2017-06-13 14:09:06 -07:00
ymqytw 471327f95f output junit for cmd tests 2017-06-13 10:13:23 -07:00
juanvallejo d036686185
fix --local flag for `kubectl set` commands 2017-06-13 12:57:05 -04:00
Janet Kuo 03af5233bd Make kubectl apply add change-cause before patching 2017-06-12 23:49:42 -07:00
Janet Kuo 2b8f91e549 Update kubectl rollout to consume `.data` of DaemonSet history
Also update tset data to make sure DaemonSet template is replaced, not
merged, when rolling back.
2017-06-10 10:52:33 -07:00
Kubernetes Submit Queue 20bf5f2311 Merge pull request #47086 from enisoc/crd-namespace-cleanup
Automatic merge from submit-queue (batch tested with PRs 47024, 47050, 47086, 47081, 47013)

apiextensions-apiserver: Fix decoding of DeleteOptions.

Fixes #47072 by making apiextensions-apiserver capable of decoding unversioned DeleteOptions, rather than only handling Unstructured objects (i.e. Custom Resources).

This also closes #46736 and #37554 since the added regression test works for TPR as well.
2017-06-07 16:53:43 -07:00
Davanum Srinivas 823e26ddbf Remove unnecessary wrapper flags
Drop KUBE_GOFLAGS, KUBE_GOGCFLAGS, KUBE_GOLDFLAGS references
from the build infrastructure. There are some usages still
for KUBE_GOFLAGS, so we should print a deprecation message
until all those are fixed. If both KUBE_GOFLAGS and GOFLAGS
are just then we just bail out.
2017-06-07 12:31:01 -04:00
Mike Danese 64f77ebfb7 enable race detection on integration tests 2017-06-06 16:27:49 -07:00
Anthony Yeh 6044bea32b
Add test for TPR/CRD namespace cleanup. 2017-06-06 11:45:15 -07:00
Dr. Stefan Schimanski 33e50da9f4 Rename {kube- ->}apiextensions-{-> api}server 2017-06-06 12:06:31 +02:00
Kubernetes Submit Queue a552ee61a0 Merge pull request #46672 from smarterclayton/initializer_with_config
Automatic merge from submit-queue (batch tested with PRs 46967, 46992, 43338, 46717, 46672)

Select initializers from the dynamic configuration

Continues #36721

kubernetes/features#209
2017-06-05 20:27:50 -07:00
Fabiano Franz 058f9b4f32 Add group alias names to discovery in registry 2017-06-05 20:18:12 -03:00
Clayton Coleman 034f06d7e4
Remove Initializers from federation 2017-06-05 19:12:36 -04:00
Janet Kuo edabdac094 Implement kubectl rollout history and undo for DaemonSet 2017-06-03 17:10:57 -07:00
Cao Shufeng c28efb85ff add cmd test for kubectl auth can-i 2017-06-03 17:01:00 +08:00
Clayton Coleman 4ce3907639
Add Initializers to all admission control paths by default 2017-06-02 22:09:04 -04:00
Kubernetes Submit Queue 5bf5d45c2b Merge pull request #46192 from cblecker/verify-dockerized
Automatic merge from submit-queue (batch tested with PRs 46801, 45184, 45930, 46192, 45563)

Exclude dockerized verify patterns

**What this PR does / why we need it**:
Change some of the `make verify` logic to allow excluding based on a pattern. Add the `verify-*-dockerized.sh` pattern to the excluded list.

**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-06-02 18:05:57 -07:00
supereagle dc9f0f9729 mark --network-plugin-dir deprecated for kubelet, and update related bootstrap scripts 2017-06-01 22:06:44 +08:00
Kubernetes Submit Queue 98e5496aa2 Merge pull request #46677 from enisoc/tpr-migrate-etcd
Automatic merge from submit-queue (batch tested with PRs 43505, 45168, 46439, 46677, 46623)

Add TPR to CRD migration helper.

This is a helper for migrating TPR data to CustomResource. It's rather hacky because it requires crossing apiserver boundaries, but doing it this way keeps the mess contained to the TPR code, which is scheduled for deletion anyway.

It's also not completely hands-free because making it resilient enough to be completely automated is too involved to be worth it for an alpha-to-beta migration, and would require investing significant effort to fix up soon-to-be-deleted TPR code. Instead, this feature will be documented as a best-effort helper whose results should be verified by hand.

The intended benefit of this over a totally manual process is that it should be possible to copy TPR data into a CRD without having to tear everything down in the middle. The process would look like this:

1. Upgrade to k8s 1.7. Nothing happens to your TPRs.
1. Create CRD with group/version and resource names that match the TPR. Still nothing happens to your TPRs, as the CRD is hidden by the overlapping TPR.
1. Delete the TPR. The TPR data is converted to CustomResource data, and the CRD begins serving at the same REST path.

Note that the old TPR data is left behind by this process, so watchers should not receive DELETE events. This also means the user can revert to the pre-migration state by recreating the TPR definition.

Ref. https://github.com/kubernetes/kubernetes/issues/45728
2017-06-01 05:43:44 -07:00
Kubernetes Submit Queue c365829d01 Merge pull request #46487 from CaoShuFeng/LANG
Automatic merge from submit-queue (batch tested with PRs 46686, 45049, 46323, 45708, 46487)

set LANG to 'C' in Makefile

Now we support multi-languages:
https://github.com/kubernetes/kubernetes/tree/master/translations

But some tests support only English. This test fails when LANG is set to zh_CN.UTF-8:
https://github.com/kubernetes/kubernetes/blob/master/hack/make-rules/test-cmd-util.sh#L2838
The expected err string is translated to Chinese:
https://github.com/kubernetes/kubernetes/blob/master/translations/kubectl/zh_CN/LC_MESSAGES/k8s.po#L82

**Release note**:

```
NONE
```
2017-06-01 03:42:12 -07:00
xilabao fe4afa8643 allow output patch string in edit command 2017-06-01 14:53:17 +08:00
Anthony Yeh ba59e14d44
Add TPR to CRD migration helper. 2017-05-31 19:07:38 -07:00
Christoph Blecker 079abb9ec9
Exclude dockerized verify patterns 2017-05-31 18:08:16 -07:00
Cao Shufeng 33cecc3499 Update deprecated flags for "make test-cmd" 2017-05-31 15:20:09 +08:00
Cao Shufeng 58c6200764 set LANG to 'C' for "make test-cmd"
Now we support multi-languages:
https://github.com/kubernetes/kubernetes/tree/master/translations

But some tests support only English. This test fails when LANG is set to zh_CN.UTF-8:
https://github.com/kubernetes/kubernetes/blob/master/hack/make-rules/test-cmd-util.sh#L2838
The expected err string is translated to Chinese:
https://github.com/kubernetes/kubernetes/blob/master/translations/kubectl/zh_CN/LC_MESSAGES/k8s.po#L82
2017-05-31 13:44:16 +08:00
xiangpengzhao 0cacf526b2 Suggest user to use 'hack/install-etcd.sh' when running integration tests without etcd found. 2017-05-31 11:39:34 +08:00
deads2k ce681fe47c move CRD from alpha to beta 2017-05-30 07:57:26 -04:00
Kubernetes Submit Queue 899b6c00ba Merge pull request #45809 from CaoShuFeng/non-resource-url-create-rolebinding
Automatic merge from submit-queue

support NonResourceURL for kubectl create clusterrole

Release note:
```release-note
add --non-resource-url to kubectl create clusterrole
```
2017-05-26 16:47:06 -07:00
Cao Shufeng 93e50b167e support NonResourceURL for kubectl create clusterrole 2017-05-26 10:07:44 +08:00
Monis Khan a13f026fd0
Panic server on watch errors in test environment
This change makes it so that errors during watch decoding panic the
server if it is in a test environment.  This allows us to catch coder
errors related to storing incompatible types at the same location in
etcd.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-05-25 13:54:56 -04:00
Random-Liu 82f588b483 Fix cos image project to cos-cloud. 2017-05-23 15:12:03 -07:00
Anirudh 078f9566d9 PDB MaxUnavailable: kubectl changes 2017-05-23 07:18:44 -07:00
Kubernetes Submit Queue 644a544d62 Merge pull request #46062 from alexandercampbell/correct-deprecation-errors
Automatic merge from submit-queue (batch tested with PRs 46201, 45952, 45427, 46247, 46062)

kubectl: fix deprecation warning bug

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

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

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

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

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

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

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

**Release note**:

```release-note
NONE
```
2017-05-22 20:58:07 -07:00
Alexander Campbell 46cdb3966c test-cmd-util: fix deprecated commands test
Additionally, move the test down to ensure definition order matches run
order.
2017-05-22 13:39:51 -07:00
Alexander Campbell c9c8d61048 Merge branch 'master' into correct-deprecation-errors 2017-05-22 09:55:07 -07:00
deads2k 446e959bf7 make CRD apiservice controller 2017-05-22 08:54:14 -04:00
Kubernetes Submit Queue 8fe818b2a1 Merge pull request #45981 from fabianofranz/kubectl_plugins_v1_part1
Automatic merge from submit-queue (batch tested with PRs 46033, 46122, 46053, 46018, 45981)

Command tree and exported env in kubectl plugins

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

**Release note**:

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

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

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

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



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

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

**Special notes for your reviewer**: /cc @feiskyer 

**Release note**:

```release-note
NONE
```
2017-05-19 18:57:34 -07:00
Fabiano Franz 18cb56bf78 kubectl plugins have access config, global flags and environment 2017-05-19 19:17:43 -03:00
Fabiano Franz da85262f70 Adds support to a tree hierarchy of kubectl plugins 2017-05-19 18:06:15 -03:00
Alexander Campbell 2acc5f18b5 test-cmd-util.sh: add test for deprecated commands 2017-05-19 08:55:12 -07:00
shashidharatd 47ab49eb4f Disabling service-dns controller for federation kubectl tests 2017-05-17 10:22:47 +05:30
Kubernetes Submit Queue 294c6362bd Merge pull request #43696 from CaoShuFeng/asgroups
Automatic merge from submit-queue

add --as-group option to cli

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

**Release note**:

```NONE
```
@liggitt
2017-05-16 06:47:10 -07:00
Cao Shufeng 726d720c78 Fix invalid bash script in unit test.
This change fix such error when we run "make test":
    "find: invalid expression; you have used a binary operator '-o' with
     nothing before it."
2017-05-15 15:36:27 +08:00
Cao Shufeng e541defd49 add --as-group option to cli
The usecase of this change:
When a super user grant some RBAC permissions to a group, he can use
--as-group to test whether the group get the permissions.
Note that now we support as-groups, as-user-extra in kubeconfig file
after this change.
2017-05-14 16:21:05 +08:00
Vishnu kannan d1b4dba440 adding support for gpus in node e2e
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-05-13 16:35:54 -07:00
Crazykev f2737c451e remove experimental-cri in e2e-node test
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
2017-05-12 15:20:47 +08:00
Kubernetes Submit Queue a481a5bca9 Merge pull request #45429 from pmichali/issue45425
Automatic merge from submit-queue (batch tested with PRs 45182, 45429)

Coverage: shasum command not supported on CentOS

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



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

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

**Special notes for your reviewer**:

**Release note**:

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

CustomResources in separate API server

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

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

@kubernetes/sig-api-machinery-misc
2017-05-05 17:32:33 -07:00
Paul Michali 5bcd21c9f1 Coverage: shasum command not supported on CentOS
Centos has sha1sum, instead of "shasum -a1". Modified script to
check for existence fo shasum, and if not present, use sha1sum
for coverage test processing. If neither are available, an error
will be reported and processing stopped.
2017-05-05 18:36:02 +00:00
deads2k bb143d3e33 add integration tests 2017-05-05 10:50:03 -04:00
Kubernetes Submit Queue 4e74c43e9a Merge pull request #43436 from xilabao/add-set-rolebinding-command
Automatic merge from submit-queue

add set rolebinding/clusterrolebinding command

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

initial types for TPRs

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

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

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

@kubernetes/sig-api-machinery-misc @enisoc @smarterclayton @erictune
2017-05-03 05:36:59 -07:00
nikhiljindal a88f28772a Add wait for federated service deletion 2017-05-02 22:12:03 -07:00
deads2k ed27887ad2 wire new staging repo 2017-05-02 08:43:31 -04:00
Kubernetes Submit Queue cb27476153 Merge pull request #45180 from caesarxuchao/move-metrics-to-staging
Automatic merge from submit-queue (batch tested with PRs 45077, 45180, 34727, 45079, 45177)

Move k8s.io/metrics to staging/

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

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

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

`make generated_files` is enabled for metrics.
2017-05-01 18:55:11 -07:00
Chao Xu 3294200dc8 move metrics to staging 2017-05-01 16:43:50 -07:00
Kubernetes Submit Queue 91475306dc Merge pull request #40774 from mikedanese/no-more-integration-tags
Automatic merge from submit-queue

don't use build tags to mark integration tests

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

Fixes get -oname for unstructured objects

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

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

**Release note**:

```release-note
NONE
```
2017-04-28 17:49:10 -07:00
Mike Danese 21617a60ae don't use build tags to mark integration tests 2017-04-28 14:19:39 -07:00
Fabiano Franz 1aa84d101a Fixes get -oname for unstructured objects 2017-04-28 14:12:36 -03:00
Fabiano Franz 2158473474 Plugins are loaded under the 'kubectl plugin' command 2017-04-28 01:34:07 -03:00
Fabiano Franz 2b178ad608 Basic support for kubectl plugins 2017-04-28 01:34:07 -03:00
xilabao 19217bc4a2 support subresource when running kubectl create role 2017-04-24 10:05:47 +08:00
Kristian Klausen eb882a3d1a Remove redis-proxy example
The docker image is nowhere to be found, so lets remove it.
There have been a request for the Dockerfile here [1], but nobody
seems to care.

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

[1] https://github.com/kubernetes/kubernetes/issues/4914#issuecomment-77209779
2017-04-23 16:59:23 +02:00
Kubernetes Submit Queue c9014b1029 Merge pull request #42849 from janetkuo/kubectl-describe-controllerRef
Automatic merge from submit-queue

In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator

@enisoc @kargakis @kubernetes/sig-apps-pr-reviews @kubernetes/sig-cli-pr-reviews 

```release-note
In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator.
```
2017-04-12 09:05:41 -07:00
Kubernetes Submit Queue ebf1439d93 Merge pull request #43406 from janetkuo/ds-semantic-equal-update
Automatic merge from submit-queue

Add tests for semantically equal DaemonSet updates

Tests for #43337, depends on #43337. The last commit is already reviewed in #43337. 

@liggitt @kargakis @lukaszo @kubernetes/sig-apps-pr-reviews
2017-04-11 18:25:03 -07:00
Janet Kuo b29135ea8f In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator 2017-04-11 15:41:57 -07:00
Kubernetes Submit Queue b9a5a5c9b3 Merge pull request #42748 from dcbw/cfssl-localup
Automatic merge from submit-queue (batch tested with PRs 43866, 42748)

hack/cluster: download cfssl if not present

hack/local-up-cluster.sh uses cfssl to generate certificates and
will exit it cfssl is not already installed.  But other cluster-up
mechanisms (GCE) that generate certs just download cfssl if not
present.  Make local-up-cluster.sh do that too so users don't have
to bother installing it from somewhere.
2017-04-10 14:27:11 -07:00
Kubernetes Submit Queue eed7d11255 Merge pull request #43136 from shashidharatd/kubectl-tests
Automatic merge from submit-queue

[Federation] Fix Running service controller in federation kubectl tests

Fixes:  #42607

cc @nikhiljindal @kubernetes/sig-federation-bugs
2017-04-09 11:19:38 -07:00
Kubernetes Submit Queue 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
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
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
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
deads2k 546b45c9c0 enable generation 2017-03-27 09:56:26 -04: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 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
Jordan Liggitt 707f0fb131
Preserve API group order in discovery, prefer extensions over apps 2017-03-23 11:10:53 -04: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
shashidharatd 7943ed7585 Use CoreDNS provider for starting federation controller manager in kubectl tests 2017-03-18 23:00:30 +05:30
Jordan Liggitt 9cd791e83c
Retry kubectl test replace on conflict 2017-03-16 08:39:47 -04:00
Maciej Szulik aa4390750c Introduce new generator for apps/v1beta1 deployments 2017-03-10 12:08:01 +01: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
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 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 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
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
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
Jan Safranek 584b57b8b4 Add storage.k8s.io/v1 2017-03-02 08:55:25 +01:00
Maciej Szulik c272630b1b Deployments under apps/v1beta1 with new defaults 2017-03-01 15:14:41 +01:00
Jordan Liggitt 31b3e01f1e
Fix error printing objects from kubectl get -w 2017-02-28 22:36:26 -05:00
Kubernetes Submit Queue 0bc16d8966 Merge pull request #40576 from nikhiljindal/kubectlcascDel
Automatic merge from submit-queue (batch tested with PRs 41994, 41969, 41997, 40952, 40576)

Updating kubectl to send delete requests with orphanDependents=false if --cascade is true

Ref https://github.com/kubernetes/kubernetes/issues/40568 #38897

Updating kubectl to always set `DeleteOptions.orphanDependents=false` when deleting a resource with `--cascade=true`.
This is primarily for federation where we want to use server side cascading deletion.

Impact on kubernetes: kubectl will do another GET after sending a DELETE and wait till the resource is actually deleted. This can have an impact if the resource has a finalizer. kubectl will wait till the finalizer is removed and then the resource is deleted, which is the right thing to do but a notable change in behavior.

cc @caesarxuchao @lavalamp @smarterclayton @kubernetes/sig-federation-pr-reviews @kubernetes/sig-cli-pr-reviews
2017-02-26 12:58:01 -08:00
Jordan Liggitt 41c88e0455
Revert "Merge pull request #40088 from jsafrane/storage-ga-v1"
This reverts commit 5984607cb9, reversing
changes made to 067f92e789.
2017-02-25 22:35:15 -05:00
Kubernetes Submit Queue 5984607cb9 Merge pull request #40088 from jsafrane/storage-ga-v1
Automatic merge from submit-queue (batch tested with PRs 41854, 41801, 40088, 41590, 41911)

Add storage.k8s.io/v1 API

v1 API is direct copy of v1beta1 API. This v1 API gets installed and exposed in this PR, I tested that kubectl can create both v1beta1 and v1 StorageClass.

~~Rest of Kubernetes (controllers, examples,. tests, ...) still use v1beta1 API, I will update it when this PR gets merged as these changes would get lost among generated code.~~ Most parts use v1 API now, it would not compile / run tests without it.

**Release note**:
```
Kubernetes API storage.k8s.io for storage objects is now fully supported and is available as storage.k8s.io/v1. Beta version of the API storage.k8s.io/v1beta1 is still available in this release, however it will be removed in a future Kubernetes release.

Together with the API endpoint, StorageClass annotation "storageclass.beta.kubernetes.io/is-default-class" is deprecated and  "storageclass.kubernetes.io/is-default-class" should be used instead to mark a default storage class. The beta annotation is still working in this release, however it won't be supported in the next one.
```

@kubernetes/sig-storage-misc
2017-02-25 05:02:55 -08:00
Kubernetes Submit Queue e40b55f8b4 Merge pull request #41843 from yujuhong/do-not-run-kubelet
Automatic merge from submit-queue (batch tested with PRs 40665, 41094, 41351, 41721, 41843)

Do not run kubelet in test-cmd.sh

The tests are intended to test only `kubectl` commands and do not
require kubelet.

This fixes #41834

/cc @Random-Liu @dchen1107 @nikhiljindal
2017-02-25 03:56:59 -08:00
Jan Safranek 3f6caca97a Add storage.k8s.io/v1 2017-02-24 13:34:18 +01:00
nikhiljindal b6e2a09c2b Add cascading deletion test cases to kubectl tests 2017-02-23 12:04:13 -08:00
Xing Zhou 433941f1fd Added `kubectl create clusterrole` command.
Added `kubectl create clusterrole` command.
2017-02-22 10:30:41 +08:00
Yu-Ju Hong 84d46cc477 Do not run kubelet in test-cmd.sh
The tests are intended to test only `kubectl` commands and do not
require kubelet.
2017-02-21 14:53:44 -08:00
Jeff Grafton 3dc0c748c8 Ignore bazel-* directories when looking for tests to run 2017-02-17 14:03:56 -08:00
Maru Newby 98f5c362ff test-federation.sh: Make use of WHAT consistent with make test
test-integration.sh was using the first positional arg passed to WHAT
to filter the list of integration test packages.  This change switches
to passing WHAT verbatim to be consistent with how make test works.
2017-02-16 10:53:58 -08:00
Kubernetes Submit Queue 92360ffc5f Merge pull request #41439 from deads2k/apiserver-12-sample-fuzz
Automatic merge from submit-queue (batch tested with PRs 41104, 41245, 40722, 41439, 41502)

add sample fuzzing tests

Make fuzzing tests as simple as possible from both the API installer and the scheme, so its easy to add for api groups and so that I can build a scheme and then make sure I got it right.

@kubernetes/sig-api-machinery-pr-reviews @sttts @mikedanese
2017-02-15 16:28:11 -08:00
Maru Newby c762057a7c test-integration.sh: Exit after running a test case 2017-02-15 15:23:32 -08:00
Maru Newby ae91e0452f test-integration.sh: Avoid unnecessary etcd cleanup 2017-02-15 15:21:44 -08:00
Kubernetes Submit Queue fbc94c0896 Merge pull request #41343 from p0lyn0mial/kubectl_get_short_names_from_discovery_api
Automatic merge from submit-queue

shortcut expander will take the list of short names from the api ser…

**What this PR does / why we need it**: the shortcut expander will take the list of short names for resources from the API server during the discovery. For backward compatibility a hardcoded list of short names will always be appended while evaluating a short name.
2017-02-15 09:07:51 -08:00
deads2k 2d5fe9d855 add sample fuzzing tests 2017-02-15 10:34:44 -05:00
p0lyn0mial 98068b6367 shortcut expander will take the list of short names from the api server. 2017-02-15 09:06:47 +01:00
deads2k 1d40c3ff76 update scripts for new kube-aggregator location 2017-02-14 14:16:59 -05:00
Kubernetes Submit Queue beaf5ffacc Merge pull request #39852 from xingzhou/kube-39596
Automatic merge from submit-queue

Added kubectl create role command

Added `kubectl create role` command.

Fixed part of #39596 

**Release note**:
```
   Added one new command `kubectl create role` to help user create a single role from command line.
```
2017-02-13 08:40:50 -08:00
Kubernetes Submit Queue 899ddbcfc6 Merge pull request #41259 from alejandroEsc/ae/make_help/ansi
Automatic merge from submit-queue (batch tested with PRs 41259, 41260)

remove hardcoded ansi color coding for `make help` 

to tput so that color coding works in multiple platforms including osx.

**What this PR does / why we need it**: 
should try not to use hardcoded ansi escape characters.

**Release note**:
```NONE
```
2017-02-10 16:53:38 -08:00
Alejandro Escobar 0314bcdbba remove hardcoded ansi to tput so that color coding works in multiple platforms including osx. 2017-02-10 10:25:43 -08:00
Kubernetes Submit Queue f9215e8fb3 Merge pull request #41058 from liggitt/v1-tokenreview
Automatic merge from submit-queue (batch tested with PRs 41112, 41201, 41058, 40650, 40926)

Promote TokenReview to v1

Peer to https://github.com/kubernetes/kubernetes/pull/40709

We have multiple features that depend on this API:

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

The API has been in use since 1.3 in beta status (v1beta1) with negligible changes:
- Added a status field for reporting errors evaluating the token

This PR promotes the existing v1beta1 API to v1 with no changes

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

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

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

```release-note
The authentication.k8s.io API group was promoted to v1
```
2017-02-10 01:40:44 -08:00
Kubernetes Submit Queue 45d122dd6b Merge pull request #36033 from DirectXMan12/feature/hpa-v2
Automatic merge from submit-queue (batch tested with PRs 40796, 40878, 36033, 40838, 41210)

HPA v2 (API Changes)

**Release note**:
```release-note
Introduces an new alpha version of the Horizontal Pod Autoscaler including expanded support for specifying metrics.
```

Implements the API changes for kubernetes/features#117.

This implements #34754, which is the new design for the Horizontal Pod Autoscaler.  It includes improved support for custom metrics (and/or arbitrary metrics) as well as expanded support for resource metrics.  The new HPA object is introduces in the API group "autoscaling/v1alpha1".

Note that the improved custom metric support currently is limited to per pod metrics from Heapster -- attempting to use the new "object metrics" will simply result in an error.  This will change once #34586 is merged and implemented.
2017-02-10 00:04:48 -08:00
Kubernetes Submit Queue 2b2af10a50 Merge pull request #41181 from tanshanshan/fix-wrong-shell
Automatic merge from submit-queue (batch tested with PRs 40917, 41181, 41123, 36592, 41183)

fix scheduler performance test script 

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

 

 `test-performance.sh` is  in  dir `kubernetes/test/integration/scheduler_perf`

the  dir `kubernetes/test/component/scheduler/perf`  does not exist

Thanks.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-02-09 23:10:44 -08:00
tanshanshan 94b8c43b84 fix the wrong test path 2017-02-09 15:16:11 +08:00
Kubernetes Submit Queue a326735ea0 Merge pull request #40175 from apprenda/kubeadm-40155-test-skip
Automatic merge from submit-queue (batch tested with PRs 40175, 41107, 41111, 40893, 40919)

kubeadm: skip integration tests if kubeadm-cmd-skip flag passed

Will skip integration tests for token generation if it can't find a file by the given --kubeadm-path or default value.

**What this PR does / why we need it**: Tests would fail if just running `go test` in the dir because it expects to have more values. This won't change the behavior of `make test-cmd` which gets run here:
https://github.com/kubernetes/kubernetes/blob/master/Makefile#L258

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

**Special notes for your reviewer**: /cc @pires @pipejakob @liggitt 

```release-note
NONE
```
2017-02-08 01:47:37 -08:00
Xing Zhou b9c6fb52ab Added unit tests for kubectl create role command.
Added unit tests for kubectl create role command.
2017-02-08 13:30:10 +08:00
Solly Ross 86c430b881 Introduce HPA v2 API Objects
This commit introduces the autoscaling/v2alpha1 API group, which
currently contains the first alpha of the new HorizontalPodAutoscaler
object.
2017-02-07 17:20:14 -05:00
Derek McQuay 1459bbade4
kubeadm: updated cmd tests as discussed in SIG
After today's SIG meeting, it was discussed how to proceed with these
types of test-cmd tests.  They will live in kubeamd/test/cmd and will
provide a flag that will allow you to skip them (--kubeadm-cmd-skip) and
by default will fail if kubeadm binary is not present
2017-02-07 12:47:07 -08:00
Kubernetes Submit Queue 3f6dd889f3 Merge pull request #40985 from p0lyn0mial/add_shortnames_to_discovery_api
Automatic merge from submit-queue (batch tested with PRs 40980, 40985)

added short names for resources which are exposed during discovery

**What this PR does / why we need it**:
The changes add short names for resources. The short names will be delivered to kubectl during discovery.
2017-02-07 06:21:10 -08:00
Jordan Liggitt 09b5d7279f
install authentication.k8s.io/v1, add tests 2017-02-07 01:44:56 -05:00
Jordan Liggitt 8706bc9617
install authorization.k8s.io/v1, add tests
Use specific v1beta1 Authorization client

Add client expansions
2017-02-06 18:16:51 -05:00
p0lyn0mial b2cce0ac8e added short names for resources which are exposed during discovery 2017-02-06 23:35:07 +01:00
ymqytw 710d904998 add apply cmd tests for TPR 2017-02-02 15:20:45 -08:00
Kubernetes Submit Queue 9805b0bdfb Merge pull request #40729 from sttts/sttts-client-go-examples
Automatic merge from submit-queue (batch tested with PRs 40812, 39903, 40525, 40729)

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

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

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

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

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

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

Local CRI node_e2e can now be performed via
`make test-e2e-node RUNTIME=remote REMOTE=false`
which will also take care of passing the appropriate argument to
the kubelet.
2017-02-02 13:57:48 -08:00
Dr. Stefan Schimanski 880cbd5d7b client-go: enable smoke compile test for examples 2017-02-02 20:28:32 +01:00
Piotr Szczesniak a35ad8f6ba Removed HPA objects from extensions api group 2017-02-02 14:09:54 +01:00
Luca Bruno 42bdbe5c82
test/node_e2e: wire-in "container-runtime" for local tests
This commit wires-in the pre-existing `--container-runtime` flag for
local node_e2e testing.
This is needed in order to further skip docker specific testing
and validation.

Local CRI node_e2e can now be performed via
`make test-e2e-node RUNTIME=remote REMOTE=false`
which will also take care of passing the appropriate arguments to
the kubelet.
2017-02-01 20:34:51 +00:00
Jordan Liggitt cf74abd892
fixup apply null tests 2017-01-31 15:00:23 -05:00
Anastasis Andronidis 4bdcc03c0b
test for explicit null value propagation in apply 2017-01-31 14:22:24 -05:00
Kubernetes Submit Queue 25de8ef641 Merge pull request #40551 from juanvallejo/jvallejo/only-output-no-resources-found-for-human-readable-printer
Automatic merge from submit-queue (batch tested with PRs 40691, 40551, 40683, 40700, 40702)

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

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

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

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

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

cc @fabianofranz @stevekuznetsov
2017-01-30 19:14:41 -08:00
Kubernetes Submit Queue 2623f7c456 Merge pull request #40549 from jessfraz/40433-reenable-cascading-deployment
Automatic merge from submit-queue

re-enable cascading deployment

I couldn't reproduce #40433 locally sooo trying on the test infra to make sure I'm not crazy
2017-01-29 23:51:27 -08:00
juanvallejo 5ec2a4c3ca only output "No resources found." for human readable printers 2017-01-27 13:30:23 -05:00
Kubernetes Submit Queue d718e40594 Merge pull request #40567 from nikhiljindal/secretDel
Automatic merge from submit-queue

Temporary disable federation kubectl tests for secrets to unblock merge queue

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

cc @kubernetes/sig-federation-misc @deads2k
2017-01-27 08:34:50 -08:00
Jordan Liggitt 17168aaacc
Test generic operations with thirdpartyresources 2017-01-26 19:59:27 -05:00
nikhiljindal f4d4b2c578 Temporary disable federation kubectl tests for secrets to unblock merge queue 2017-01-26 15:43:56 -08:00
Jess Frazelle 00cdc06103
re-enable cascading deployment
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-26 12:51:11 -08:00
Jordan Liggitt 5676b9a252
Temporarily disable cascading deployment delete in test-cmd-util.sh
Re-enabling tracked in https://github.com/kubernetes/kubernetes/issues/40433
2017-01-25 13:34:16 -05:00
Jordan Liggitt 903787ab2c
Tolerate existing kubernetes service in test-cmd.sh 2017-01-25 13:34:16 -05:00
Jordan Liggitt d47f898500
Re-enable test-cmd.sh tests 2017-01-25 13:34:16 -05:00
Kubernetes Submit Queue f545d6ad47 Merge pull request #40057 from MrHohn/kubectl-create-seletor
Automatic merge from submit-queue (batch tested with PRs 40328, 40057)

Allows kubectl create -f to filter by selector.

From #32544.

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

```release-note
kubectl create now accepts the label selector flag for filtering objects to create
```
2017-01-23 22:19:11 -08:00
deads2k 4f915039e4 move pkg/client/transport to client-go 2017-01-18 07:56:01 -05:00
Zihong Zheng 6b9860cf54 Allows kubectl create -f to filter by selector. 2017-01-17 19:18:51 -08:00
Kubernetes Submit Queue 3aa29bca4f Merge pull request #40009 from kargakis/fix-dryrun-for-rollout
Automatic merge from submit-queue (batch tested with PRs 39911, 40002, 39969, 40012, 40009)

kubectl: fix rollback dryrun when version is not specified

@kubernetes/sig-cli-misc
2017-01-17 06:47:00 -08:00
Michail Kargakis 9c820a5793 kubectl: fix rollback dryrun when version is not specified 2017-01-17 12:01:09 +01:00
Clayton Coleman 62d1ae96c1
Generate for staging directories that are not client-go 2017-01-16 16:13:29 -05:00
Kubernetes Submit Queue 17a6f41367 Merge pull request #39859 from k82cn/test_script
Automatic merge from submit-queue (batch tested with PRs 39947, 39936, 39902, 39859, 39915)

Moved _pkg to embeded script.

fixes #39840
2017-01-16 09:26:17 -08:00
Andy Goldstein cb39d0d811 Fix expected error text 2017-01-13 16:58:16 -05:00
Klaus Ma c1f4565293 Moved _pkg to embeded script. 2017-01-13 16:03:19 +08:00
Kubernetes Submit Queue 6e5b455b77 Merge pull request #39038 from ncdc/fix-kubectl-get-list
Automatic merge from submit-queue

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

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```

cc @AdoHe @deads2k @liggitt @fabianofranz @kubernetes/kubectl @kubernetes/sig-cli-misc
2017-01-11 09:58:38 -08:00
Andy Goldstein 613ada4cd7 Fix kubectl get -f <file> -o <nondefault printer>
Fix kubectl get -f <file> -o <nondefault printer> so it prints all the
objects in the file, instead of just the first one. Also add a test for
this feature.
2017-01-11 10:30:13 -05:00
deads2k 70778cccfe k8s.io/apimachinery scripts 2017-01-11 08:15:34 -05:00
Andy Goldstein 80c5cd8b88 Allow missing keys in templates by default
Switch to allowing missing keys in jsonpath templates by default.

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

Add --allow-missing-template-keys flag to control this behavior
(default=true / allow missing keys).
2017-01-09 10:35:46 -05:00
deads2k a672b501df add apiserver to list of unit tested packages 2017-01-05 11:09:42 -05:00
Kubernetes Submit Queue 6b70211568 Merge pull request #38844 from nikhiljindal/fednewkubectlTests
Automatic merge from submit-queue

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

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

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

```release-note
Adding kubectl tests for federation
```
2017-01-04 13:07:17 -08:00
nikhiljindal 5424d50c03 Adding test-federation-cmd.sh to test kubectl with federation apiserver 2017-01-04 11:17:05 -08:00
deads2k 442d2c1404 move pkg/auth/user to staging 2017-01-04 10:27:04 -05:00
Kubernetes Submit Queue 34ea3a17af Merge pull request #39001 from xilabao/fix-group-in-create-clusterrolebinding
Automatic merge from submit-queue

fix group in create clusterrolebinding

group lost.

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

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

fix the newconfig.yaml in test-cmd.sh

fix #39066
2016-12-22 00:54:22 -08:00
xilabao 6b19a711ec fix group in create clusterrolebinding 2016-12-22 10:14:11 +08:00
Jeff Grafton 05c09b1aa3 Disable verify-test-owners.sh and make `go vet` more obvious 2016-12-21 11:44:04 -08:00
deads2k 8b25c21e79 add create rolebinding 2016-12-21 09:03:27 -05:00
Angus Salkeld 17a711d8fd Add new command "kubectl set selector" 2016-12-21 12:30:56 +01:00
xilabao 695e5ddb24 fix the newconfig.yaml in test-cmd.sh 2016-12-21 15:11:35 +08:00
Brendan Burns ab0e245bc6 Add a KUBERNETES_NODE_* section to build kubelet/kube-proxy for windows 2016-12-17 21:07:18 -08:00
Kubernetes Submit Queue 6c9a4139f3 Merge pull request #38614 from soltysh/remove_ext_jobs
Automatic merge from submit-queue (batch tested with PRs 37468, 36546, 38713, 38902, 38614)

Remove extensions/v1beta1 Job

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

**Release note**:
```release-note
Remove extensions/v1beta1 Jobs resource, and job/v1beta1 generator.
```
2016-12-16 18:55:37 -08:00