Commit Graph

6744 Commits (166a1356e83b1c271c0d58aa4d3fb69bab713072)

Author SHA1 Message Date
Kubernetes Submit Queue 166a1356e8
Merge pull request #62420 from mikedanese/jose-bump
Automatic merge from submit-queue (batch tested with PRs 67707, 62420). 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>.

svcacct: support jose.OpaqueSigner and push errors to token generator creation

```release-note
NONE
```
2018-08-23 15:39:59 -07:00
Kubernetes Submit Queue f2328e7b9f
Merge pull request #67548 from neolit123/owners-kubectl
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 labels to kubectl OWNERS files

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

This change makes it possible to automatically add the two labels: `area/kubectl` and `sig/cli` to PRs that touch the paths in question.

this already exists for kubeadm:
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/OWNERS#L17-L19

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

**Special notes for your reviewer**:
none

**Release note**:

```release-note
NONE
```
/area kubectl
@kubernetes/sig-cli-pr-reviews 
/cc @cblecker @tpepper
2018-08-23 12:32:40 -07:00
Mike Danese e68f14a249 jwt: support opaque signer and push errors to token generator creation 2018-08-23 12:21:56 -07:00
Kubernetes Submit Queue 74f44482ec
Merge pull request #66973 from fabriziopandini/kubeadm-ha-upgrade
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>.

Kubeadm ha upgrade

**What this PR does / why we need it**:
This PR implements one of the actions defined by https://github.com/kubernetes/kubeadm/issues/751 (checklist form implementing HA in kubeadm). see [KEP 0015](https://github.com/kubernetes/community/blob/master/keps/sig-cluster-lifecycle/0015-kubeadm-join-master.md) for more context

With this PR, kubeadm implements a new command `kubeadm upgrade node experimental-control-plane` that managed upgrade of control plane components on a secondary control plane instance. 

The entire workflow in case of HA clusters will be:

- Upgrade the control plane
   - run `kubeadm upgrade apply` on a first control plane instance
   - run `kubeadm upgrade node experimental-control-plane` on secondary control plane instances
- Upgrade nodes

**Special notes for your reviewer**:
/CC @timothysc @luxas @chuckha  @kubernetes/sig-cluster-lifecycle-pr-reviews 

**Release note**:
```
kubeadm now has the `kubeadm upgrade node experimental-control-plane` command for upgrading secondary control plane instances created with `kubeadm join --experimental-control-plane`. 
```
2018-08-22 18:02:49 -07:00
Kubernetes Submit Queue 51605c395e
Merge pull request #67441 from rosti/kubeadm_clusterconfig
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>.

[reissue] kubeadm: Split out ClusterConfiguration from InitConfiguration

As @luxas is not able to take care of #66219, I am reissuing the same change here. There are a few minor things added by me:

- The original PR is rebased on latest master.
- Some broken tests were fixed.
- Some TODOs were added.
- Run update-bazel and update-gofmt

Below is the text of the original PR by Lucas.

-----

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

Splits MasterConfiguration to InitConfiguration and ClusterConfiguration as outlined in the kubeadm Config KEP. InitConfiguration holds init-only information, and ClusterConfiguration holds cluster-wide information. In the internal representation InitConfiguration wraps ClusterConfiguration as a field, but in serialized format they're different YAML documents.

**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: kubernetes/kubeadm#911
Depends on:

- [X] #65776
- [X] #65628
- [X] #65629
- [X] #65631
- [X] #65940
- [X] #65787
- [X] #65945
- [X] #65951
- [X] #65952

**Special notes for your reviewer:**

**Release note**:
```release-note
kubeadm: InitConfiguration now consists of two structs: InitConfiguration and ClusterConfiguration
```

@kubernetes/sig-cluster-lifecycle-pr-reviews
2018-08-22 16:46:59 -07:00
Kubernetes Submit Queue 0cb018febb
Merge pull request #67700 from kad/fix-init-tc
Automatic merge from submit-queue (batch tested with PRs 63757, 67698, 67712, 67494, 67700). 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 test case: invalid version should not trigger network operations

**What this PR does / why we need it**: current invalid version value in the test case triggers network operation to check it validity via `https://dl.k8s.io/`. Using incorrect semantic version will achieve same result of test case without possibility to trigger network connection.

**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**:
@neolit123 

**Release note**:
```release-note
NONE
```
2018-08-22 14:17:28 -07:00
fabriziopandini aa641ad5e3 autogenerated 2018-08-22 23:09:28 +02:00
fabriziopandini 202e67c4a7 kubeadm-ha-upgrade 2018-08-22 23:09:16 +02:00
Kubernetes Submit Queue 9af86c5535
Merge pull request #64520 from wgliang/master.cmd-unused
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 functions in cmd

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

**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-08-22 12:49:45 -07:00
Alexander Kanevskiy 7f5b51f920 Fix test case: invalid version should not trigger network operations 2018-08-22 15:01:30 +03:00
Lucas Käldström 0fde05ac53 update some stuff 2018-08-22 11:43:15 +03:00
Lucas Käldström 5224551fa1 kubeadm: Split out ClusterConfiguration from InitConfiguration
Trivial rebasement, fixed some broken tests,
and inserted some TODOs: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-08-22 11:43:02 +03:00
Lubomir I. Ivanov 1a1d236f61 Add labels to kubelet OWNERS files 2018-08-22 00:43:32 +03:00
Lubomir I. Ivanov 21dd03dcbc add labels to kubectl OWNERS files 2018-08-22 00:40:54 +03:00
Kubernetes Submit Queue c94ececccc
Merge pull request #67672 from dims/add-labels-to-owners-files
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 Labels to various OWNERS files

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

Will reduce the burden of manually adding labels. Information pulled
from:
https://github.com/kubernetes/community/blob/master/sigs.yaml

Change-Id: I17e661e37719f0bccf63e41347b628269cef7c8b

**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-08-21 14:37:21 -07:00
Kubernetes Submit Queue 138fdc3d77
Merge pull request #67497 from yue9944882/refactor/externalize-node-informer-clientset
Automatic merge from submit-queue (batch tested with PRs 67661, 67497, 66523, 67622, 67632). 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>.

Externalize node informers for node authz

the pull will completely externalize node authz together with #67194

ref: #66680

**Release note**:

```release-note
NONE
```
2018-08-21 13:00:01 -07:00
Davanum Srinivas 9b43d97cd4
Add Labels to various OWNERS files
Will reduce the burden of manually adding labels. Information pulled
from:
https://github.com/kubernetes/community/blob/master/sigs.yaml

Change-Id: I17e661e37719f0bccf63e41347b628269cef7c8b
2018-08-21 13:59:08 -04:00
Kubernetes Submit Queue 9b8f3f3cb8
Merge pull request #67648 from xlgao-zju/fix-annotate-panic
Automatic merge from submit-queue (batch tested with PRs 65788, 67648, 67660). 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] fix panic when node annotation is nil

**What this PR does / why we need it**:
kubeadm will panic, when the node annotation is nil.

**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**:
/assign @neolit123 

**Release note**:

```release-note
kubeadm:  Fix panic when node annotation is nil
```
2018-08-21 10:14:01 -07:00
yue9944882 f624a4efb8 externalize node admission
fixes internal pod annotation reference

completely strip internal informers from authz initialization
2018-08-21 23:33:03 +08:00
Kubernetes Submit Queue 54dbbc41df
Merge pull request #67618 from liztio/fix-bazel
Automatic merge from submit-queue (batch tested with PRs 66862, 67618). 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 bazel

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

`bazel test //cmd/kubeadm/...` has been broken for a while. This is incredibly annoying to me, because I use it constantly during my workflow. This should fix it.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2018-08-21 00:24:04 -07:00
Xianglin Gao 5484880351 fix panic when node annotation is nil
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-08-21 12:59:28 +08:00
Kubernetes Submit Queue 6d76e35b39
Merge pull request #67605 from liztio/cert-list-2
Automatic merge from submit-queue (batch tested with PRs 67596, 67520, 67605). 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>.

Cert list 2

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

Continuation of #67208. Uses the newly created declarative list of certificates kubeadm requires for the certs phase and upgrade steps.


**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-08-20 15:03:02 -07:00
liz b17830a312
Fix `bazel test //cmd/kubeadm/...`
kubeadm tests no longer change the default directory, they simply use the
correct absolute path
2018-08-20 17:11:13 -04:00
liz 394e6b554a
Yank out a bunch of manual tests and prose
`phase certs` and upgrade commands now all use certslist infra
2018-08-20 15:21:08 -04:00
Nikhita Raghunath 6e47ba1fde Add sig/api-machinery label to apimachinery OWNERS files 2018-08-20 18:46:47 +05:30
Kubernetes Submit Queue 31420467ae
Merge pull request #67302 from dixudx/dnsmasq_add_loop_detect
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 --dns-loop-detect option to dnsmasq run by kube-dns

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

**Special notes for your reviewer**:
/cc @kubernetes/sig-network-pr-reviews 

**Release note**:

```release-note
add --dns-loop-detect option to dnsmasq run by kube-dns
```
2018-08-18 08:47:18 -07:00
Bobby (Babak) Salamat abb70aee98 Add a scheduler config argument to set the percentage of nodes to score 2018-08-17 11:18:51 -07:00
Kubernetes Submit Queue b9544382ba
Merge pull request #67060 from sttts/sttts-unify-insecure-serving
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kube-{apiserver,ctrl-mgr}: unify into DeprecatedInsecureServingOptions

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

```
2018-08-17 08:50:36 -07:00
Kubernetes Submit Queue fc0fa50265
Merge pull request #67501 from rosti/kubeadm_kubeletFailTempl_cleanup
Automatic merge from submit-queue (batch tested with PRs 66793, 67405, 67068, 67501, 67484). 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: Remove images from the context of kubeletFailTempl

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

Since #66658 kubeletFailTempl no longer contains any images, thus we don't need to fill them
in its context.

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

**Special notes for your reviewer**:

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/kind cleanup
/assign @timothysc
/assign @fabriziopandini

**Release note**:

```release-note
NONE
```
2018-08-17 05:05:22 -07:00
Kubernetes Submit Queue b345cee91a
Merge pull request #67437 from fisherxu/sourcecode
Automatic merge from submit-queue (batch tested with PRs 66209, 67380, 67499, 67437, 67498). 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>.

Use versioned api in kube-proxy

**What this PR does / why we need it**:
Now in kube-proxy someplace still use the internal version api, change to use versioned api. 

**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-08-17 03:01:16 -07:00
Kubernetes Submit Queue 5f33b1428d
Merge pull request #67499 from xlgao-zju/make-healthz-constant
Automatic merge from submit-queue (batch tested with PRs 66209, 67380, 67499, 67437, 67498). 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] Make kubelet healthz port a constant

**What this PR does / why we need it**:
Make kubelet healthz port a constant

**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-08-17 03:01:13 -07:00
Dr. Stefan Schimanski c2724793e8 Update bazel 2018-08-17 08:57:21 +02:00
Dr. Stefan Schimanski d787213d1b kube-apiserver: switch apiserver's DeprecatedInsecureServingOptions 2018-08-17 08:56:47 +02:00
Dr. Stefan Schimanski 1d9a896066 apiserver: move controller-manager's insecure config into apiserver 2018-08-17 08:56:46 +02:00
Kubernetes Submit Queue 7ff2feea9a
Merge pull request #67352 from liggitt/scheduler-default-test
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 test for scheduler config defaults

This test will let us notice if defaults change when loading from a config file or from flags.

```release-note
NONE
```
2018-08-16 23:52:22 -07:00
Xianglin Gao dbcc84a9ec Make kubelet healthz port a constant
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-08-17 09:09:21 +08:00
Jordan Liggitt 13de114286
Add test for scheduler config defaults 2018-08-16 10:39:19 -04:00
Kubernetes Submit Queue 87e7b9fc4c
Merge pull request #67223 from tallclair/audit-log
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>.

Synchronous & unbatched audit log writes

**What this PR does / why we need it**:
When enabling buffered audit log file writes to reduce latency under high load, we shouldn't be batching the writes, as the large data write can have an inverse (though unpredictable) impact. Additionally, batched audit log writes should not be done asynchronously, as this just creates lock contention on the log writer.

This is a clean-ed up version of https://github.com/kubernetes/kubernetes/pull/61217

**Which issue(s) this PR fixes**
Fixes #61932 

**Release note**:

```release-note
NONE
```

/sig auth
/priority important-soon
/kind bug
/milestone v1.12
2018-08-16 06:29:18 -07:00
Rostislav M. Georgiev 9c35184f05 kubeadm: Remove unused piece of code
kubeletFailTempl no longer contains any images, thus we don't need to fill them
in its context.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-08-16 16:03:35 +03:00
Kubernetes Submit Queue 780f4b46e0
Merge pull request #67375 from hanxiaoshuai/fix0814
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 code in kubeadm/app/cmd/reset_test.go

**What this PR does / why we need it**:
remove unused code in kubeadm/app/cmd/reset_test.go
**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-08-16 00:26:29 -07:00
fisherxu 5a9bea0353 update bazel 2018-08-16 09:59:33 +08:00
x00416946 fisherxu 79e17e6cd7 use versioned api in kube-proxy 2018-08-16 09:59:33 +08:00
Kubernetes Submit Queue c1f7df2b0e
Merge pull request #65309 from tnozicka/add-ds-recreate-backoff
Automatic merge from submit-queue (batch tested with PRs 62441, 66702, 67254, 67421, 65309). 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 backoff for DS's pod deletion to limit fighting with kubelet failing the pod repeatedly

**What this PR does / why we need it**:
Limits consequences of DS controller on hot loop fighting with kubelet.

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

**Release note**:
```release-note
DaemonSet controller is now using backoff algorithm to avoid hot loops fighting with kubelet on pod recreation when a particular DaemonSet is misconfigured.
```

TODO:
 - [x] Export the backoff settings as args or constants
 - [x] Add test a case

/cc @mfojtik 
(Will add more folks when it's ready, to avoid spamming them.)
2018-08-15 15:30:27 -07:00
Kubernetes Submit Queue 7f7a967f9f
Merge pull request #66702 from xlgao-zju/search-kubeconfig
Automatic merge from submit-queue (batch tested with PRs 62441, 66702, 67254, 67421, 65309). 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] Apply means to search for existing KubeConfig files in standard locations across kubeadm

**What this PR does / why we need it**:
Apply means to search for existing KubeConfig files in standard locations across kubeadm.

Tasklist:

- [x] Use the Join of Dir and File name instead of DefaultKubeConfig
- [x] Refactor token.go::findExistingKubeConfig() into a utility in cmd/kubeadm/app/cmd/util
- [x] Use the utility in config, upgrade and some of the phases commands that use --kubeconfig

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

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

**Release note**:

```release-note
NONE
```
2018-08-15 15:30:18 -07:00
Kubernetes Submit Queue 68cfa7ef10
Merge pull request #67208 from liztio/cert-list
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>.

First pass of cert list

**What this PR does / why we need it**:
Refactors the cert management code in kubeadm to be more extensible and resiliant.

This initial change doesn't change anything on the surface, and in fact appears to add a bunch of complexity. The goal here is to reduce duplication in the certs codebase, which is started in this PR by gutting the New*CertAndKey. Eventually, those functions will be removed altogether. The declarative list will also allow us to build a more explicit renewal function and command line interface and reduce much more duplication in the cert package.


**Special notes for your reviewer**:

**Release note**:
```
```
2018-08-15 13:43:41 -07:00
Kubernetes Submit Queue 1da4c59e46
Merge pull request #67182 from poothia/pathfix
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>.

Fixing kubeadm.conf file path

This patch fixed kubeadm.conf file path in this file.
2018-08-15 10:58:37 -07:00
liz f5e9eb8674
Add certlist.go - a declarative list of all certs kubeadm requires
* Sub out New*CertAndKey for functions using the new certlist
2018-08-15 11:42:13 -04:00
liz 742b258ca2
Add certlist.go - a declarative list of all certs kubeadm requires
* Sub out New*CertAndKey for functions using the new certlist
2018-08-15 11:07:23 -04:00
Kubernetes Submit Queue 6a12a280a5
Merge pull request #67409 from stewart-yu/stewart-controller-manager-codeclean#03
Automatic merge from submit-queue (batch tested with PRs 66884, 67410, 67229, 67409). 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:  coverage improvement about ValidateVersion function

**What this PR does / why we need it**:
In commit log :2ef8157644, remove the `MinimumVersion support` for all featuregate, but the `MinimumVersion` still as a parameter in `Feature` struct for `future featuregate`.
However,https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/features/features.go#L79-L87 still have judgement about `MinimumVersion` in `ValidateVersion` function, we also need test it. 
This PR  make `test coverage` about `ValidateVersion` function from `20%` to `90%`. Details as below.

Before changed, the `test coverage` are:
```
root@shap000101123:/ycj/kubernetes-community/src/k8s.io/kubernetes/cmd/kubeadm/app/features# go tool cover -func=size_coverage.out
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:71:	ValidateVersion			20.0%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:92:	Enabled				100.0%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:101:	Supports			100.0%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:111:	Keys				0.0%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:120:	KnownFeatures			90.0%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:139:	NewFeatureGate			94.1%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:171:	ResolveFeatureGateDependencies	100.0%
total:								(statements)			73.1%
```
After change, the `test coverage` are:
```
root@shap000101123:/ycj/kubernetes-community/src/k8s.io/kubernetes/cmd/kubeadm/app/features# go tool cover -func=size_coverage.out
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:71:	ValidateVersion			90.0%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:92:	Enabled				100.0%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:101:	Supports			100.0%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:111:	Keys				0.0%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:120:	KnownFeatures			90.0%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:139:	NewFeatureGate			94.1%
k8s.io/kubernetes/cmd/kubeadm/app/features/features.go:171:	ResolveFeatureGateDependencies	100.0%
total:								(statements)			86.5%
```
**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**:
@luxas  @neolit123 @fabriziopandini @dixudx 

**Release note**:

```release-note
NONE
```
2018-08-15 07:10:19 -07:00
Tomas Nozicka b0b1629e8d Update Bazel 2018-08-15 16:03:42 +02:00