Commit Graph

718 Commits

Author SHA1 Message Date
Jordan Liggitt 605d377a4e Make feature gate threadsafe
Kubernetes-commit: d3546434b7252167b851a40a339d8ed2049ee5e5
2017-09-01 16:37:08 +00:00
Kubernetes Publisher eb6826bbda Merge pull request #47263 from nikhita/crd-01-validation-types
Automatic merge from submit-queue

apiextensions: validation for customresources

- [x] Add types for validation of CustomResources
- [x] Fix conversion-gen: #49747
- [x] Fix defaulter-gen: kubernetes/gengo#61
- [x] Convert to OpenAPI types
- [x] Validate CR using go-openapi
- [x] Validate CRD Schema
- [x] Add integration tests
- [x] Fix round trip tests: #51204 
- [x] Add custom fuzzer functions
- [x] Add custom conversion functions
- [x] Fix data race while updating CRD: #50098 
- [x] Add feature gate for CustomResourceValidation
- [x] Fix protobuf generation

Proposal: https://github.com/kubernetes/community/pull/708
Additional discussion: https://github.com/kubernetes/kubernetes/issues/49879, https://github.com/kubernetes/kubernetes/pull/50625

**Release note**:

```release-note
Add validation for CustomResources via JSON Schema.
```

/cc @sttts @deads2k

Kubernetes-commit: 4457e43e7b789586096bfb564330295cf0438e70
2017-08-29 18:37:10 -07:00
Nikhita Raghunath 3669fc6851 Add feature gate for CustomResourceValidation
update feature gates for generic apiserver

Add apiextensions-apiserver features to golint_failures

Ignore alpha feature if gate is disabled

Kubernetes-commit: 6ba1523a8e36c3121a9e08bfac7b4f342bb8ccb3
2017-09-01 16:37:08 +00:00
Kubernetes Publisher a8a9cf8e45 Merge pull request #48574 from sakshamsharma/kms-transformer
Automatic merge from submit-queue

Add Google cloud KMS service for envelope encryption transformer

This adds the required pieces which will allow addition of KMS based encryption providers (envelope transformer).

For now, we will be implementing it using Google Cloud KMS, but the code should make it easy to add support for any other such provider which can expose Decrypt and Encrypt calls.

Writing tests for Google Cloud KMS Service may cause a significant overhead to the testing framework. It has been tested locally and on GKE though.

Upcoming after this PR:
* Complete implementation of the envelope transformer, which uses LRU cache to maintain decrypted DEKs in memory.
* Track key version to assist in data re-encryption after a KEK rotation.

Development branch containing the changes described above: https://github.com/sakshamsharma/kubernetes/pull/4

Envelope transformer used by this PR was merged in #49350 

Concerns #48522 

Planned configuration:
```
kind: EncryptionConfig
apiVersion: v1
resources:
  - resources:
    - secrets
    providers:
    - kms:
        cachesize: 100
        configfile: gcp-cloudkms.conf
        name: gcp-cloudkms
    - identity: {}
```

gcp-cloudkms.conf:
```
[GoogleCloudKMS]
    kms-location: global
    kms-keyring: google-container-engine
    kms-cryptokey: example-key
```

Kubernetes-commit: 0d17e9deb7188bc79d905cb4ef6911c0a27adc59
2017-08-29 11:11:11 -07:00
Kubernetes Publisher c68d80e8a2 Merge pull request #51511 from huangjiuyuan/fix-func-comment
Automatic merge from submit-queue (batch tested with PRs 51298, 51510, 51511)

modifying the comment of BeforeDelete function to improve readability

**What this PR does / why we need it**:
modifying the comment of `BeforeDelete` function in `staging/src/k8s.io/apiserver/pkg/registry/rest/delete.go` to improve readability.

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

**Special notes for your reviewer**:

**Release note**:

`NONE`

Kubernetes-commit: ce559394653a8e5041f44d49391b851ec5465538
2017-09-01 16:37:07 +00:00
Saksham Sharma b9e05868ba Unify cloudprovided and normal KMS plugins
Kubernetes-commit: 6a4afc897c2ed4fb80f1b6121a06f86bc8095cd8
2017-09-01 16:37:07 +00:00
huangjiuyuan ce838cffe4 modifying the comment of BeforeDelete function to improve readibility
Kubernetes-commit: 4ce3b6cf4f8486e4335d05d7f573ad1859c14ce8
2017-09-01 16:37:07 +00:00
Kubernetes Publisher b2a8ad67a0 Merge pull request #51436 from liggitt/initializer-feature
Automatic merge from submit-queue (batch tested with PRs 51471, 50561, 50435, 51473, 51436)

Feature gate initializers field

The metadata.initializers field should be feature gated and disabled by default while in alpha, especially since enforcement of initializer permission that keeps users from submitting objects with their own initializers specified is done via an admission plugin most clusters do not enable yet.

Not gating the field and tests caused tests added in https://github.com/kubernetes/kubernetes/issues/51429 to fail on clusters that don't enable the admission plugin.

This PR:
* adds an `Initializers` feature gate, auto-enables the feature gate if the admission plugin is enabled
* clears the `metadata.initializers` field of objects on create/update if the feature gate is not set
* marks the e2e tests as feature-dependent (will follow up with PR to test-infra to enable the feature and opt in for GCE e2e tests)

```release-note
Use of the alpha initializers feature now requires enabling the `Initializers` feature gate. This feature gate is auto-enabled if the `Initialzers` admission plugin is enabled.
```

Kubernetes-commit: 12d73c31a97188286e7f4c8a3aec7fcd38a76a83
2017-08-29 02:22:19 -07:00
Kubernetes Publisher b04d0e4b5b Merge pull request #51415 from jpbetz/timeout-param-minimal
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

Add --request-timeout to kube-apiserver to make global request timeout configurable

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

Make the currently hard coded 60 global request timeout in apiserver configurable via a --request-timeout command line flag.

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

https://github.com/kubernetes/kubernetes/issues/51355

**Special notes for your reviewer**:

We plan to backport this to 1.6 and 1.7. To ease the backport work, we've kept this change to a minimum. After this PR we will submit an additional PR to rename `--min-request-timeout` to something that more clearly describes it's purpose, such as `--long-running-request-timeout-min`.

**Release note**:

```release-note
Add --request-timeout to kube-apiserver to make global request timeout configurable.
```

Kubernetes-commit: 0b0b2a22c5837975824add628df6ecb2dc297d57
2017-08-29 13:18:50 +00:00
Jordan Liggitt 8494697027 Feature gate initializers field
Kubernetes-commit: 658956f0631c6bd3ecf9f756db4a0710efea98ea
2017-08-29 13:18:50 +00:00
Kubernetes Publisher d63053d0e4 Merge pull request #49006 from CaoShuFeng/is_forbidden
Automatic merge from submit-queue

Fix forbidden message format

Before this change:
 $ kubectl get pods --as=tom
 Error from server (Forbidden): pods "" is forbidden: User "tom" cannot list pods in the namespace "default".
After this change:
 $ kubectl get pods --as=tom
 Error from server (Forbidden): pods is forbidden: User "tom" cannot list pods in the namespace "default".

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

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

**Special notes for your reviewer**:

**Release note**:

```
Fix forbidden message format, remove extra ""
```

Kubernetes-commit: 562d2be7a08c5cfb0f78331b0225acdf73bf9d94
2017-08-29 13:18:50 +00:00
Joe Betz e1e8bebf50 Add --request-timeout to allow the global request timeout of 60 seconds to be configured.
Kubernetes-commit: cb764756c6f152bfb866b161315369bc47ebf13c
2017-08-29 13:18:50 +00:00
Kubernetes Publisher 26ddb013b9 Merge pull request #45294 from liggitt/proto-slices
Automatic merge from submit-queue

Remove null -> [] slice hack

Closes #44593

When 1.6 added protobuf storage, the storage layer lost the ability to persist slice fields with empty but non-null values.

As a workaround, we tried to convert empty slice fields to `[]`, rather than `null`. Compressing `null` -> `[]` was just as much of an API breakage as `[]` -> `null`, but was hoped to cause fewer problems in clients that don't do null checks.

Because of conversion optimizations around converting lists of objects, the `null` -> `[]` hack was discovered to only apply to individual get requests, not to a list of objects. 1.6 and 1.7 was released with this behavior, and the world didn't explode. 1.7 documented the breaking API change that `null` and `[]` should be considered equivalent, unless otherwise noted on a particular field.

This PR:

* Reverts the earlier attempt (https://github.com/kubernetes/kubernetes/pull/43422) at ensuring non-null json slice output in conversion
* Makes results of `get` consistent with the results of `list` (which helps naive clients that do deepequal comparisons of objects obtained via list/watch and get), and allows empty slice fields to be returned as `null`

```release-note
Protobuf serialization does not distinguish between `[]` and `null`.
API fields previously capable of storing and returning either `[]` and `null` via JSON API requests (for example, the Endpoints `subsets` field) can now store only `null` when created using the protobuf content-type or stored in etcd using protobuf serialization (the default in 1.6+). JSON API clients should tolerate `null` values for such fields, and treat `null` and `[]` as equivalent in meaning unless specifically documented otherwise for a particular field.
```

Kubernetes-commit: 217513e27a6e54eb92d09165293cf811d5bdf878
2017-08-29 13:18:50 +00:00
Cao Shufeng 892932fb62 Fix forbidden message format
Before this change:
 # kubectl get pods --as=tom
 Error from server (Forbidden): pods "" is forbidden: User "tom" cannot list pods in the namespace "default".
After this change:
 # kubectl get pods --as=tom
 Error from server (Forbidden): pods is forbidden: User "tom" cannot list pods in the namespace "default".

Kubernetes-commit: ab0918673728fc50fc539017c86bbc03fceb0adc
2017-08-29 13:18:50 +00:00
Jordan Liggitt 064c57bb9b Generated files
Kubernetes-commit: c7defb806fc6c69deb4ab57655c3fa323ba8bebd
2017-08-29 13:18:49 +00:00
Kubernetes Publisher d8b9eb99a6 Merge pull request #47782 from php-coder/fix_reverse_in_tests
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

Fix benchmarks to really test reverse order of the keys

**What this PR does / why we need it**:
This PR modifies the code to do what comments says -- reverse the order of keys. It also fixes the logic that was wrong and didn't allow stale data.

**Special notes for your reviewer**:
This change resolves the following review comments:
- https://github.com/kubernetes/kubernetes/pull/41939#discussion_r117068104
- https://github.com/kubernetes/kubernetes/pull/46916#discussion_r122763350
- https://github.com/kubernetes/kubernetes/pull/46916#discussion_r122764000

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

PTAL @smarterclayton

Kubernetes-commit: 21ca7f7eeca0b523c1d958f49726b35e3b08791f
2017-08-25 20:43:33 -07:00
Kubernetes Publisher eeeccda7ec Merge pull request #50971 from CaoShuFeng/audit_json
Automatic merge from submit-queue (batch tested with PRs 51134, 51122, 50562, 50971, 51327)

set --audit-log-format default to json

Updates: https://github.com/kubernetes/kubernetes/issues/48561

**Release note**:
```
set --audit-log-format default to json for kube-apiserver
```

Kubernetes-commit: b5bb8099e79813aa8d73a49725efa54323d9279b
2017-08-29 13:18:49 +00:00
Slava Semushin b274c2ad9a Fix benchmarks to really test reverse order of the keys.
Kubernetes-commit: 734be0c49f3d283ec086c9aef2dc63142b481c19
2017-08-29 13:18:49 +00:00
Kubernetes Publisher 589250da0a Merge pull request #50559 from xiangpengzhao/remove-depre-flag
Automatic merge from submit-queue (batch tested with PRs 51244, 50559, 49770, 51194, 50901)

Remove deprecated flag "long-running-request-regexp".

**What this PR does / why we need it**:
remove `long-running-request-regexp` post-1.6.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 05294d80347f4cf4ff6111e0211013d8f617a0f5
2017-08-29 13:18:49 +00:00
Cao Shufeng e74487ab1a set --audit-log-format default to json
Updates: https://github.com/kubernetes/kubernetes/issues/48561

Kubernetes-commit: 130f5d10adf13492f3435ab85a50d357a6831f6e
2017-08-29 13:18:49 +00:00
xiangpengzhao 49516f112c Remove deprecated flag "long-running-request-regexp".
Kubernetes-commit: 72f4ab70e28a945ce25d40524696d0a486f8969e
2017-08-29 13:18:48 +00:00
Kubernetes Publisher 68718b94c8 Merge pull request #49741 from smarterclayton/server_printer
Automatic merge from submit-queue (batch tested with PRs 51148, 50816, 49741, 50858, 51223)

Add tests around TableConvert and server side printing

Also wire in more table printers

@fabianofranz

Kubernetes-commit: 4f19a8fd2a0ed24aff9154670adcc332a8b6d1b1
2017-08-24 21:51:05 -07:00
Clayton Coleman d6c8c768c4 Make generic metadata conform to documented name column convention
Kubernetes-commit: e5857b1ec02514f06b82bf5833fcb87645732883
2017-08-29 13:18:48 +00:00
Clayton Coleman e027d67a5f Verify TableConversion behavior in resttest
Kubernetes-commit: 0b0235b48497c07cc6c8286167978b599d69b690
2017-08-29 13:18:48 +00:00
Kubernetes Publisher 20618a93d6 Merge pull request #51148 from ironcladlou/gc-finalizer-decoupling
Automatic merge from submit-queue (batch tested with PRs 51148, 50816, 49741, 50858, 51223)

Enable finalizers independent of GC enablement

Decouple finalizer processing from garbage collection configuration.
Finalizers should be effective even when garbage collection is disabled
for a given store.

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

```release-note
NONE
```

/cc @kubernetes/sig-api-machinery-bugs 
/cc @caesarxuchao @liggitt @sttts @pmorie

Kubernetes-commit: 7edab23997d012e142ff3e7a24fa24e69243575f
2017-08-24 21:51:01 -07:00
Kubernetes Publisher 9f63165961 Merge pull request #51208 from simo5/pshfatal
Automatic merge from submit-queue (batch tested with PRs 47115, 51196, 51204, 51208, 51206)

Add an OrDie version for AddPostStartHook

Simplifies usage and consolidate the error message so it is always
the same everywhere.

```release-note
NONE
```

Kubernetes-commit: 2c214baefc06cefd68cc282b532bfe526613e36c
2017-08-29 13:18:47 +00:00
Dan Mace b824ea82d1 Clarify finalizer function
Kubernetes-commit: c845c444d52b81689e4555aec0e8175f687b6a44
2017-08-29 13:18:47 +00:00
Kubernetes Publisher 3be1849274 Merge pull request #51154 from RenaudWasTaken/gRPC-updated-1-3-0
Automatic merge from submit-queue (batch tested with PRs 51193, 51154, 42689, 51189, 51200)

Bumped gRPC version to 1.3.0

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

This PR bumps down the version of the vendored version of gRPC from v1.5.1 to v1.3.0
This is needed as part of the Device Plugin API where we expect client and server to use the Keep alive feature in order to detect an error.

Unfortunately I had to also bump the version of `golang.org/x/text` and `golang.org/x/net`.

- Design document: kubernetes/community#695
- PR tracking: [kubernetes/features#368](https://github.com/kubernetes/features/issues/368#issuecomment-321625420)

**Which issue this PR fixes**: fixes #51099
Which was caused by my previous PR updating to 1.5.1

**Special notes for your reviewer**:
@vishh @jiayingz @shyamjvs

**Release note**:
```
Bumped gRPC to v1.3.0
```

Kubernetes-commit: 5fb38a325efb343c2a0467a12732829bd5ed3c3c
2017-08-29 13:18:47 +00:00
Simo Sorce 91f15f8472 Add an OrDie version for AddPostStartHook
Simplifies usage and consolidate the error message so it is always
the same everywhere.

Signed-off-by: Simo Sorce <simo@redhat.com>

Kubernetes-commit: 15c54ffa7750c3037f464933c2b678a9a94cea82
2017-08-29 13:18:47 +00:00
Dan Mace 38a9bfc72a Enable finalizers independent of GC enablement
Decouple finalizer processing from garbage collection configuration.
Finalizers should be effective even when garbage collection is disabled
for a given store.

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

Kubernetes-commit: ed5b5bb94e7c75f22a7fc302e47dade6c0d1662d
2017-08-29 13:18:47 +00:00
Kubernetes Publisher 40c151d7ae Merge pull request #51109 from kubernetes/revert-50531-gRPC-keep-alive-godeps
Automatic merge from submit-queue

Revert "Updated gRPC vendoring to support Keep Alive"

Reverts kubernetes/kubernetes#50531

Ref - https://github.com/kubernetes/kubernetes/issues/51099

/cc @wojtek-t @RenaudWasTaken

Kubernetes-commit: b0ad3a1c5d56c9129ea389fe7456dfe75be4ce72
2017-08-29 13:17:58 +00:00
Renaud Gaubert 63352b0e4c Bumped gRPC version to 1.3.0
Kubernetes-commit: 1daaeb352f87399a4967b7ad72228e84a32f1e90
2017-08-29 13:17:58 +00:00
Kubernetes Publisher 1e1c18d221 sync: reset Godeps/Godeps.json 2017-08-29 13:17:58 +00:00
Shyam JVS 30e69a7570 Revert "Updated gRPC vendoring to support Keep Alive"
Kubernetes-commit: 3b014e103b2dc3fca76847ddf852a1dfd8a2be99
2017-08-29 13:17:14 +00:00
Kubernetes Publisher 50fa2f224d sync: reset Godeps/Godeps.json 2017-08-29 13:17:14 +00:00
Kubernetes Publisher b3980c29c0 Merge pull request #50893 from CaoShuFeng/fuzzer
Automatic merge from submit-queue (batch tested with PRs 50893, 50913, 50963, 50629, 50640)

[advanced audit api] fuzz Event with random value

This is an error import by me:
https://github.com/kubernetes/kubernetes/pull/49115

We need to fuzz other parts of Event with random value, otherwise
this round trip test will not make too much sense.
@sttts
@ericchiang is also researching this.

**Release note**:
```
NONE
```

Kubernetes-commit: c13e9d14cde09e97cebd5883d04443d22cc91ca1
2017-08-29 13:17:13 +00:00
Kubernetes Publisher 998e4f134a Merge pull request #50531 from NVIDIA/gRPC-keep-alive-godeps
Automatic merge from submit-queue (batch tested with PRs 50531, 50853, 49976, 50939, 50607)

Updated gRPC vendoring to support Keep Alive

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

This PR bumps the version of the vendored version of gRPC from v1.0.4 to v1.5.1
This is needed as part of the Device Plugin API where we expect client and server to use the Keep alive feature in order to detect an error.

Unfortunately I had to also bump the version of `golang.org/x/text` and `golang.org/x/net`.

- Design document: kubernetes/community#695
- PR tracking: [kubernetes/features#368](https://github.com/kubernetes/features/issues/368#issuecomment-321625420)

**Special notes for your reviewer**:
@vishh @jiayingz

**Release note**:
```
Bumped gRPC from v1.0.4 to v1.5.1
```

Kubernetes-commit: 967c19df4916160d4d4fbd9a65bad41a53992de8
2017-08-29 13:17:13 +00:00
Cao Shufeng d7bd79fee1 [advanced audit api] fuzz Event with random value
This is an error import by me:
https://github.com/kubernetes/kubernetes/pull/49115

We need to fuzz other parts of Event with random value, otherwise
this round trip test will not make too much sense.
@sttts @ericchiang

Kubernetes-commit: f2ec610455f3756afebfcbd99c108abc86a5015d
2017-08-29 13:17:13 +00:00
Kubernetes Publisher cd67d54b19 Merge pull request #50146 from gmarek/deepcopyinto
Automatic merge from submit-queue (batch tested with PRs 46512, 50146)

Make metav1.(Micro)?Time functions take pointers

Is there any reason for those functions not to be on pointers?

Kubernetes-commit: b59ad9cbfff866093a6c0ee26c3562e9ec9133e4
2017-08-29 13:16:17 +00:00
Renaud Gaubert cae6b9779a Updated gRPC version to support Keep Alive
Kubernetes-commit: faee6d6d5d0bf6d753a60c1338c6fbf17a2d956d
2017-08-29 13:16:17 +00:00
Kubernetes Publisher 6d1b3fd31d sync: reset Godeps/Godeps.json 2017-08-29 13:16:17 +00:00
gmarek 0a67bd6be4 Make metav1.(Micro)?Time functions take pointers
Kubernetes-commit: 0504cfbc2556155c31e5db43673d6b903c64dfa2
2017-08-29 13:16:16 +00:00
Kubernetes Publisher 30eccf60f1 Merge pull request #50876 from enj/enj/f/owners_reviewer
Automatic merge from submit-queue

Add enj as reviewer to OWNERS

Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

Signed-off-by: Monis Khan <mkhan@redhat.com>

**Release note**:

```release-note
NONE
```

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

Kubernetes-commit: afabd09889d53ade30f1ce5b39b33ebe40f0a52f
2017-08-18 05:42:07 -07:00
Monis Khan 504f70acec Add enj as reviewer to OWNERS
Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

Signed-off-by: Monis Khan <mkhan@redhat.com>

Kubernetes-commit: dd06794bc20ef1e0889af576c7a4f7a2f607e49d
2017-08-29 13:16:16 +00:00
Kubernetes Publisher ee9a3737cf Merge pull request #48263 from CaoShuFeng/useless_argument
Automatic merge from submit-queue

remove useless argument "name"

**Release note**:

```
NONE
```

Kubernetes-commit: c3a39f763e374101c681f62f7cd875ea70f50c03
2017-08-18 05:41:45 -07:00
Cao Shufeng 81eb3429e7 remove useless argument "name"
Kubernetes-commit: 2e97611bc62b88c48777d6209a0ed28d17d0e52d
2017-08-29 13:16:16 +00:00
Kubernetes Publisher edb9f8d8fd Merge pull request #50885 from CaoShuFeng/webhook_dead_code
Automatic merge from submit-queue (batch tested with PRs 50255, 50885)

remove dead code for cloner

I found some dead code in audit webhook backend.
This change do some clean work for: 2bbe72d4e0

**Release note**:
```
NONE
```

Kubernetes-commit: 2ba796fe47b3d17c5a385183d91a396aee580b87
2017-08-29 13:16:15 +00:00
Cao Shufeng cbc6b83455 remove dead code for cloner
I found some dead code in audit webhook backend.
This change do some clean work for: 2bbe72d4e0

Kubernetes-commit: 7b5c7bb711e7f15a1bf216a7a51fd40148110fba
2017-08-29 13:16:15 +00:00
Kubernetes Publisher c883b7cc93 Merge pull request #49617 from duan-yue/code_cls
Automatic merge from submit-queue

fix typo

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 38053c3e4486e6a7fafd00b2784a1e67e0357f45
2017-08-17 23:21:20 -07:00
Kubernetes Publisher 174f5f29a9 Merge pull request #50852 from guangxuli/fix_apiserver_register
Automatic merge from submit-queue (batch tested with PRs 50281, 50747, 50347, 50834, 50852)

fix incorrect logic in admission register

**What this PR does / why we need it**:
There is no issue for this PR, just fix incorrect logic in invocation `func (ps *Plugins) Register(name string, plugin Factory) ` after browsing the code accidentally.  And apparently, the logic exits potential panic.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
no issue
**Special notes for your reviewer**:
none
**Release note**:
none

Kubernetes-commit: 1eb04f6a2a16b3b8642184db62719451c3e84d2a
2017-08-29 13:16:15 +00:00