Commit Graph

638 Commits (e502ca4653405d07e36f34e56e1d7d45aa5b1880)

Author SHA1 Message Date
Kubernetes Submit Queue 9c19c4e338
Merge pull request #61477 from soltysh/server_print_default
Automatic merge from submit-queue (batch tested with PRs 61842, 61477, 61777). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Turn server-print on by default in kubectl

**What this PR does / why we need it**:
#55637 introduced `-experimental-server-print` that enabled users to opt-in to user server-side printing. This is a followup which enables this functionality by default, with the ability to fallback not to do it with `--server-print=false`. 

/assign @smarterclayton @juanvallejo 

**Release note**:
```release-note
Enable server-side print in kubectl by default, with the ability to turn it off with --server-print=false
```
2018-03-28 15:57:09 -07:00
Kubernetes Submit Queue 831198edbc
Merge pull request #61808 from liggitt/dry-run-printing
Automatic merge from submit-queue (batch tested with PRs 61790, 61808, 60339, 61615, 61757). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Ensure -o yaml populates kind/apiVersion

Fixes #61780 

```release-note
kubectl: fixes issue with `-o yaml` and `-o json` omitting kind and apiVersion when used with `--dry-run`
```
2018-03-28 09:39:12 -07:00
Jordan Liggitt a174d7a2de
Ensure -o yaml populates kind/apiVersion 2018-03-27 23:27:40 -04:00
Maciej Szulik 94d8b93239
Turn server-print on by default in kubectl 2018-03-26 12:30:12 +02:00
Cao Shufeng 51224740f5 clean up output-version 2018-03-26 15:40:40 +08:00
Kubernetes Submit Queue 9f71d7f8af
Merge pull request #61393 from totherme/fix-test-cmd-on-osx
Automatic merge from submit-queue (batch tested with PRs 61453, 61393, 61379, 61373, 61494). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make `test-cmd` work with OS-X tooling

OS-X thips with the BSD versions of `date` and `grep`. Those don't have
certain features the script relies on:
- BSD date does not support nanoseconds (`%N`)
- BSD grep does not support perl RegEx (`-P`)

As we use `bash` specifically in the hashbang anyway it is probably fine
to rely on the `$RANDOM` bashism here.

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

Currently `make test-cmd` doesn't work on OSX. This PR makes `make test-cmd` work on OSX.

**Release note**:
```release-note
`make test-cmd` now works on OSX.
```

cc: @apelisse
2018-03-22 06:20:19 -07:00
Kubernetes Submit Queue 114d481183
Merge pull request #60793 from charrywanganthony/inert_flag_showall
Automatic merge from submit-queue (batch tested with PRs 60793, 61181, 61267, 61252, 61334). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

--show-all is inert in v1.11

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

`--show-all` is inert in v1.11
ref: #60210

**Special notes for your reviewer**:
/assign @deads2k 

**Release note**:

```release-note
`--show-all` (which only affected pods and only for human readable/non-API printers) is inert in v1.11, and will be removed in a future release.
```
2018-03-21 20:23:07 -07:00
Gareth Smith fa96484d35 Use consistent bash variable syntax
Use "${VAR}" everywhere, instead of also using "$VAR" in some places.
2018-03-21 09:30:57 +00:00
WanLinghao a3424872bd this patch do tow things:
1.add dry-run flag for create job subcommand
	2.add cmd-util test for create job subcommand
	modified:   pkg/kubectl/cmd/create_job.go
	modified:   hack/make-rules/test-cmd-util.sh
2018-03-21 10:41:17 +08:00
Chao Wang 71a1970bf6 --show-all is inert in v1.11 2018-03-21 09:13:21 +08:00
Hannes Hörl 1bb3537c98 Make `test-cmd` work with OS-X tooling
OS-X thips with the BSD versions of `date` and `grep`. Those don't have
certain features the script relies on:
- BSD date does not support nanoseconds (`%N`)
- BSD grep does not support perl RegEx (`-P`)

As we use `bash` specifically in the hashbang anyway it is probably fine
to rely on the `$RANDOM` bashism here.
2018-03-20 10:07:40 +00:00
xilabao 110641b34c add kubectl api-resources command 2018-03-09 17:47:17 +08:00
Ryan Hitchman d295ca1134 Add support for `make verify WHAT=typecheck`.
This will be used to make the typecheck job emit junit and avoids
duplicating the rest of the verify logic.
2018-03-01 15:03:24 -08:00
Ryan Hitchman dd40e612dd Add test/typecheck, a fast typecheck for all build platforms.
Most of the time spent compiling is spent optimizing and linking
binary code. Most errors occur at the syntax or semantic (type) layers.
Go's compiler is importable as a normal package, so we can do fast
syntax and type checking for the 10 platforms we build on.

This currently takes ~6 minutes of CPU time (parallelized).

This makes presubmit cross builds superfluous, since it should catch
most cross-build breaks (generally Unix and 64-bit assumptions).

Example output:

$ time go run test/typecheck/main.go
type-checking:  linux/amd64, windows/386, darwin/amd64, linux/arm, linux/386, windows/amd64, linux/arm64, linux/ppc64le, linux/s390x, darwin/386
ERROR(windows/amd64) pkg/proxy/ipvs/proxier.go:1708:27: ENXIO not declared by package unix
ERROR(windows/386) pkg/proxy/ipvs/proxier.go:1708:27: ENXIO not declared by package unix

real	0m45.083s
user	6m15.504s
sys	1m14.000s
2018-02-27 13:53:32 -08:00
Manuel de Brito Fontes 02370e529b
Remove cassandra example 2018-02-26 20:39:07 -03:00
juanvallejo 9f3501b287 add --experimental-server-print tests 2018-02-26 01:33:27 -05:00
Di Xu 16a807aaef add spelling checking script 2018-02-23 09:33:14 +08:00
Kubernetes Submit Queue fd1527a977
Merge pull request #60131 from soltysh/integration_fixes_followup
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Return information about which int tests failed in the summary - followup

@stevekuznetsov you asked about it in https://github.com/kubernetes/kubernetes/pull/59486#discussion_r169351176

/assign @stevekuznetsov 


**Release note**:
```release-note
NONE
```
2018-02-22 10:35:47 -08:00
hzxuzhonghu 27f3fd2d79 set default enabled admission plugins by official document 2018-02-22 11:02:02 +08:00
David Eads be04e7c1b1 collapse printing paths 2018-02-21 08:15:22 -05:00
Maciej Szulik 99035a13c2
Return information about which int tests failed in the summary - followup 2018-02-21 12:14:27 +01:00
Kubernetes Submit Queue c7414323d8
Merge pull request #59486 from soltysh/integration_fixes
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Return information about which int tests failed in the summary

**What this PR does / why we need it**:
Currently if integration tests fail they will print the name of the failing tests as it goes, but the summary only tells that it failed. You need to know what to look for to be able to find all these occurrences. This PR provides a summary next to the failure information, eg:
```
FAILED TESTS: run_cluster_management_tests, run_plugins_tests, 
```
Which should greatly simplify developers integration debugging. 

**Release note**:
```release-note
NONE
```
2018-02-20 08:16:42 -08:00
Kubernetes Submit Queue bb500a73b6
Merge pull request #59353 from juanvallejo/jvallejo/update-name-printer-output
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update name printer output to kind.group/name

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

Followup to https://github.com/kubernetes/kubernetes/pull/59227

Updates output via `-o name` to be pipeable.

cc @deads2k
2018-02-15 10:37:19 -08:00
juanvallejo 765f9ec68b
update -o name format to kind.group/name 2018-02-15 10:33:06 -05:00
Jordan Liggitt f8e206e802
Remove /ui/ redirect 2018-02-12 10:54:33 -05:00
Kubernetes Submit Queue 198a098d9d
Merge pull request #59506 from juanvallejo/jvallejo/handle-watch-multiple-reqs
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix --watch on multiple requests

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

`kubectl get <resource> --watch` only supports watching a single resource kind at a time.
This check fails if more than one resource `Info` is returned.

When dealing with large quantities of a single resource kind, or an amount that exceeds the value of `--chunk-size`, more than one request is made to the server causing a resource `Info` to be created for each of the requests, ultimately causing the above check to fail even though we are dealing with the same type of resource.

This patch modifies that check to take into account the GVKs of all infos returned, and only fail if at least one differs.

cc @deads2k
2018-02-12 02:25:45 -08:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
juanvallejo aea8deee03
fix --watch on multiple requests 2018-02-09 15:17:02 -05:00
Kubernetes Submit Queue fb340a4695
Merge pull request #57824 from thockin/gcr-vanity
Automatic merge from submit-queue (batch tested with PRs 57824, 58806, 59410, 59280). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

2nd try at using a vanity GCR name

The 2nd commit here is the changes relative to the reverted PR.  Please focus review attention on that.

This is the 2nd attempt.  The previous try (#57573) was reverted while we
figured out the regional mirrors (oops).
    
New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).
    
When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.
    
We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.

xref https://github.com/kubernetes/release/issues/281

TL;DR:
  *  The new `staging-k8s.gcr.io` is where we push images.  It is literally an alias to `gcr.io/google_containers` (the existing repo) and is hosted in the US.
  * The contents of `staging-k8s.gcr.io` are automatically synced to `{asia,eu,us)-k8s.gcr.io`.
  * The new `k8s.gcr.io` will be a read-only alias to whichever regional repo is closest to you.
  * In the future, images will be promoted from `staging` to regional "prod" more explicitly and auditably.

 ```release-note
Use "k8s.gcr.io" for pulling container images rather than "gcr.io/google_containers".  Images are already synced, so this should not impact anyone materially.
    
Documentation and tools should all convert to the new name. Users should take note of this in case they see this new name in the system.
```
2018-02-08 03:29:32 -08:00
Tim Hockin 3586986416 Switch to k8s.gcr.io vanity domain
This is the 2nd attempt.  The previous was reverted while we figured out
the regional mirrors (oops).

New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).

When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.

We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.
2018-02-07 21:14:19 -08:00
Kubernetes Submit Queue 15dbd4e2ae
Merge pull request #59227 from juanvallejo/jvallejo/remove-mapper-dep-printer
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove mapper dependency for cmdutil.Factory#PrintSuccess

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

Part of a series of patches removing printing stack dependency on mappings the rest mapper

**Before**
```
$ kubectl label pod/my-pod label=label
pod "my-pod" labeled
```

**After**
```
$ kubectl label pod/my-pod label=label
pods "my-pod" labeled
```

cc @deads2k
2018-02-07 08:39:15 -08:00
juanvallejo beb5ea641a
remove mapper dependency - PrintSuccess 2018-02-07 10:10:45 -05:00
Maciej Szulik 5fec14942c Return information about which int tests failed in the summary 2018-02-07 15:21:46 +01:00
Kubernetes Submit Queue 313f443015
Merge pull request #58991 from juanvallejo/jvallejo/fix-apply-force
Automatic merge from submit-queue (batch tested with PRs 51323, 59306, 58991, 59050). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix apply --force w/ invalid resource

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

- First commit: Fixes cases where `--force` is provided with `kubectl apply`, with an object that is BOTH invalid and will cause a conflict error
- Second commit: Fixes cases where `--force` is provided with `kubectl apply`, with an invalid object 

Justification for the first commit here: https://bugzilla.redhat.com/show_bug.cgi?id=1539529#c3

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

cc @ironcladlou
2018-02-06 10:40:37 -08:00
juanvallejo ef0e40d39c
fix apply --force w/ invalid AND conflicting resource 2018-02-06 11:29:00 -05:00
David Ashpole 17e8d8c040 use node-e2e framework for testing cadvisor 2018-01-31 10:14:54 -08:00
Kubernetes Submit Queue 9e2878d93c
Merge pull request #58567 from hzxuzhonghu/admission-01
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kube-apiserver flag --admision-control is deprecated, use the new --e…

…nable-admission-plugins



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

1. As #58123 mark kube-apiserver flag `admission-control` deprecated,  replace it in some places.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
/assign @liggitt @deads2k @sttts
2018-01-30 09:21:38 -08:00
Kubernetes Submit Queue b98c515819
Merge pull request #57723 from mkumatag/image_manifest
Automatic merge from submit-queue (batch tested with PRs 57322, 57723, 58706, 59004, 58857). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make the pause image a manifest list

**What this PR does / why we need it**:
Build and push manifest for kubernetes images

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes https://github.com/kubernetes/kubernetes/issues/57869

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2018-01-29 20:11:35 -08:00
Kubernetes Submit Queue f4bab0b1bd
Merge pull request #58783 from cblecker/verify-junit
Automatic merge from submit-queue (batch tested with PRs 58783, 58800, 58846). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Produce junit results for verify job

**What this PR does / why we need it**:
Junit results may make the verify job clearer, and give us better insights into timings

**Release note**:

```release-note
NONE
```
2018-01-26 10:19:33 -08:00
Kubernetes Submit Queue 27d01b5ab9
Merge pull request #57938 from dims/add-binary-configmap
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add binary configmap

Reviving code from https://github.com/kubernetes/kubernetes/pull/33549 submitted by @zreigz

**What this PR does / why we need it**:
Add support for binary files in ConfigMap

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

**Special notes for your reviewer**:

**Release note**:

```release-note
ConfigMap objects now support binary data via a new `binaryData` field. When using `kubectl create configmap --from-file`, files containing non-UTF8 data will be placed in this new field in order to preserve the non-UTF8 data. Use of this feature requires 1.10+ apiserver and kubelets.
```
2018-01-26 04:34:33 -08:00
Christoph Blecker f801f3f174
Change flags to variables so that they can be passed through make 2018-01-25 13:30:30 -08:00
Christoph Blecker 5fe4d279ca
Produce junit results for verify job 2018-01-25 13:30:25 -08:00
Maciej Szulik c7efab40b6 Fix kubectl explain for cronjobs 2018-01-25 16:10:31 +01:00
hzxuzhonghu 0a230fad17 kube-apiserver flag --admision-control is deprecated, use the new --enable-admission-plugins 2018-01-24 20:47:54 +08:00
Manjunath A Kumatagi 17a1ec10cf Make the pause image a manifest list 2018-01-24 02:10:45 -05:00
Davanum Srinivas 43aa077cbb run a full round trip scenario 2018-01-23 07:28:58 -05:00
Christoph Blecker b57845341f
Force use of Makefile for update 2018-01-22 15:11:16 -08:00
Jordan Liggitt 0a1b76cb11
Limit all category to apps group for ds/deployment/replicaset 2018-01-15 14:41:42 -05:00
Lantao Liu f64c508e2e Add getCRIClient and set default values for CRI related flags 2018-01-09 22:59:17 +00:00
Kubernetes Submit Queue 7b4c9f99b9
Merge pull request #57521 from misterikkit/integrationTimeout
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow integration test timeout override.

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

This allows the test timeout to be overridden at the command line for
integration tests. The default behavior is unchanged.

e.g.
```
make test-integration WHAT="./test/integration/scheduler" KUBE_TEST_ARGS="-run=. -count=10" KUBE_TIMEOUT="-timeout=1h"
```



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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-07 11:02:24 -08:00
Jonathan Basseri 30b89d830b Move scheduler code out of plugin directory.
This moves plugin/pkg/scheduler to pkg/scheduler and
plugin/cmd/kube-scheduler to cmd/kube-scheduler.

Bulk of the work was done with gomvpkg, except for kube-scheduler main
package.
2018-01-05 15:05:01 -08:00
Lee Verberne 1ea697044a Update pause container version to 3.1
This updates the version of the pause container used by the kubelet and
various test utilities to 3.1.

This also adds a CHANGELOG.md for build/pause
2018-01-04 11:35:29 +01:00
Tim Hockin e9dd8a68f6 Revert k8s.gcr.io vanity domain
This reverts commit eba5b6092a.

Fixes https://github.com/kubernetes/kubernetes/issues/57526
2017-12-22 14:36:16 -08:00
Jonathan Basseri 4df4c8bdd2 Allow integration test timeout override.
This allows the test timeout to be overridden at the command line for
integration tests. The default behavior is unchanged.

e.g.
    make test-integration WHAT="./test/integration/scheduler" \
        KUBE_TEST_ARGS="-run=. -count=10" \
	KUBE_TIMEOUT="-timeout 1h"
2017-12-21 10:55:09 -08:00
Davanum Srinivas 6738da1d28 Fix problem accessing private docker registries
In 027c8b9ef2, we added code to
move from .dockercfg to config.json file. But we forgot to use
the right secret type and the key to store the base64'ed creds
2017-12-20 12:37:40 -05:00
Kubernetes Submit Queue 3ef674188d
Merge pull request #56864 from juanvallejo/jvallejo/add-selector-kubectl-drain
Automatic merge from submit-queue (batch tested with PRs 55751, 57337, 56406, 56864, 57347). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add pod-selector kubectl drain

**Release note**:
```release-note
Added the ability to select pods in a chosen node to be drained, based on given pod label-selector
```

This patch adds the ability to select pods in a chosen node to be drained, based on given pod label-selector. Related downstream issue: https://github.com/openshift/origin/issues/17554

Further, it removes explicit, specific, pod-controller check. The `drain` command currently fails if a pod has a controller of a `kind` [not explicitly handled in the command itself](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/drain.go#L331). This causes `drain` to be unusable if a node contains pods managed by third-party, or "unknown" controllers.

Based on [this comment](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/drain.go#L353), the expectation was to fail if a pod's controller was not found for whatever reason. I believe that the `drain` command should not care about the existence of a pod controller. It should only care whether a pod has one, and act according to that controller kind. This solves a downstream bug: https://github.com/openshift/origin/issues/17563

cc @fabianofranz @deads2k @kubernetes/sig-cli-misc
2017-12-18 18:50:45 -08:00
Tim Hockin eba5b6092a Use k8s.gcr.io vanity domain for container images 2017-12-18 09:18:34 -08:00
juanvallejo 151398e961
add --pod-selector opt kubectl drain 2017-12-18 10:15:06 -05:00
Slava Semushin 97bb6cb9c7 make quick-verify: make the output a bit more readable by showing script names without full paths. 2017-11-21 19:12:26 +01:00
Di Xu fa143c6ddf add tests 2017-11-06 17:24:59 +08:00
Kenneth Owens 5590c1fb94 gets the correct version of kubernetes client for DaemonSet and StatefulSet History and Rollback and updates test-cmd for new versions 2017-11-03 10:16:50 -07:00
Kubernetes Submit Queue d595003e0d
Merge pull request #54449 from smarterclayton/get_with_options
Automatic merge from submit-queue (batch tested with PRs 54895, 54449). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update the get command to follow more conventions of commands

Pure code movement, builds on top of #54446 and only the last commit is new. Will make refactoring get easier.
2017-11-01 21:25:12 -07:00
Clayton Coleman d27a5a444e
Error for missing context is no longer altered 2017-10-31 23:36:15 -04:00
Kubernetes Submit Queue ed00d9c062
Merge pull request #54445 from crimsonfaith91/rem
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove created-by annotation

**What this PR does / why we need it**:
This PR removes `CreatedByAnnotation`.

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

**Release note**:

```release-note
The `kubernetes.io/created-by` annotation is no longer added to controller-created objects. Use the  `metadata.ownerReferences` item that has `controller` set to `true` to determine which controller, if any, owns an object.
```
2017-10-31 20:10:21 -07:00
Shiyang Wang e6405dccf6 add apply --force --overwrite deployment lables e2e test enhance 2017-11-01 00:21:14 +08:00
Kubernetes Submit Queue ee3a08a772
Merge pull request #54001 from cblecker/sed-func
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Extract gnu-sed detection into a function

**What this PR does / why we need it**:
Moves gnu-sed detection into a reusable function across scripts (considering it's in multiple places).

**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-10-31 03:09:46 -07:00
Kubernetes Submit Queue 81b1fa4588
Merge pull request #53796 from lichuqiang/kubectl_fix_1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix print format of rootScoped resourced in kubectl

**What this PR does / why we need it**:
remove _NAMESPACE_ filed when querying rootScoped resource with kubectl

**Which issue this PR fixes**

fixes #53767

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


**Release note**:
```release-note
NONE
```
2017-10-30 13:47:56 -07:00
Jun Xiang Tee efbfead4ef remove created-by annotation 2017-10-30 12:49:44 -07:00
Kubernetes Submit Queue 12e5db561e
Merge pull request #53768 from smarterclayton/chunking_cli
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Support api chunking in kubectl get

This enables chunking in the resource builder to make it easy to
retrieve resources in pages and visit partial result sets. This adds
`--chunk-size` to `kubectl get` only so that users can get comfortable
with the use of chunking in beta. Future changes will enable chunking
for all CLI commands so that bulk actions can be performed more
efficiently.

```
$ kubectl get pods --all-namespaces
... print batch of 500 pods ...
... print second batch of 500 pods ...
...
```

@kubernetes/sig-cli-pr-reviews @kubernetes/sig-api-machinery-pr-reviews

```release-note
`kubectl get` will by default fetch large lists of resources in chunks of up to 500 items rather than requesting all resources up front from the server. This reduces the perceived latency of managing large clusters since the server returns the first set of results to the client much more quickly.  A new flag `--chunk-size=SIZE` may be used to alter the number of items or disable this feature when `0` is passed.  This is a beta feature.
```
2017-10-29 15:59:54 -07:00
Clayton Coleman 4780ad0297
Support api chunking in kubectl get
This enables chunking in the resource builder to make it easy to
retrieve resources in pages and visit partial result sets. This adds
`--chunk-size` to `kubectl get` only so that users can get comfortable
with the use of chunking in beta. Future changes will enable chunking
for all CLI commands so that bulk actions can be performed more
efficiently.
2017-10-27 17:23:36 -04:00
Maru Newby adc338d330 Remove all traces of federation 2017-10-26 13:37:37 -07:00
Dr. Stefan Schimanski d51d7fd26f hack: rename verify-{staging- -> }imports.sh 2017-10-25 13:31:56 +02:00
Kubernetes Submit Queue 2ad7d6f711 Merge pull request #54083 from juanvallejo/jvallejo/update-resource-builder-cmd-drain
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update resource selector - kubectl drain

Followup to https://github.com/kubernetes/kubernetes/pull/52917

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

Updates resource builder in cmd/drain.go to parse resource args similar to other commands.

cc @liggitt
2017-10-24 14:16:39 -07:00
Kubernetes Submit Queue 6949b518d6 Merge pull request #54245 from deads2k/cli-03-postraw
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add kubectl create --raw -f

Adds `--raw` to `kubectl create` to match `kubectl get --raw`.  It re-uses the transport, reads the input stream (stdin or a single file for now) and posts directly to the endpoint specified.  This let's you direct data directly at a subresource (as a for instance).  I'd like to see this extended to `kubectl replace` too, so that we have full access to subresources via scripting without having to reproduce the transports.

@kubernetes/sig-cli-pr-reviews 

```release-note
add `--raw` to `kubectl create` to POST using the normal transport
```
2017-10-23 17:16:01 -07:00
Kubernetes Submit Queue ca8d97d673 Merge pull request #53743 from DirectXMan12/feature/polymorphic-scale-client
Automatic merge from submit-queue (batch tested with PRs 53743, 53564). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Polymorphic Scale Client

This PR introduces a polymorphic scale client based on discovery information that's able to scale scalable resources in arbitrary group-versions, as long as they present the scale subresource in their discovery information.

Currently, it supports `extensions/v1beta1.Scale` and `autoscaling/v1.Scale`, but supporting other versions of scale if/when we produce them should be fairly trivial.

It also updates the HPA to use this client, meaning the HPA will now work on any scalable resource, not just things in the `extensions/v1beta1` API group.

**Release note**:
```release-note
Introduces a polymorphic scale client, allowing HorizontalPodAutoscalers to properly function on scalable resources in any API group.
```

Unblocks #29698
Unblocks #38756
Unblocks #49504 
Fixes #38810
2017-10-23 13:39:07 -07:00
David Eads 58f39a15de add kubectl create --raw -f 2017-10-23 12:50:46 -04:00
Solly Ross 55e1f6a541 [make-rules] test grep should treat binary as text
The output of `go test` is passed throug a grep filter that's used when
producing junit output.  Unfortunately, when testing round-trip
conversions with random strings, grep can become convinced that the test
output is binary, and will truncate a failed test before any output is
displayed, showing "binary file (standard input) matches".

This forces grep to consider test output to be text, so that we always
see test results.
2017-10-19 13:21:03 -04:00
juanvallejo bb86297edf
minor test fixes; update test-cmd tests to match updated resource selector behavior 2017-10-19 10:13:20 -04:00
Kubernetes Submit Queue 9a7800f7d2 Merge pull request #52753 from munnerz/sample-controller
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

sample-controller: add example CRD controller

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

Adds a sample-controller example repository

fixes #52752

**Special notes for your reviewer**:

This is currently based on the sttts:sttts-codegen-scripts branch and should not be merged until that is (ref https://github.com/kubernetes/kubernetes/pull/52186)

**Release note**:

```
Add sample-controller repository
```

/cc @sttts @nikhita @colemickens
2017-10-19 02:32:12 -07:00
Kubernetes Submit Queue eb041b00ea Merge pull request #53609 from juanvallejo/jvallejo/set-user-specified-ns-dry-run-create
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add user-specified  ns to --dry-run created obj

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

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

Includes a namespace in a created resource's metadata when `--dry-run` is used if:
- a namespace was explicitly set by the user (via `--namespace`)
- No errors occur accessing the object's metadata

cc @fabianofranz @deads2k
2017-10-19 00:24:42 -07:00
James Munnelly 740afa0e65 Add sample CustomResourceDefinition controller
sample-controller: add API types

sample-controller: regenerate files

sample-controller: add implementation

sample-controller: update bazel

sample-controller: update make-rules and cache_go_dirs

sample-controller: Set noStatus tag. Remove openapi-gen tag.

sample-controller: add deletion tombstone handling logic

sample-controller: update README, remove use of reflect in UpdateFuncs

sample-controller: add OWNERS file

sample-controller: add LICENSE
2017-10-19 00:21:57 +01:00
Christoph Blecker f5e8eca20b
Extract gnu-sed detection into a function 2017-10-16 13:21:09 -07:00
lichuqiang 50ad6fbd06 add test case for querying rootScoped resources in cli 2017-10-13 14:24:02 +08:00
juanvallejo dd45076f8e
add tests 2017-10-11 10:34:10 -04:00
zhengjiajin 7a57754921 RBAC: Add test for create clusterrolebindding 2017-10-09 13:59:01 +08:00
juanvallejo b6e8e209b3
add tests 2017-10-06 12:01:12 -04:00
Kubernetes Submit Queue 6a2ec70a2d Merge pull request #53235 from cblecker/clean-fix-two
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move make clean to a static list

**What this PR does / why we need it**:
#51911 changed the functionality of `make clean` to use `git clean` to remove ignored files. This had unintended consequences, wiping things out like etcd. This changes it back to a static list, managed via a bash script. It's not optimal, but the static list of patterns is more up to date then it was keeping it in the make file.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-10-05 20:16:47 -07:00
Kubernetes Submit Queue 65cca36ebe Merge pull request #52917 from juanvallejo/jvallejo/support-multiple-node-selection
Automatic merge from submit-queue (batch tested with PRs 53454, 53446, 52935, 53443, 52917). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add --selector flag support

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

Adds --selector option to kubectl drain,cordon,uncordon, performing
each action on a list of nodes matching the given label.

If at least one node fails to be cordoned/uncordoned, the command will
continue to operate on any remaining nodes, uninterrupted, reporting
any errors it encounters along the way.

If at least one node fails to be drained, the command will halt, printing
the immediate error encountered, and a list of nodes yet to be drained
(including the node that just failed to be drained).

cc @kubernetes/sig-cli-misc @fabianofranz @soltysh
2017-10-05 05:06:33 -07:00
juanvallejo 3775a50cb8
add --selector flag support 2017-10-02 16:18:30 -04:00
Nikhita Raghunath 694630724a Rename TPR to CRD to be consistent
TPR has been completely removed. We should rename TPR
to CRD to be consistent with the nomenclature.
2017-10-01 21:13:24 +05:30
Kubernetes Submit Queue 6a02660fbf Merge pull request #52165 from mattjmcnaughton/mattjmcnaughton/52025-more-descriptive-make-test-error-message
Automatic merge from submit-queue (batch tested with PRs 53101, 53158, 52165). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

More descriptive error message for `make test`

**Which issue this PR fixes**
Fix #52025

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

The `[packages]` argument to `go test` can be confusing. If the
`package` does not begin with `./`, `go test` considers it relative to
`$GOPATH/src`. If it does begin with `./`, `go test` considers it
relative to `pwd`. `hack/make-rules/test.sh`, and thus `make test`, use
`go test`.

This commit adds a verify step to `hack/make-rules/test.sh`. Before we
run `go test`, we check the packages under test exist. If the user
specified the package path in the incorrect format - for example they
didn't prepend with `./` when they should have, the check logs a
suggestion of the alternative path they should use.

Running the test suites for a package is an activity many all first time
contributors will take. Hopefully including a more descriptive error
message, with a suggestion for a fix if applicable, will make this an
easier experience.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>

```release-note
NONE
```
2017-09-29 14:36:22 -07:00
Kubernetes Submit Queue 4425841ce2 Merge pull request #53158 from liggitt/update-pod-spec-versioned
Automatic merge from submit-queue (batch tested with PRs 53101, 53158, 52165). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Calculate patches for  commands using input version

Fixes #53040

the encoder used for encoding these objects while calculating patches does not have sufficient information to select a correct version when the object does not exist in all versions of a target group (like replicasets not existing in apps/v1beta1)

this PR wraps the encoder to first convert to the same version used to read the object (based on the mapping's GroupVersion)

long-term, we should switch UpdatePodSpecForObject to work on versioned objects and v1.PodSpec and avoid conversion altogether

```release-note
Fixes an issue with `kubectl set` commands encountering conversion errors for ReplicaSet and DaemonSet objects
```
2017-09-29 14:36:19 -07:00
Kubernetes Submit Queue 1b93686fe3 Merge pull request #51021 from zjj2wry/scale-selector-all
Automatic merge from submit-queue (batch tested with PRs 51021, 53225, 53094, 53219). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

"fix issue(#49965)kubectl scale also says that it can work based on a label selector or all"

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

**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-09-29 12:38:17 -07:00
Christoph Blecker 59c72047ab
Move make clean to a static list 2017-09-29 12:36:18 -07:00
Jordan Liggitt e3a8b5e223
Calculate patches for commands using input version 2017-09-29 13:03:18 -04:00
shashidharatd a570d316b8 Move k/test/integration/federation to k/federation/test/integration 2017-09-28 11:43:35 +05:30
mattjmcnaughton 99cdc069e2 More descriptive error message for `make test`
Fix #52025

The `[packages]` argument to `go test` can be confusing. If the
`package` does not begin with `./`, `go test` considers it relative to
`$GOPATH/src`. If it does begin with `./`, `go test` considers it
relative to `pwd`. `hack/make-rules/test.sh`, and thus `make test`, use
`go test`.

This commit adds a verify step to `hack/make-rules/test.sh`. Before we
run `go test`, we check the packages under test exist. If the user
specified the package path in the incorrect format - for example they
didn't prepend with `./` when they should have, the check logs a
suggestion of the alternative path they should use.

Running the test suites for a package is an activity many all first time
contributors will take. Hopefully including a more descriptive error
message, with a suggestion for a fix if applicable, will make this an
easier experience.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-09-26 19:52:33 -04:00
Kubernetes Submit Queue 63c1ed12aa Merge pull request #52761 from yuexiao-wang/validate-message
Automatic merge from submit-queue (batch tested with PRs 52880, 52855, 52761, 52885, 52929). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Adjust the validating messages

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>

**What this PR does / why we need it**:
1.  Adjust the validating messages for user understanding 
2.  Add error messages for easliy testing.
3.  Optimize the  code for switch case.

**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-09-24 04:30:07 -07:00
Kubernetes Submit Queue 4a0f41e4fa Merge pull request #52450 from juanvallejo/jvallejo/misc-err-msg-improvements
Automatic merge from submit-queue (batch tested with PRs 52485, 52443, 52597, 52450, 51971). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Error message / exit code fixes

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

Miscellaneous error message tweaks.
Makes the error message displayed in `kubectl get` more visible.
Returns exit code 1 if a patch fails.

Addresses the following downstream bugzillas:
- https://bugzilla.redhat.com/show_bug.cgi?id=1311786
- https://bugzilla.redhat.com/show_bug.cgi?id=1414227

cc @fabianofranz @kubernetes/sig-cli-misc
2017-09-23 18:48:58 -07:00
Kubernetes Submit Queue 963697564a Merge pull request #50672 from shiywang/fix0error
Automatic merge from submit-queue (batch tested with PRs 50890, 52484, 52542, 52567, 50672). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Fix return 0 error in DefaultSubCommandRun

Fixes https://github.com/kubernetes/kubernetes/issues/50644
@mengqiy most of our command didn't return 1 when error, is because it invoke `DefaultSubCommandRun` which created in this pr https://github.com/kubernetes/kubernetes/pull/35206, I'm not sure if it's ok to directly add an `os.Exit` in that function, so also cc @juanvallejo @fabianofranz for review.

also @apelisse  @mengqiy  I think we don't have any test for check return value now ? cmiiw, I will add some test in test-cmd since it's easy to write scripts check return value, wdyt ?
2017-09-23 16:26:56 -07:00
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