Commit Graph

814 Commits

Author SHA1 Message Date
Aleksei Makhov
1777a356c8 fix unbound variable issue in verify.sh 2020-10-16 21:39:25 +03:00
Kubernetes Prow Robot
23e5a85648
Merge pull request #93627 from hasheddan/verify-py3
run make verify with python3 to fix publishing bot issue
2020-10-16 08:01:25 -07:00
Odin Ugedal
6dfdf05eaa
Add timeout config for node_e2e tests
Some test suits use more than the default 45m, resulting in the test to
crash.
2020-08-09 15:45:56 +02:00
Jordan Liggitt
f411880c73 Stop installing all commands before vetting 2020-08-02 10:56:46 -04:00
hasheddan
8accd354b0
Run make verify with python3 to fix publishing bot issue
verify-publishing-bot is experiencing errors importing pyyaml since
python3 was added to kubekins-e2e image. This changes make verify to run
verify-publishing-bot with python3.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2020-08-01 09:46:13 -05:00
Kubernetes Prow Robot
fbbc3ed359
Merge pull request #92490 from neolit123/1.19-increase-kubeadm-cmd-test-timeout
kubeadm: increase the timeout for cmd integration tests
2020-07-16 12:18:14 -07:00
Lubomir I. Ivanov
b086fad508 kubeadm: increase the timeout for kubeadm cmd integration tests 2020-07-13 02:21:57 +03:00
Anders Eknert
b423216a3b Presence of bearer token should cancel exec action
If a bearer token is present in a request, the exec credential plugin should accept that as the chosen method of authentication. Judging by an [earlier comment in exec.go](c18bc7e9f7/staging/src/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go (L217)), this was already intended. This would however not work since UpdateTransportConfig would set the GetCert callback which would then get called by the transport, triggering the exec plugin action even with a token present in the request. See linked issue for further details.

See #87369 for further details.

Signed-off-by: Anders Eknert <anders.eknert@bisnode.com>
2020-07-02 12:12:32 +02:00
Xiang Dai
e09bc312cb *.sh: cleanup all white noise
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
2020-05-29 09:56:00 +08:00
Stephen Augustus
edb98fb493 verify: Exclude verify-external-dependencies from make verify
Also adds verify-external-dependencies to QUICK_PATTERNS

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-05-12 18:07:14 -04:00
Kubernetes Prow Robot
b5f67110ed
Merge pull request #87746 from mattjmcnaughton/mattjmcnaughton/poc-compiling-kubelet-wo-docker
Support compiling Kubelet w/o docker/docker
2020-05-09 12:01:51 -07:00
Tim Hockin
04c2b1fbdc Purge almost all memories of godep 2020-05-07 21:49:00 -07:00
mattjmcnaughton
4a8da5e7b4
Add typecheck-dockerless
Ensure that k8s still passes the typecheck when the `dockerless` tag is
enabled. We perform a similar verify step for `providerless`.
2020-05-07 17:18:50 -04:00
Davanum Srinivas
14a0e86d1d
Avoid running files-remake in verify-all
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-04-30 11:35:35 -04:00
Davanum Srinivas
f981628ce8
move linting dependencies to hack/tools/tools.go
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-04-20 13:45:38 -04:00
Davanum Srinivas
12146cb4df
Do not include bazel related deps in root go.mod
- add ./hack/tools/go.mod, this makes ./hack/tools a distinct module
- hack/tools/tools.go undescore imports bazel related tools, over time we
can add others.
- hack/*.sh scripts will cd to hack/tools and go install tools from there

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-04-19 22:01:50 -04:00
Lubomir I. Ivanov
9bbd321fec remove /cluster/kubeadm.sh and /test/cmd/kubeadm.sh
/cluster/kubeadm.sh is used to find the kubeadm binary.
This file is legacy and is removed.

Remove /test/cmd/kubeadm.sh. This file contains a function that is used
to build kubeadm and invoke "make test". Move the function contents
to hack/make-rules/test-cmd.cmd.

Stop sourcing /test/cmd/kubeadm.sh in /test/cmd/legacy-script.sh.

Also remove the --kubeadm-path invocation as this can be handled
with an env. variable directly.
2020-04-09 00:47:15 +03:00
Benjamin Elder
becc4b7d57 remove unused manifest-tool rules 2020-02-13 14:58:26 -08:00
Jordan Liggitt
2a47900620 Remove unused KUBE_TEST_API logic 2020-01-13 09:09:46 -05:00
Jordan Liggitt
424d5e20df Remove testapi 2019-12-13 11:56:29 -05:00
Kubernetes Prow Robot
e68d7be680
Merge pull request #85457 from BenTheElder/typecheck-fun
Typecheck support for verifying providerless build
2019-12-05 13:50:17 -08:00
Benjamin Elder
b24dbac09a add hack/verify-typecheck-providerless.sh 2019-12-04 22:30:23 -08:00
Jordan Liggitt
9a868766ee Enable mutation detection 2019-11-28 02:26:38 -05:00
Kenichi Omichi
1b165fc440 Enable verify-import-aliases check in CI
To block violation of import-aliases rule, this enables
verify-import-aliases in CI system.
2019-11-08 19:17:39 +00:00
Jordan Liggitt
8618c09369 opt out of module mode for builds 2019-11-06 17:39:05 -05:00
Tim Hockin
a1ad4910dc Build: Use a better filter on find
In case the _workspace directory exists, filter it out.
2019-11-04 21:00:58 -08:00
Lubomir I. Ivanov
2c54160021 remove usage of the test/test_owners.* files
- remove update_owners.py; seems responsible for generating
test_owners files
- remove the existing test/test_owners.* files
- remove verify-test-owners.sh and references to it
2019-10-18 03:01:21 +03:00
Kubernetes Prow Robot
4f1c5b8cac
Merge pull request #81940 from carlory/fix-appserver
fix static check failures
2019-10-10 12:07:21 -07:00
carlory
f6bb24129e fix static check failures 2019-10-10 22:59:09 +08:00
Kubernetes Prow Robot
2b795b9825
Merge pull request #83284 from odinuge/node-e2e-host-reuse
Fix host reuse for e2e tests
2019-09-29 16:47:50 -07:00
Odin Ugedal
d17dc136a0
Fix host reuse for e2e tests
This will now filter the hosts in gcloud by project, instance name and
zone, to make sure we only reuse the correct hosts. Previously it would
try to reuse images outside the selected zone, resulting in a crash.

The resulting command will look like this:
$ gcloud compute instances list --project="my-project-123" --filter="name:'test-cos-beta-78-12499-16-0' AND zone:'europe-west6-b'"
2019-09-29 11:10:08 +02:00
zouyee
11746bcc19 using short flags instead with validate
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-09-25 23:08:50 +08:00
Katharine Berry
a6e25d5e67 Add KUBE_COVER_REPORT_DIR to specify coverage output dir. 2019-09-23 10:36:00 -07:00
Kubernetes Prow Robot
3a55875465
Merge pull request #81512 from odinuge/preemptible-node-tests
Add support for preemptible instances in node-e2e
2019-09-20 22:55:24 -07:00
Odin Ugedal
4f31d322a4
Fix GCE typo in test output 2019-08-17 13:11:19 +02:00
Odin Ugedal
e20c2b1f32
Add support for preemptible instances in node-e2e
Preemptible instances are cheaper, and the small chanse of a vm being
killed doesn't matter when running during development. This is a
tradeoff the user should be able to decide on.

More info here:
https://cloud.google.com/compute/docs/instances/preemptible

The default setting is false, so unless setting
PREEMPTIBLE_INSTANCES=true, everything will behave as before.

Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-08-17 13:09:45 +02:00
Jordan Liggitt
c64d6a39aa Only output json format from tests when building junit reports 2019-08-01 11:03:20 -04:00
Jordan Liggitt
93c02e164f Switch to json test output 2019-07-31 17:43:02 -04:00
Benjamin Elder
675f4bb642 correct flag order in make-help 2019-07-02 23:42:01 -07:00
David Eads
c1f8f6230b remove dead KUBE_TEST_API_VERSIONS from test-integration 2019-06-26 11:55:50 -04:00
Benjamin Elder
0fad8eb36c fix hack/make-rules/make-help.sh shellcheck failures 2019-06-25 09:49:45 -07:00
Kubernetes Prow Robot
465e96535d
Merge pull request #78836 from dims/verify-import-aliases-during-typecheck
Verify import aliases
2019-06-19 21:11:01 -07:00
Davanum Srinivas
9f0050cb44
verify import aliases
- Added scripts for update and verify
- golang AST code for scanning and fixing imports
- default regex allows it to run on just test/e2e.* file paths
- exclude verify-import-aliases.sh from running in CI jobs

Change-Id: I7f9c76f5525fb9a26ea2be60ea69356362957998
Co-Authored-By: Aaron Crickenberger <spiffxp@google.com>
2019-06-15 22:31:39 -04:00
Kubernetes Prow Robot
088411f77f
Merge pull request #78978 from sttts/sttts-staging-unit-tests
hack/make-rules/test.sh: run all staging unit tests
2019-06-15 03:46:24 -07:00
Kubernetes Prow Robot
9f1548cdd9
Merge pull request #78656 from liggitt/compatibility-test-cleanup
Add helper script to regenerate API compatibility data, testdata README
2019-06-14 11:53:15 -07:00
Kubernetes Prow Robot
0f5650d68b
Merge pull request #75859 from k-toyoda-pi/fix_shellcheck_failure_make-rules
fix shellcheck failures in /hack/make-rules/test.sh
2019-06-13 20:36:47 -07:00
Dr. Stefan Schimanski
e2c6bc35a9 hack/make-rules/test.sh: run all staging unit tests 2019-06-13 14:07:37 +02:00
Jordan Liggitt
7a96057755 Add helper script to regenerate API compatibility data 2019-06-03 10:18:08 -04:00
Jean Rouge
1bd3d8b929 Not asking for sudo passwords for password-less sudo users any more
Running hack/make-rules/test-e2e-node.sh or test/e2e_node/conformance/run_test.sh
with a password-less sudo user on a dev box right now requires to first
create a password for that user, and then type it every time one wants
to run these tests. This patch is fixing this by not asking for sudo
credentials if it seems the user can run any command without a
password.

Signed-off-by: Jean Rouge <rougej+github@gmail.com>
2019-05-29 14:04:13 -07:00
Kohei Toyoda
62d5eb524b
Merge branch 'master' into fix_shellcheck_failure_make-rules 2019-05-17 08:43:08 +09:00
Kubernetes Prow Robot
fe895f0411
Merge pull request #76420 from k-toyoda-pi/fix_shellcheck_failure_make-rules_3
fix shellcheck failures in /hack/make-rules/update.sh,verify.sh
2019-05-15 19:19:42 -07:00
Khaled Henidak(Kal)
205eaed1a7 add legacy cloud providers unit tests to [make test] 2019-05-09 22:55:15 +00:00
toyoda
34a120fc42 fix shellcheck failures in /hack/make-rules/test.sh 2019-05-09 17:47:12 +09:00
toyoda
bbe4a9fdc5 fix shellcheck failures in /hack/make-rules/clean.sh,test.sh,vet.sh 2019-05-09 13:40:35 +09:00
toyoda
9a5655c915 fix shellcheck failures in /hack/make-rules/update.sh,verify.sh 2019-05-07 14:27:26 +09:00
Kubernetes Prow Robot
576ec2cee4
Merge pull request #77137 from Huang-Wei/make-clean-regression
Fixed a `make clean` regression
2019-05-01 15:50:32 -07:00
Kubernetes Prow Robot
2dc3509b6d
Merge pull request #76867 from xichengliudui/fixshellcheckfailures-29
fix shellcheck failures on vet.sh
2019-04-27 16:48:21 -07:00
aaa
a4a4abd428 update pull request
update pull request on vet.sh
2019-04-27 10:56:43 -04:00
Wei Huang
7193252386
Fixed a make clean regression. 2019-04-26 11:52:21 -07:00
aaa
5f719707f2 Fix shellcheck failures on clean.sh and cache_go_dirs.sh
update pull request
2019-04-21 06:24:08 -04:00
aaa
7a39c99297 Fix shellcheck failures on test-e2e-node.sh and test-integration.sh 2019-04-11 13:47:34 -04:00
Kubernetes Prow Robot
98b6f35999
Merge pull request #74610 from oomichi/issue/74038-2
Enable StorageObjectInUseProtection by default
2019-04-16 02:11:29 -07:00
Kubernetes Prow Robot
9f49dd2811
Merge pull request #76582 from danielqsj/gofmt
run update-gofmt when make update
2019-04-15 21:01:19 -07:00
Kubernetes Prow Robot
92562d5bc0
Merge pull request #76253 from YoubingLi/bugfix
Fixes # 76094 - Check the content of WHAT for Makefile's verify target
2019-04-15 18:05:05 -07:00
danielqsj
187986cb65 run update-gofmt in make update 2019-04-15 15:01:54 +08:00
Youbing Li
8a56ebed82 Check the content of WHAT for Makefile's verify target 2019-04-08 22:53:23 -04:00
Christoph Blecker
668a288595
Remove unneeded scripts 2019-04-07 12:08:41 -07:00
Kubernetes Prow Robot
0c32c22b2e
Merge pull request #75546 from fabriziopandini/e2e-kubeadm-first-class
Implement make test-e2e-kubeadm
2019-04-05 04:59:19 -07:00
Jordan Liggitt
2ea3cbdcbc Update hack scripts to use go mod 2019-04-03 10:19:39 -04:00
Jordan Liggitt
8ead4b059f Add kubernetes/kubernetes tools.go imports 2019-04-03 09:15:39 -04:00
Wei Huang
66a3094419
give users option to suppress detailed output in integration test 2019-04-02 17:27:32 -07:00
fabriziopandini
2cb2a979d4 e2e-kubeadm-first-class 2019-03-28 16:29:56 +01:00
Andrew Sy Kim
e26157df07 fix link to etcd install docs 2019-03-26 13:40:18 -04:00
Kubernetes Prow Robot
4c16fb78b3
Merge pull request #74242 from xichengliudui/fixshellcheck19021903
fix shellcheck in hack/make-rules/...
2019-03-21 21:36:17 -07:00
Haowei Cai
5d0bef342a apiextensions: commit generated openapi definition 2019-03-13 15:15:34 -07:00
Kubernetes Prow Robot
88a685feef
Merge pull request #74807 from runyontr/test-cmd-kubeadm-isolation
Kubeadm test Isolation: #74464
2019-03-06 17:59:52 -08:00
Thomas Runyon
1e44e33517 pulled kubeadm tests out of runTests to run before tests in test/cmd
Added timeout for https://github.com/kubernetes/kubeadm/issues/1430
2019-03-01 12:17:25 -05:00
Zhen Wang
6df207bdaa allows configuring NPD image version in node e2e test and fix the test 2019-02-26 21:29:50 -08:00
Kenichi Omichi
ede5477697 Enable StorageObjectInUseProtection by default
StorageObjectInUseProtection plugin of admission controller adds
the flag `kubernetes.io/pvc-protection` or `kubernetes.io/pv-protection`
to newly created PVCs or PV. In case a user deletes a PVC or PV the PVC
or PV is not removed until the finalizer is removed from the PVC or PV
by PVC or PV Protection Controller.
We are testing this plugin on the e2e tests of "PV Protection" because
most setup scripts enable that like:

* cluster/centos/config-default.sh: Enabled
* cluster/gce/config-default.sh: Enabled
* cluster/gce/config-test.sh: Enabled
* cluster/kubemark/gce/config-default.sh: Enabled
* hack/local-up-cluster.sh: Enabled
* cluster/juju/layers/kubernetes-master/reactive/kubernetes_master.py: Disabled

As we are testing it normally, it is nice to enable the plugin by
default.
2019-02-26 18:08:44 +00:00
xichengliudui
ec5fddfe4f fix shellcheck in hack/make-rules/...
update pull request

update pull request

update pull request

update pull request

update pull request

update pull request

update pull request

update pull request
2019-02-26 00:56:36 -05:00
Kubernetes Prow Robot
0133d14170
Merge pull request #72939 from runyontr/test-cmd-what
Test cmd what
2019-02-23 02:54:36 -08:00
Xiang Dai
36065c6dd7 delete all duplicate empty blanks
Signed-off-by: Xiang Dai <764524258@qq.com>
2019-02-23 10:28:04 +08:00
Thomas Runyon
f97170ea38 Merge remote-tracking branch 'upstream/master' into test-cmd-what 2019-02-21 11:35:23 -05:00
Kubernetes Prow Robot
d60b7d6a64
Merge pull request #73866 from apelisse/add-ssa-tests
Add basic server-side apply test to test-cmd
2019-02-20 11:33:02 -08:00
Ben Moss
34ac4d9ee9 Update deprecated links 2019-02-15 09:13:07 -05:00
Antoine Pelisse
308c981633 Add basic server-side apply test to test-cmd 2019-02-08 16:51:29 -08:00
Kubernetes Prow Robot
999e2e0ce8
Merge pull request #73581 from krzysied/test_KUBE_JUNIT_REPORT_DIR_revert
KUBE_JUNIT_REPORT_DIR fixes
2019-02-08 02:39:14 -08:00
Krzysztof Siedlecki
c20262eb33 adding FULL_LOG flag 2019-02-07 12:04:43 +01:00
mattjmcnaughton
2d3ad78cf9 Support make test WHAT=path/to/pkg/...
In 99cdc069e2, we added a check for
whether the directory the user was attempting to test existed or not.
However, adding this check prevented us from running `make test
WHAT=./path/to/pkg/...`, because we believed that `./path/to/pkg/...`
wasn't a valid path to a directory.

Fix this by stripping `/...` before checking whether the directory
exists.
2019-02-05 18:57:02 -05:00
Thomas Runyon
1a821ff5cf Merge remote-tracking branch 'upstream/master' into test-cmd-what
Conflicts:
	test/cmd/legacy-script.sh
2019-01-26 07:40:33 -05:00
Thomas Runyon
ba901aac5f modified hack scripts to referenced moved kubeadm.sh file. 2019-01-23 05:37:09 -05:00
Roy Lenferink
b18bc2ea79 Improved some more bash script variable definitions 2019-01-21 23:11:58 +01:00
Roy Lenferink
6df3deb4bc Bash script syntax improvements 2019-01-19 13:58:58 +01:00
Roy Lenferink
a5d0616bdc Improving syntax for bash scripts 2019-01-18 19:17:16 +01:00
Thomas Runyon
163844cb13 Added ability to execute subsets of cli tests 2019-01-15 16:20:50 -05:00
Jordan Liggitt
9229399bd6 Remove build/verify scripts for swagger 1.2 API docs, API server swagger ui / swagger 1.2 config 2019-01-15 13:33:06 -05:00
Sen Lu
7e76524766 add an env to skip readonly-packages check 2019-01-11 16:46:51 -08:00
Kubernetes Prow Robot
4fec22b3e4
Merge pull request #72745 from ncdc/int-tests-stop-special-casing-KUBE_TEST_ARGS
int tests: stop special casing KUBE_TEST_ARGS
2019-01-10 01:18:51 -08:00
Kubernetes Prow Robot
152226c557
Merge pull request #71198 from cofyc/go1.11-GOFLAGS-env
No need to pass GOFLAGS to $goflags variables with go 1.11
2019-01-09 23:35:09 -08:00
Andy Goldstein
4c34895e0a
int tests: stop special casing KUBE_TEST_ARGS
Stop special casing KUBE_TEST_ARGS and limiting the API
group/version settings to "v1" when running the tests. This was
helpful in the past when we used to test multiple values for
KUBE_TEST_API_VERSIONS - if you were specifying KUBE_TEST_ARGS to run a
single test case, you probably didn't want to have it tested for
multiple values of KUBE_TEST_API_VERSIONS.

Now, however, KUBE_TEST_API_VERSIONS comes from
KUBE_AVAILABLE_GROUP_VERSIONS by default, which is a single list instead
of multiple, so we shouldn't need to special case KUBE_TEST_ARGS any
more. This is especially necessary because certain tests that are using
testapi break if KUBE_TEST_API_VERSIONS is just "v1".

Signed-off-by: Andy Goldstein <goldsteina@vmware.com>
2019-01-09 14:58:26 -05:00
Christoph Blecker
b19fb0a77e
Clean up artifacts variables in hack scripts 2018-12-19 15:17:13 -08:00
Christoph Blecker
d90ae78a86
Provide option to split godeps tests from main verify job 2018-12-11 16:42:45 -08:00
Yecheng Fu
ce22322ef1 No need to pass GOFLAGS to $goflags variables.
In go 1.11, go commands will use `GOFLAGS` as default flags, see
https://golang.org/doc/go1.11#go_command.

There is no need to pass GOFLAGS to $goflags, and if we do, go commands
will fail with "duplicate flags" error, e.g.

```
$ make test-integration WHAT=./test/integration/scheduler GOFLAGS="-v"
...
go test: v flag may be set only once
run "go help test" or "go help testflag" for more information
...
```
2018-11-27 09:53:02 +08:00
Jordan Liggitt
91980a0f61 Add verification script for test feature gate modification 2018-11-21 11:51:33 -05:00
Maciej Szulik
e37c63ea71
Add cli-runtime to make tests 2018-10-10 21:07:38 +02:00
Wei-Tsung Lin
ef06031dce make test zone an option in test-e2e-node.sh script 2018-09-12 11:02:34 -07:00
Antoine Pelisse
967280b58e Add --server-dry-run flag to kubectl apply 2018-09-02 13:13:46 -07:00
Kubernetes Submit Queue
4733b85714
Merge pull request #67816 from junxu/make_test_dirname_err
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 "hack/make-rules/test.sh"

**What this PR does / why we need it**:
For “make test”, it will output "dirname: missing operand".

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

```
2018-08-26 15:51:14 -07:00
Jordan Liggitt
3bd1824ed6
Add verify script for staging repo metadata files 2018-08-24 09:14:33 -04:00
junxu
49574c68c9 Fix the "dirname: missing operand" error of "make test" 2018-08-24 06:25:07 -04:00
Yecheng Fu
dc4a8a6696 Revert "Passing KUBE_TEST_ARGS variable to make through process environment"
This reverts commit fda0edcd1c.
2018-07-31 16:52:37 +08:00
Kubernetes Submit Queue
0bf74270e3
Merge pull request #66061 from cofyc/prefer_using_process_environments
Automatic merge from submit-queue (batch tested with PRs 66410, 66398, 66061, 66397, 65558). 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>.

Passing `KUBE_TEST_ARGS` variable to make through process environment instead of command line flags

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

Passing `KUBE_TEST_ARGS` variable to make through process environment instead of command line flags.

 `$` character has special meaning in `make`, if `KUBE_TEST_ARGS` contains `$`, it cannot be passed to `make test`. Actually, we can simply pass variables to make through process environment. This makes following scenario to work:

```
export KUBE_TEST_ARGS='-run ^TestVolumeBinding$'
make test-integration WHAT=./test/integration/scheduler
```

**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-07-20 18:51:09 -07:00
Yecheng Fu
fda0edcd1c Passing KUBE_TEST_ARGS variable to make through process environment
instead of command line flags.
'$' character has special meaning in make, prefer passing variables
through process environment.
2018-07-16 10:16:40 +08:00
Kubernetes Submit Queue
50715588ae
Merge pull request #66039 from liggitt/disable-initializers
Automatic merge from submit-queue (batch tested with PRs 66011, 66111, 66106, 66039, 65745). 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>.

Disable initializers by default

The API group driving this field is not enabled by default, and it does not appear that these will progress beyond the alpha phase.

Remove the admission plugin from default configurations.

/sig api-machinery
/cc @smarterclayton

```release-note
The alpha `Initializers` admission plugin is no longer enabled by default. This matches the off-by-default behavior of the alpha API which drives initializer behavior.
```
2018-07-12 17:57:12 -07:00
Jeff Grafton
cf8865cb15 Don't delete pkg/generated/bindata.go in make clean 2018-07-11 10:02:34 -07:00
Jordan Liggitt
d98cbb2332
Disable initializers by default 2018-07-10 15:14:32 -04:00
Kubernetes Submit Queue
fc09e89d1c
Merge pull request #65927 from BenTheElder/fix-visibility
Automatic merge from submit-queue (batch tested with PRs 65882, 65896, 65755, 60549, 65927). 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 visibility of testdata for //test/cmd:legacy-script

**What this PR does / why we need it**: fixes some BUILD visibility, albeit for a relatively unused target

**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-07-07 18:41:15 -07:00
Kubernetes Submit Queue
08ed3a81f5
Merge pull request #65882 from cblecker/verify-gen-files
Automatic merge from submit-queue (batch tested with PRs 65882, 65896, 65755, 60549, 65927). 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 script to verify generated files

**What this PR does / why we need it**:
This is probably *really* heavy handed fix to this, but it will catch issues in presubmit.

Basically, takes a copy of the repo, clears out anything that is ignored from the git tree, runs `make generated_files`, and looks for a git diff. If there is one, error. Anything that is properly gitignored won't cause a diff, but anything that is *supposed* to be checked in, but is different, this will catch.

**Special notes for your reviewer**:
I'm open to more elegant answers, but this will at least stop it from happening for now.

**Release note**:
```release-note
NONE
```
2018-07-07 18:41:03 -07:00
Benjamin Elder
ca79547e92 fix visibility of testdata for //test/cmd:legacy-script 2018-07-06 16:08:20 -07:00
Christoph Blecker
2b9022cf38
Add script to verify generated files 2018-07-05 14:06:54 -07:00
David Eads
a6f5dddc4f move test-cmd guts to separate sig-cli maintained directory 2018-07-05 11:38:26 -04:00
Kubernetes Submit Queue
df1826c9d7
Merge pull request #65786 from juanvallejo/jvallejo/update-template-printer-check
Automatic merge from submit-queue (batch tested with PRs 65715, 65786). 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 --template printer defaulting

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

Depends on https://github.com/kubernetes/kubernetes/pull/65711
The relevant commit for this PR is the last one (`
fix go-template defaulting for commands w default output format`)

cc @deads2k @soltysh
2018-07-04 06:18:08 -07:00
Kubernetes Submit Queue
5a7bdd3eec
Merge pull request #65715 from deads2k/cli-82-rbac-fail
Automatic merge from submit-queue (batch tested with PRs 65715, 65786). 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>.

fail on rbac resources of non-v1 versions in reconcile

Reconcile only supports rbac/v1 and other resources are skipped.  This is good, except that only RBAC resources should really fail.  This makes it fail.

@kubernetes/sig-cli-maintainers 

```release-note
NONE
```
2018-07-04 06:18:05 -07:00
juanvallejo
122e748e18
fix go-template defaulting for commands w default output format
Fixes defaulting done for commands that default to a specific output
format (such as yaml, json) when a --template flag is provided and no
explicit --output value is given.

Under the above case, these commands will now properly default to
honoring the --template argument given, and default their --output
format to "go-template".
2018-07-03 17:50:33 -04:00
juanvallejo
25a4932653 add --template tests for commands
Adds --template printing test-cmd tests for the following commands:
kubectl annotate, kubectl apply, kubectl autoscale, kubectl
convert, kubectl create, kubectl expose, kubectl get, kubectl label,
kubectl patch.
2018-07-03 13:53:06 -04:00
David Eads
58136ee568 fail on rbac resources of non-v1 versions in reconcile 2018-07-02 13:07:16 -04:00
Jordan Liggitt
613b302b98
Fix bug printing openapi columns 2018-06-28 19:33:22 -04:00
juanvallejo
508145e529
special-case template printing in get.go 2018-06-22 14:58:27 -04:00
Jordan Liggitt
f78230881c
stop returning invalid json fields in CRD OpenAPI schemas 2018-06-20 16:22:20 -04:00
Kubernetes Submit Queue
8bc2fb0207
Merge pull request #54372 from thockin/make-genfiles-cleanup
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>.

Overhaul Makefile for generated code

Calculate all go dependencies in a single Go program, rather than a complicated series of `go list` invocations and `Makefile` logic.  This simplifies the
Makefile dramatically.

Also adds tests to ensure the dependencies stay correct.  This test is pretty slow, though.

Also fixes a few anomalies found by the test.

Fixes #54371

```release-note
NONE
```
2018-06-19 18:43:43 -07:00
Kubernetes Submit Queue
fa20f87f1f
Merge pull request #59579 from fbac/kubectl-cani-exitcode
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 exit code 1 on not allowed to kubectl auth can-i

What this PR does / why we need it:
kubectl auth can-i verb resource always returns 0 status, even if the user can't <verb> <resource>

With this commit, kubectl will return exit code 1 when a verb is not allowed. It doesn't affect quiet option.

Release note:
```release-note
Fix kubectl auth can-i exit code. It will return 1 if the user is not allowed and 0 if it's allowed.
```
2018-06-05 07:01:06 -07:00
Tim Hockin
f75ffe50a1 Add a helper tool to emit Makefile snippets
This loads the whole go universe one time, so should be faster that
repeated calls to `go list`
2018-06-04 15:04:21 -07:00
Tim Hockin
4bb2118fb8 Simplify find in cache_go_dirs.sh 2018-06-04 15:04:21 -07:00
Kubernetes Submit Queue
5f578f3385
Merge pull request #63979 from soltysh/drop_reapers
Automatic merge from submit-queue (batch tested with PRs 63859, 63979). 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>.

Drop reapers

/assign @deads2k @juanvallejo 

**Release note**:
```release-note
kubectl delete does not use reapers for removing objects anymore, but relies on server-side GC entirely
```
2018-05-26 00:32:11 -07:00
Maciej Szulik
2a76535018
Remove initializer test
Initializers are alpha, broken and a subject for removal. They don't
work well with finalizers and the previous hack present in deployment
and replicaset reapers was just hiding this problem.
2018-05-25 22:18:10 +02:00
Maciej Szulik
383872615d
Remove kubectl reapers 2018-05-25 22:18:05 +02:00
Kubernetes Submit Queue
f33aed89d1
Merge pull request #64183 from WanLinghao/ctl_set_subject_fix
Automatic merge from submit-queue (batch tested with PRs 63232, 64257, 64183, 64266, 64134). 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 kubectl set subject --all option invalid bug

**What this PR does / why we need it**:
Fix the kubectl set subject --all option invalid bug and add test cases for it
**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 #64182

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-25 08:24:19 -07:00
Kubernetes Submit Queue
fa354b3f68
Merge pull request #64174 from liggitt/correct-openapi-extensions
Automatic merge from submit-queue (batch tested with PRs 64174, 64187, 64216, 63265, 64223). 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>.

Correctly identify types served in the kube-apiserver openapi doc

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

Split out from https://github.com/kubernetes/kubernetes/pull/63893

```release-note
The kube-apiserver openapi doc now includes extensions identifying APIService and CustomResourceDefinition kinds
```
2018-05-24 09:41:09 -07:00
WanLinghao
ddbd9d20cb fix kubectl set subject --all option invalid bug 2018-05-24 09:17:06 +08:00
Kubernetes Submit Queue
420071d86e
Merge pull request #60636 from PhilipGough/keys-from-cm-patch
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 env from resource with keys & updated tests

**What this PR does / why we need it**:
This change allows users to pull environment from specific keys in secrets and configmaps using the `kubectl set env` command. User can provide a list of comma-separated keys with the `--keys` flag.

This can be useful when a number of applications want to share a configuration object but don't want to pollute a resource with unused environment

Improves test coverage of set env command

**Release note**:

```
Allow kubectl set env to specify which keys to import from a resource
```
2018-05-23 15:51:01 -07:00
Nail Islamov
3b5afd8809
Use DeleteOptions.PropagationPolicy instead of OrphanDependents (deprecated) in kubectl 2018-05-23 16:59:53 +10:00
Kubernetes Submit Queue
f9c8898116
Merge pull request #64034 from deads2k/cli-62-wait
Automatic merge from submit-queue (batch tested with PRs 64034, 64072, 64146, 64059, 64161). 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 wait

Adds a `kubectl wait --for=[delete|condition=condition-name] resource/string` command.  This allows generic waiting on well behaved conditions and for a resource or set of resources to be deleted.

This was requested for delete to do foreground deletion

WIP because I need to add test cases.


@kubernetes/sig-cli-maintainers this is using a separation of concerns made possible by the genericclioptions to make an easily unit testable command.
@smarterclayton 

```release-note
adds a kubectl wait command
```
2018-05-22 19:20:12 -07:00
Jordan Liggitt
43551e8208
Correctly identify types served in the kube-apiserver openapi doc 2018-05-22 20:57:18 -04:00
David Eads
76794643c5 add wait 2018-05-22 08:47:42 -04:00
PhilipGough
027d15e58c
Allow env from resource with keys & updated tests 2018-05-22 09:04:45 +01:00
WanLinghao
5e9e3afb2e kubectl: add aggregation rule support to clusterrole 2018-05-18 19:44:23 +08:00
Antoine Pelisse
f2b48a90df diff: Fix broken Local() logic
Local and Live functions where doing and returning the same thing,
giving empty results by default. Fix the local function by copying the
objects before fetching the live version.
2018-05-16 10:27:56 -07:00
Jordan Liggitt
746bca241f
print result object from kubectl taint correctly 2018-05-14 14:21:52 -04:00
Borja Aranda
9fa269a5e5 Fix kubectl auth can-i exit errcode 2018-05-11 16:41:21 +02:00
Kubernetes Submit Queue
8ce536df1a
Merge pull request #62665 from liztio/kubeadm-e2e
Automatic merge from submit-queue (batch tested with PRs 62665, 62194, 63616, 63672, 63450). 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>.

Kubeadm e2e

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

Provides in-tree E2E tests for the Kubeadm subproject

**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 [kubeadm#456](https://github.com/kubernetes/kubeadm/issues/456)

**Special notes for your reviewer**:

The weird way tests are executed mirrors `e2e_node`. A future pull request will add a frontend for these tests to kubetest, which will abstract away much of this detail.

**Release note**:
```release-note
NONE
```
2018-05-10 12:56:12 -07:00