Commit Graph

6686 Commits (630c8410759c005894f3189120ccb98542ecf69c)

Author SHA1 Message Date
Weibin Lin 2e79fd6954 remove incomplete check of ipvs modules in hack/local-up-cluster.sh 2018-07-28 14:43:42 +08:00
stewart-yu 649b46ff1d fix verify about import error 2018-07-28 07:54:16 +08:00
Davanum Srinivas b42efcf63c
Switch off leader election for scheduler and kube/cloud controller
We now have leader election on by default, for a single node
local-up-cluster, this is not needed. Let's switch it off

Change-Id: I5cc4c3b9f74e318f378f239d1e8ee84603b3a6ef
2018-07-27 18:57:09 -04:00
Davanum Srinivas b96969347d
Grab docker log using a soft link in local-up-cluster
Would be useful to debug problems like timeouts and missing images etc
for the local e2e jobs.

Change-Id: I959db8e189cafef0f6a80fc0b1d865d1cb7f1de7
2018-07-27 15:35:01 -04:00
Davanum Srinivas d98c21e912
enable etcd logging in local-e2e jobs
We are not saving the etcd logs and just redirecting the output
to /dev/null. In this change, we set ETCD_LOGFILE to the same
directory where we log other kube relates processes.

Change-Id: I719a941665b749b864f2efdcdfc7ddc7b2a61776
2018-07-27 14:50:40 -04:00
Aaron Crickenberger a9aa892177 Exit gce kube-up.sh early if openssl is LibreSSL
macOS has an openssl binary, but it's actually LibreSSL, which
doesn't play well with the easyrsa script that cluster/gce/util.sh
uses to generate certs

Instead of waiting until we generate certs to discover easyrsa doesn't
work, consider openssl a prereq for gce, and include a check for the
version string starting with OpenSSL

Also, mirror kube-up.sh's "... calling" output in kube-down.sh
2018-07-26 14:48:51 -07:00
David Eads 43a45fb217 fix godep licenses for new root 2018-07-26 11:56:04 -04:00
Kubernetes Submit Queue 446cf20c9f
Merge pull request #65242 from brandondr96/workbranch
Automatic merge from submit-queue (batch tested with PRs 62423, 66180, 66492, 66506, 65242). 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>.

Adding IKS functionality to kubemark

**What this PR does / why we need it**:
This PR adds bash scripts in which kubemark is able to be run on IKS clusters. This adds versatility to the testing ability of kubemark by adding another cloud provider and example of use. The scripts to clean up kubemark after use are also included. In addition to this, minor changes were added to other kubemark related files to increase cloud-provider flexibility.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
No issues will be fixed, as this is an extension to a feature.

**Special notes for your reviewer**:
I currently have the IKS scripts separate from the default ones, which are mainly based off of GCE. If it is preferable, I could combine them into single scripts which prompt the user to choose which cloud provider to test. If there are any issues with the scripts or code, please let me know. Thank you!

**Release note**:

```release-note
NONE
```
2018-07-23 12:32:17 -07:00
Brandon Dalla Rosa 510f6b8916 Adding IKS functionality to kubemark 2018-07-23 11:42:22 -04: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
Kubernetes Submit Queue 81b072a40b
Merge pull request #66447 from liggitt/api-violation-owner
Automatic merge from submit-queue (batch tested with PRs 66341, 66405, 66403, 66264, 66447). 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 api rules list under api-approvers-owned package

Additions to this list should be rare and carefully reviewed

```release-note
NONE
```
2018-07-20 16:02:17 -07:00
Jordan Liggitt 9e7fbf42c8
Move api rules list under api-approvers-owned package 2018-07-20 10:16:08 -04:00
Kubernetes Submit Queue af8292a0d6
Merge pull request #66098 from apelisse/improve-verify-generated-docs
Automatic merge from submit-queue (batch tested with PRs 66098, 66389, 66400, 66413, 66378). 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>.

verify-generated-docs: Use exit code rather than comparison to empty …

…string

Checking the exit code rather than the empty string has the advantage
that you can identify what was found (comparison consumes the string, so
it's not printed). It makes debugging much easier when something is wrong.

One of my pull-request is failing saying that I need to run update, but it keeps saying that even after I ran update. And since I can't see what's wrong, it's quite hard to debug.



**What this PR does / why we need 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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-20 05:30:04 -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 c861ceb41a
Merge pull request #66116 from chenyb4/kubeadm_check
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 kubeadm checks import error

kubeadm checks package import path exist "kubernetes/test",
So change the import path.
* move "k8s.io/kubernetes/test/e2e_node/system" directory file
  tto "k8s.io/kubernetes/cmd/kubeadm/app/util/system" and change checks import
* remove "k8s.io/kubernetes/test/e2e_node/system" directory

Issues report link:
https://github.com/kubernetes/kubeadm/issues/976

Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>



**What this PR does / why we need 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 #https://github.com/kubernetes/kubeadm/issues/976

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-15 14:52:43 -07:00
Kubernetes Submit Queue 614e3adda0
Merge pull request #65737 from roycaihw/api-linter
Automatic merge from submit-queue (batch tested with PRs 64181, 65737). 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>.

API linter framework and namesMatch API rule

**What this PR does / why we need it**:
Bump kube-openapi dependency to use the [API linter framework](https://github.com/kubernetes/kube-openapi/pull/83) in k/k OpenAPI spec generation procedure. 

Currently one API rule is enforced: 
"Go field names must be CamelCase. JSON field names must be camelCase. Other than capitalization of the initial letter, the two should almost always match. No underscores nor dashes in either."

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

**Special notes for your reviewer**:
Most code change in this PR was generated (~1700 lines). Please see commits for detail.

**Release note**:

```release-note
NONE
```

/sig api-machinery
/cc @pwittrock @mbohlool
2018-07-13 18:00:00 -07:00
Yuanbin.Chen f2eee3fe2a Fix kubeadm checks import error
kubeadm checks package import path exist "kubernetes/test",
So change the import path.

  * move "k8s.io/kubernetes/test/e2e_node/system" directory file
    to "k8s.io/kubernetes/cmd/kubeadm/app/util/system"
  * change system package import path
  * remove "k8s.io/kubernetes/test/e2e_node/system" directory

Issues report link:
https://github.com/kubernetes/kubeadm/issues/976

Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>
2018-07-13 14:27:46 +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
Antoine Pelisse fe0aa25c14 verify-generated-docs: Use exit code rather than comparison to empty string
Checking the exit code rather than the empty string has the advantage
that you can identify what was found (comparison consumes the string, so
it's not printed). It makes debugging much easier when something is wrong.
2018-07-11 21:26:40 -07:00
Haowei Cai 6ad8c5c596 Rename violations.report to violation_exceptions.list 2018-07-11 14:13:12 -07:00
Jeff Grafton cf8865cb15 Don't delete pkg/generated/bindata.go in make clean 2018-07-11 10:02:34 -07:00
Haowei Cai 3af6061e76 Use kube-openapi cmd in Make rules
check in existing API rule violations;
the Make rule fails if generated violation report differs from the
checked-in violation file and prints error message;
add documentation.
2018-07-10 17:53:24 -07:00
Haowei Cai cec89982b6 Add kube-openapi cmd to required binaries 2018-07-10 17:51:31 -07:00
Jordan Liggitt d98cbb2332
Disable initializers by default 2018-07-10 15:14:32 -04:00
Jeff Grafton 3b29bf9ece verify-generated-files: ensure git tree is clean 2018-07-09 13:50:09 -07:00
Kubernetes Submit Queue 3155ea2a18
Merge pull request #65549 from gnufied/fix-flexvolume-containers
Automatic merge from submit-queue (batch tested with PRs 65456, 65549). 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 flexvolume in containerized kubelets

Fixes flex volumes in containerized kubelets.

cc @jsafrane @chakri-nelluri @verult 

Note to reviewers : e2e tests pass in local containarized cluster. 

```release-note
Fix flexvolume in containarized kubelets
```
2018-07-09 06:24:06 -07: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 bac20f7f93
Merge pull request #65896 from aojea/issue#65784
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>.

Fail update-godep-licenses if bash version lower than 4

**What this PR does / why we need it**:
trying to update godeps on mac OSX fails without any information, this patch exits the script with a return error code just after printing the cause of the failure in the screen to the user

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-07 18:41:06 -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
aojeagarcia d733068fd5 Fail update-godep-licenses if bash version lower than 4 2018-07-06 12:13:04 +02:00
Christoph Blecker 2b9022cf38
Add script to verify generated files 2018-07-05 14:06:54 -07:00
Kubernetes Submit Queue 7dba5e52e7
Merge pull request #65865 from deads2k/cli-01-testcmd
Automatic merge from submit-queue (batch tested with PRs 64511, 65865, 65867, 65866). 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>.

split of test-cmd

This pull moves test-cmd to a `test/cmd` folder for team maintenance.  The next commit splits the mega (6 thousand lines or so?) into files based on function.  No changes, just moves.

@kubernetes/sig-cli-maintainers 
@fejta per request

```release-note
NONE
```
2018-07-05 13:01:10 -07:00
David Eads a6f5dddc4f move test-cmd guts to separate sig-cli maintained directory 2018-07-05 11:38:26 -04:00
Dr. Stefan Schimanski 42f1e81488 apiextensions-apiserver: add pkg/cmd/server/testing pkg for integration bootstrapping
In analogy to kube-apiserver.
2018-07-05 17:34:16 +02:00
Kubernetes Submit Queue c3b0ddb6e1
Merge pull request #65629 from luxas/kubeadm_add_v1alpha3
Automatic merge from submit-queue (batch tested with PRs 64593, 65117, 65629, 65827, 65686). 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: Add a `v1alpha3` API

**What this PR does / why we need it**:
Adds a (now duplicated) v1alpha3 API. Equal to `v1alpha2` now, but will be changed later.
Hopefully we'll graduate this to `v1beta1` during the v1.12 cycle.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref: https://github.com/kubernetes/kubeadm/issues/911
Depends on:
 - [x] https://github.com/kubernetes/kubernetes/pull/65776
 - [x] https://github.com/kubernetes/kubernetes/pull/65628

**Special notes for your reviewer**:

These commits should be reviewed:
 - `Add a duplicated v1alpha3 API`: A pure directory copy of the `v1alpha2` folder, only changed the package name in the Go files
 - `Register the v1alpha3 API in the scheme, and update the roundtrip API tests`, started registering the new API and using it internally
 - `Automated bump from v1alpha2 references to v1alpha3`: Replaced all v1alpha2 references with v1alpha3

**Release note**:

```release-note
kubeadm: Add a `v1alpha3` API.
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2018-07-04 18:52:14 -07: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
Lucas Käldström 27d70411a9
Register the v1alpha3 API in the scheme, and update the roundtrip API tests 2018-07-04 14:07:38 +03: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
Hemant Kumar 8db5328c4c Implement fixes for flexvolume when kubelet is contanerized
Fix bug with nsenter root path
2018-07-03 14:04:52 -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
Kubernetes Submit Queue 7dcac9d2a5
Merge pull request #65648 from sttts/sttts-k8s-metrics-codegen
Automatic merge from submit-queue (batch tested with PRs 65648, 65700, 64976, 65692, 65667). 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>.

k8s.io/metrics: normalize and fix codegen script

~~Builds on https://github.com/kubernetes/kubernetes/pull/65645. Will rebase when that one merges.~~ merged
2018-07-02 19:46:09 -07:00
David Eads 58136ee568 fail on rbac resources of non-v1 versions in reconcile 2018-07-02 13:07:16 -04:00
Kubernetes Submit Queue 5424061885
Merge pull request #65615 from CaoShuFeng/openapi
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 unused variable in openapi-spec script

**What this PR does / why we need 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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-02 05:47:05 -07:00
Dr. Stefan Schimanski 412de286ed hack/verify-pkg-names.sh: remove k8s.io/metrics dirs 2018-07-02 10:44:18 +02:00
Dr. Stefan Schimanski f4244107b9 hack/verify-pkg-names.sh: remove exceptions due to generated code and vendor
Metrics has to stay as its generation scripts are broken (follow-up PR).
2018-06-29 21:22:35 +02:00
Cao Shufeng 7b1ba187f7 remove unused variable in openapi-spec script 2018-06-29 13:45:17 +08:00
Kubernetes Submit Queue 7c1df02630
Merge pull request #65600 from liggitt/use-openapi-print-columns
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 bug printing openapi columns

Fixes #65579 

```release-note
kubectl: fixes a regression with --use-openapi-print-columns that would not print object contents
```
2018-06-28 22:13:45 -07:00
Kubernetes Submit Queue f0c89c00a0
Merge pull request #65374 from jpeeler/warning-timestamp
Automatic merge from submit-queue (batch tested with PRs 60150, 65467, 65487, 65595, 65374). 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 warning function that includes timestamp

Knowing when a process has terminated is helpful when looking through log files. The scenario that happened to me was that /tmp filled up, so as expected things failed. But I'd really like to know when things got bad without looking through 10G log files.

Release note:
```release-note
NONE
```
2018-06-28 19:15:19 -07:00
Kubernetes Submit Queue 1f3c7bc2cd
Merge pull request #65467 from foo0x29a/master
Automatic merge from submit-queue (batch tested with PRs 60150, 65467, 65487, 65595, 65374). 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>.

Pick the first extension matched

**What this PR does / why we need it**:
Since it's possible to match only one file extension, change the ```if``` statement in order to check the condition only once.

**Release note**:

```release-note
NONE
```
2018-06-28 19:15:08 -07:00
Jordan Liggitt 613b302b98
Fix bug printing openapi columns 2018-06-28 19:33:22 -04:00
Kubernetes Submit Queue 44073e6f43
Merge pull request #64660 from figo/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>.

Add support for plugin directory hierarchy

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

Add hierarchy support for plugin directory, it traverses and 
watch plugin directory and its sub directory recursively.

plugin socket file only need be unique within one directory,
``` 
 plugin socket directory  
    |  
    ---->sub directory 1
    |              |  
    |              ----->  socket1,  socket2 ...
    ----->sub directory 2
                  |
                  ------> socket1, socket2 ...  
```
the design itself allow sub directory be anything,
but in practical, each plugin type could just use one sub directory.

**Which issue(s) this PR fixes**:
Fixes #64003

**Special notes for your reviewer**:

twos bonus changes added as below

1) propose to let pluginWatcher bookkeeping registered plugins,
to make sure plugin name is unique within one plugin type.  
arguably, we could let each handler do the same work, but it requires
every handler repeat the same thing.    
 
2) extract example handler out from test, it is easier to read the code with the
seperation.  


**Release note**:

```release-note
N/A
```

/sig node
/cc @vikaschoudhary16  @jiayingz @RenaudWasTaken @vishh @derekwaynecarr  @saad-ali @vladimirvivien @dchen1107 @yujuhong @tallclair @Random-Liu @anfernee @akutz
2018-06-28 14:53:44 -07:00
Jeff Peeler ae271b4db0 Add warning function that includes timestamp
Knowing when a process has terminated is helpful when looking through
log files (especially very large ones). This also refactors the terminal
coloring function to be used with custom prefix and colors.

warning_log outputs red text in the current e2e inspired format:
W0628 16:58:26]: this is a test
2018-06-28 16:58:39 -04:00
foo0x29a 589e4076dd Pick the first extension matched 2018-06-28 04:50:19 -03:00
Kubernetes Submit Queue 6a2c0c84ca
Merge pull request #65453 from apelisse/debug-hack-script
Automatic merge from submit-queue (batch tested with PRs 65453, 65523, 65513, 65560). 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>.

Print error when APIServer fails to start

**What this PR does / why we need it**: Print apiserver logs when it fails to start.
This is copied from `update-swagger-spec.sh`.

**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-06-27 22:30:02 -07:00
Antoine Pelisse 0685a8018e Print error when APIServer fails to start 2018-06-27 09:59:41 -07:00
Kubernetes Submit Queue 6d3bba7391
Merge pull request #64246 from wojtek-t/lease_object_type
Automatic merge from submit-queue (batch tested with PRs 64246, 65489, 65443). 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>.

Create "Lease" API in the new "coordination.k8s.io" api group

Part of "Efficient Node heartbeats" KEP:
https://github.com/kubernetes/community/blob/master/keps/0009-node-heartbeat.md

Part of: https://github.com/kubernetes/kubernetes/issues/14733

```release-note
NONE
```
2018-06-27 08:17:10 -07:00
wojtekt f38e952f4e Add coordination API group with Lease type 2018-06-27 13:30:13 +02:00
hui luo d04f596829 Add hierarchy support for plugin directory
it traverses and watch plugin directory and its sub directory recursively,
plugin socket file only need be unique within one directory,

- plugin socket directory
-    |
-    ---->sub directory 1
-    |              |
-    |              ----->  socket1,  socket2 ...
-    ----->sub directory 2
-                  |
-                  ------> socket1, socket2 ...

the design itself allow sub directory be anything,
but in practical, each plugin type could just use one sub directory.

four bonus changes added as below

1. extract example handler out from test, it is easier to read the code
with the seperation.

2. there are two variables here: "Watcher" and "watcher".
"Watcher" is the plugin watcher, and "watcher" is the fsnotify watcher.
so rename the "watcher" to "fsWatcher" to make code easier to
understand.

3. change RegisterCallbackFn() return value order, it is
conventional to return error last, after this change,
the pkg/volume/csi is compliance with golint, so remove it
from hack/.golint_failures

4. refactor errors handling at invokeRegistrationCallbackAtHandler()
to make error message more clear.
2018-06-25 17:32:18 -07:00
Christoph Blecker 50fd906f74
Update vendored tool go install location to use GOPATH 2018-06-25 15:45:14 -07:00
Christoph Blecker 2edd10709c
Fix run-in-gopath issue with symlink'd gopath 2018-06-25 14:25:55 -07:00
Jeff Grafton b0af0f68b1 gazelle: set proper importmap on dependencies in vendor/ 2018-06-22 16:22:18 -07:00
Jeff Grafton f31183fa3d Set gazelle:prefix on staging/src and remove sed hack 2018-06-22 16:22:18 -07:00
Jeff Grafton bfc2d7bdd7 gazelle: disable proto rules 2018-06-22 16:22:18 -07:00
juanvallejo 508145e529
special-case template printing in get.go 2018-06-22 14:58:27 -04:00
Kubernetes Submit Queue 02dba36128
Merge pull request #65019 from mirake/fix-typo-toto
Automatic merge from submit-queue (batch tested with PRs 65265, 64822, 65026, 65019, 65077). 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>.

Typo fix: toto -> to
2018-06-21 11:25:16 -07:00
Jordan Liggitt f78230881c
stop returning invalid json fields in CRD OpenAPI schemas 2018-06-20 16:22:20 -04:00
Kubernetes Submit Queue 3b59ef66e8
Merge pull request #64782 from mgdevstack/master-local-cluster
Automatic merge from submit-queue (batch tested with PRs 65254, 64837, 64782, 64555, 64850). 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>.

Added OS verification for third party etcd binary

**What this PR does / why we need it**:
Enables downloading and relinking etcd to correct OS specific binary/package.

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

**Special notes for your reviewer**:
There are some incidents when etcd binaries are present for darwin (etcd-v3.2.18-darwin-amd64) in `${KUBE_ROOT}/third_party` directory but local-cluster creation is invoked from linux system. This leads to cluster creation failure due to missing appropriate os dependent etcd binary (etcd-v3.2.18-linux-amd64). So in this PR, we are verifying OS and relinking `etcd` softlink to appropriate `etc-${version}-${os}-*` binary.

**Release note**:

```release-note
NONE
```
2018-06-20 11:28:13 -07:00
Kubernetes Submit Queue d9272f8cba
Merge pull request #56358 from liggitt/rbac-alternate-authorizer
Automatic merge from submit-queue (batch tested with PRs 64688, 64451, 64504, 64506, 56358). 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>.

Switch RBAC escalation check to use active authorizer

Closes #43409

```release-note
All configured authorizers are now checked to determine if an RBAC role or clusterrole escalation (setting permissions the user does not currently have via RBAC) is allowed.
```
2018-06-20 05:48:23 -07:00
Kubernetes Submit Queue 5e16fd5526
Merge pull request #57355 from gnufied/disable-keep-terminated-pod-volumes-default
Automatic merge from submit-queue (batch tested with PRs 65230, 57355, 59174, 63698, 63659). 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>.

keep-terminated-pod-volumes should be false

This flag already has been marked as deprecated. We should avoid setting it in local clusters.

xref https://github.com/kubernetes/kubernetes/pull/47539
2018-06-19 20:19:12 -07: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
ruicao 95c232ee07 Typo fix: toto -> to 2018-06-12 23:12:39 +08:00
Hemant Kumar 9e1674d7f0 keep-terminated-pod-volumes should be false
Remove keep terminated volumes. The flag has already been
deprecated.
2018-06-07 09:48:28 -04:00
Jordan Liggitt 1034efd439
Allow non-RBAC authorizers to participate in role/clusterrole escalation checks 2018-06-06 15:31:05 -04:00
Mayank Gaikwad 5357f9a7e8 Added OS verification for third party etcd binary 2018-06-06 16:44:28 +05:30
Kubernetes Submit Queue 11f00d1794
Merge pull request #64708 from chuckha/v1alpha1-fix
Automatic merge from submit-queue (batch tested with PRs 63322, 64718, 64708, 64775, 64777). 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 kubeadm for v1alpha1 configs

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>

**What this PR does / why we need it**:
This PR allows v1alpha1 configurations to still work when running `kubeadm init`.

**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 kubernetes/kubeadm#884

**Special notes for your reviewer**:

```release-note
NONE
```
2018-06-05 14:31:12 -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
Chuck Ha 0a4b6dfe93
Fix kubeadm for v1alpha1 configs
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-06-05 09:55:46 -04:00
Kubernetes Submit Queue 84ec43c75b
Merge pull request #64560 from sbezverk/csi_registration
Automatic merge from submit-queue (batch tested with PRs 62266, 64351, 64366, 64235, 64560). 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>.

Adding CSI driver registration with plugin watcher

Adding CSI driver registration bits.  The registration process will leverage driver-registrar side which will open the `registration` socket and will listen for pluginwatcher's GetInfo calls.
 
```release-note
Adding CSI driver registration code.
```
/sig sig-storage
2018-06-04 18:44:23 -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
Tim Hockin 46aecdaa0a Better test for generated file rebuilds 2018-06-04 15:04:21 -07:00
Serguei Bezverkhi 1c05ca5575 Adding CSI driver registration 2018-06-04 16:47:24 -04:00
Kubernetes Submit Queue 36a3daa355
Merge pull request #61610 from rajansandeep/kubeupaddon
Automatic merge from submit-queue (batch tested with PRs 61610, 64591, 58143, 63929). 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>.

Create CoreDNS and kube-dns folders

**What this PR does / why we need it**:
Separate the CoreDNS and kube-dns manifests by creating their own folders (dns/coredns and dns/kube-dns) 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
cc @MrHohn
2018-06-04 12:26:12 -07:00
Kubernetes Submit Queue f5254dab8a
Merge pull request #58442 from m1093782566/ipvs-ga
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>.

Declare IPVS-based kube-proxy GA and remove feature gateway

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

As discussed in sig-network meeting, we decided to target IPVS-based kube-proxy GA in 1.10.

This PR declares IPVS-based kube-proxy GA and remove feature gateway.

**Which issue(s) this PR fixes**:

Fixes: #58443

issue in feature repo: https://github.com/kubernetes/features/issues/265

**Special notes for your reviewer**:

**Release note**:

```release-note
Declare IPVS-based kube-proxy GA
```

@quinton-hoole
2018-05-30 21:21:42 -07:00
Kubernetes Submit Queue 835268e6e7
Merge pull request #64219 from ixdy/hack-lib-golang-cgo-overrides
Automatic merge from submit-queue (batch tested with PRs 64338, 64219, 64486, 64495, 64347). 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 KUBE_CGO_OVERRIDES env var to force enabling CGO

**What this PR does / why we need it**: as detailed in https://github.com/kubernetes/release/issues/469 (and elsewhere), there is a desire to have `kubectl` built with CGO enabled on mac OS.

There currently isn't a great way to do this in our official cross builds, but we should allow mac users to build their own kubectl with CGO enabled if they desire, e.g. through homebrew.

This change enables that; you can now do `KUBE_CGO_OVERRIDES=kubectl make WHAT=cmd/kubectl` and get a cgo-enabled `kubectl`.

The default build outputs remain unchanged.

**Release note**:

```release-note
kubectl built for darwin from darwin now enables cgo to use the system-native C libraries for DNS resolution. Cross-compiled kubectl (e.g. from an official kubernetes release) still uses the go-native netgo DNS implementation. 
```

/assign @BenTheElder @cblecker 
cc @bks7 @bitglue
2018-05-30 20:17:15 -07:00
Kubernetes Submit Queue 1123e5dd82
Merge pull request #64449 from deads2k/cli-72-scrub
Automatic merge from submit-queue (batch tested with PRs 63328, 64316, 64444, 64449, 64453). 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>.

cleanup some dead kubectl code and narrow scope of helpers

Found a lot of dead code in kubectl factory that we should scrub out


/assign @soltysh 
/assign @juanvallejo 


```release-note
NONE
```
2018-05-30 08:42:24 -07:00
m1093782566 674a31e4d6 remove ipvs feature gateway 2018-05-30 10:43:16 +08:00
David Eads 207e9d1d90 cleanup some dead kubectl code and narrow scope of helpers 2018-05-29 12:44:53 -04:00
vikaschoudhary16 3a2e3bcc70 Add probe based mechanism for kubelet plugin discovery 2018-05-29 12:00:37 -04:00
Sandeep Rajan 753632d85b create coredns and kube-dns folders 2018-05-29 11:52:57 -04:00
juanvallejo d463bbddb1
move resource builder flags to genericclioptions 2018-05-28 11:08:58 +02: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