Commit Graph

607 Commits (630c8410759c005894f3189120ccb98542ecf69c)

Author SHA1 Message Date
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
Kubernetes Submit Queue b5f61ac129
Merge pull request #62657 from matthyx/master
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 all script shebangs to use /usr/bin/env interpreter instead of /bin/interpreter

This is required to support systems where bash doesn't reside in /bin (such as NixOS, or the *BSD family) and allow users to specify a different interpreter version through $PATH manipulation.
https://www.cyberciti.biz/tips/finding-bash-perl-python-portably-using-env.html
```release-note
Use /usr/bin/env in all script shebangs to increase portability.
```
2018-05-02 19:44:32 -07:00
Kubernetes Submit Queue 03eb9f687f
Merge pull request #62060 from WanLinghao/namespace_miss_fix
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 namespace miss bug

**What this PR does / why we need it**:
This  patch fixes  the namespace miss problems.
I am not sure if this is the correct way it should be fixed.
Just offer a solution.
**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 #62059

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-02 18:04:06 -07:00
WanLinghao a2c029f6c3 1.fix kubectl get * --all-namespaces
namespace miss error
	2.also add a test case
	modified:   pkg/kubectl/cmd/get/get.go
	modified:   hack/make-rules/test-cmd-util.sh
2018-05-02 11:27:22 +08:00
Kubernetes Submit Queue 8f571a0e9d
Merge pull request #63308 from liggitt/cronjob-set-test
Automatic merge from submit-queue (batch tested with PRs 63335, 63308). 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 set image test for sparse API group resource

Ensures set image works correctly on resources that do not exist in the preferred version of their API group

Tests scenario noticed in review of https://github.com/kubernetes/kubernetes/pull/63206#discussion_r185008596

```release-note
NONE
```
2018-05-01 19:31:08 -07:00
Maciej Szulik b7d4f15965
Remove Factory from more Run commands 2018-04-30 19:58:54 +02:00
Jordan Liggitt 5e24289f89
Add set image test for sparse API group resource 2018-04-30 13:28:46 -04:00
liz a80b5454af
Generated artefacts 2018-04-30 10:00:13 -04:00