Commit Graph

6881 Commits (3ccfb2dc4c176b439698336339c9030c4240abaa)

Author SHA1 Message Date
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
stewart-yu b0eb92cc52 auto-generated file 2018-08-20 20:03:37 +08:00
stewart-yu a14673cfbd [cloud-controller-manager]output flags in logical sections 2018-08-20 20:03:36 +08:00
stewart-yu 6daaf5af77 [kube-controller-manager]output flags in logical sections 2018-08-20 20:03:35 +08:00
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
Ben Moss 75c62e6f6b Set DefaultCRISocket on Windows
Reference: https://docs.docker.com/docker-for-windows/faqs/#how-do-i-connect-to-the-remote-docker-engine-api
2018-08-15 13:37:59 -04: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
Tomas Nozicka 63656da296 Add backoff for DS's pod deletion to limit fighting with kubelet failing the pod repeatedly 2018-08-15 16:03:39 +02:00
Kubernetes Submit Queue 108bc499b7
Merge pull request #67358 from stewart-yu/stewart-controller-manager-codeclean
Automatic merge from submit-queue (batch tested with PRs 67347, 67307, 67358, 67364, 67385). 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>.

*-controller-manager: remove the redundancy import file

**What this PR does / why we need it**:
remove the redundancy import file

**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**:
remove the redundancy import file @deads2k  @mikedanese 

**Release note**:

```release-note
NONE
```
2018-08-15 04:23:18 -07:00
Kubernetes Submit Queue 698eb760d9
Merge pull request #66722 from luxas/reference_new_generic_structs
Automatic merge from submit-queue (batch tested with PRs 67071, 66906, 66722, 67276, 67039). 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 references to the structs that have moved to their own packages

**What this PR does / why we need it**:
Follows-up https://github.com/kubernetes/kubernetes/pull/66058 and  https://github.com/kubernetes/kubernetes/pull/66059 to remove the structs that now aren't needed in `pkg/apis/componentconfig`

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

**Special notes for your reviewer**:

This PR depends on:
 - [x] https://github.com/kubernetes/kubernetes/pull/67090
 - [x] https://github.com/kubernetes/kubernetes/pull/67149
 - [x] https://github.com/kubernetes/kubernetes/pull/67159
 - [x] https://github.com/kubernetes/kubernetes/pull/67207

**Only review commit 'Remove references to the structs that have moved to their own packages' please**

**Release note**:

```release-note
NONE
```
/kind cleanup
/assign @sttts @thockin @jbeda @liggitt
2018-08-14 22:43:22 -07:00
Yuanbin.Chen 732382620d Fix kubeadm init kernel validator display message error
Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>
2018-08-15 12:13:27 +08:00
Kubernetes Submit Queue 1f86c1cf26
Merge pull request #61212 from charrywanganthony/duplicated_import
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 duplicated import

**Release note**:

```release-note
NONE
```
2018-08-14 20:18:00 -07:00
stewart-yu 3975d9fd07 auto-generated file 2018-08-15 09:07:38 +08:00
stewart-yu 55fa6d5fdd smaller coverage improvement about ValidateVersion function 2018-08-15 09:07:38 +08:00
Kubernetes Submit Queue 4ff782df81
Merge pull request #66657 from liangwenguo/third_person
Automatic merge from submit-queue (batch tested with PRs 66491, 66587, 66856, 66657, 66923). 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 grammar error: the predicate verb should be singular.

**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-08-14 17:55:14 -07:00
Kubernetes Submit Queue d7634dcf23
Merge pull request #66856 from charrywanganthony/scheduler_space
Automatic merge from submit-queue (batch tested with PRs 66491, 66587, 66856, 66657, 66923). 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 space for output

**Release note**:
```release-note
NONE
```
2018-08-14 17:55:11 -07:00
Tim Allclair c9670d0652
Synchronous & unbatched audit log writes 2018-08-14 10:20:35 -07:00
Lucas Käldström db855a2b2d
autogenerated 2018-08-14 19:02:18 +03:00
Lucas Käldström 4bef926218
Remove references to the config structs that have moved to their own shared packages 2018-08-14 19:02:06 +03:00
hangaoshuai 420fb6ba02 remove unused code in kubeadm/app/cmd/reset_test.go 2018-08-14 17:02:53 +08:00
stewart-yu 9f4ae6ddf6 [cloud-controller manager]remove the redundancy import 2018-08-14 14:08:06 +08:00
stewart-yu 982249110e [kube-controller manager]remove the redundancy import 2018-08-14 14:07:43 +08:00
Xianglin Gao 2cccbf9d0c Use FindExistingKubeConfig in the phases which use the --kubeconfig
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-08-13 15:54:38 +08:00
Xianglin Gao 99161aa3c9 Use AddKubeConfigFlag everywhere in kubeadm
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-08-13 15:50:16 +08:00
Xianglin Gao ebce14b36e Use the Join of Dir and File name instead of DefaultKubeConfig
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-08-13 15:47:01 +08:00
Xianglin Gao 866631fab1 Move defaultKubeConfig to constants.go
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-08-13 15:45:00 +08:00
Kubernetes Submit Queue 6274590518
Merge pull request #66656 from wackxu/fixappversion
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>.

 use apps/v1 version for scheduler

/kind cleanup

**Release note**:

```release-note
NONE
```
2018-08-11 23:25:33 -07:00
Di Xu 25f9909cba add --dns-loop-detect option to dnsmasq run by kube-dns 2018-08-11 22:30:25 +08:00
Kubernetes Submit Queue 9fdffd1e57
Merge pull request #62721 from xiangpengzhao/phase-version
Automatic merge from submit-queue (batch tested with PRs 66984, 67236, 67216, 62721, 67106). 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>.

Set kubeadm version as the default version in phase command.

**What this PR does / why we need it**:
In some phase commands which don't use kubernetes version, set kubeadm version as the kubernetes version to avoid get it from internet.

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

**Special notes for your reviewer**:
cc @chrisob

**Release note**:

```release-note
NONE
```
2018-08-10 18:59:15 -07:00
Kubernetes Submit Queue cf89c466cc
Merge pull request #66873 from fabriziopandini/kubeadm-ha-join-master
Automatic merge from submit-queue (batch tested with PRs 67017, 67190, 67110, 67140, 66873). 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 join --control-plane main workflow

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

With this PR, kubeadm implements the `kubeadm join --control-plane`workflow, as described in the [KEP 0015-kubeadm-join-master.md](https://github.com/kubernetes/community/blob/master/keps/sig-cluster-lifecycle/0015-kubeadm-join-master.md) with the exception of the update of the `kubeadm-config` ConfigMap that will be completed in a following PR as soon as the implementation in the config file will allow it. 

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

**Release note**:
```
`kubeadm join` now has the --experimental-control-plane flag that triggers deploy of a new control plane instance on the joining node. 
```
2018-08-10 17:01:20 -07:00
Kubernetes Submit Queue 95307254e4
Merge pull request #67017 from bart0sh/PR0027-kubeadm-fix-CRI-ListKubeContainers
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: fix CRI ListKubeContainers API

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

Current implementation of this API always returns
checks output of 'crictl pods -q' and filters out everything
that doesn't start with k8s_. 'crictl pods -q' returns only pod ids,
so everything is always filtered out.

Removing filtering by name prefix should fix this.

**Which issue this PR fixes**
Fixes: kubernetes/kubeadm#926

**Release note**:
```release-note
NONE
```
2018-08-10 16:42:48 -07:00
Kubernetes Submit Queue 5de3896d0d
Merge pull request #67176 from charrywanganthony/auditv1beta1Tov1_utils
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>.

use v1 version of advanced audit policy in kubeadm

audit api version has been updated to v1 #65891 

**Release note**:
```release-note
kubeadm uses audit policy v1 instead of v1beta1
```
2018-08-10 08:57:11 -07:00
Kubernetes Submit Queue cd06fd4ad7
Merge pull request #67131 from rosti/kube-proxy-manifest-fix2
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: Deduplicate kube-proxy image logic

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

Until now, kube-proxy image was handled in two separate places:
    
- In images.go along with the pre-pull code and without having the image override capabilities (via UnifiedControlPlaneImage)

- In the kube-proxy manifest, where image override was possible.

This duplicates the kube-proxy image logic and makes it prone to errors.
Therefore, this change aims to deduplicate it and make it more straightforward.
This is achieved in the following ways:

- GetKubeControlPlaneImage is used for kube-proxy image fetching, thus allowing for the image to be overriden by UnifiedControlPlaneImage.

- Remove duplicated logic from the manifest and use GetKubeControlPlaneImage to generate the image for the manifest.

This PR also removes GetKubeControlPlaneImageNoOverride as it's no longer needed.

**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
/assign @luxas
/assign @timothysc

**Release note**:

```release-note
kubeadm: make sure pre-pulled kube-proxy image and the one specified in its daemon set manifest are the same
```
2018-08-10 03:56:19 -07:00
fabriziopandini 7d2ac1dbd6 kubeadm-ha-join-controlplane 2018-08-09 19:03:56 +02:00
fabriziopandini f3ba240e11 test files 2018-08-09 19:00:07 +02:00
fabriziopandini 23b8f19328 autogenerated 2018-08-09 18:59:52 +02:00
Chao Wang 765e2fc788 use v1 version of advanced audit policy in kubeadm 2018-08-09 19:38:05 +08:00
Rostislav M. Georgiev dedf139288 kubeadm: Deduplicate kube-proxy image logic
Until now, kube-proxy image was handled in two separate places:

- In images.go along with the pre-pull code and without having the image
override capabilities (via UnifiedControlPlaneImage)

- In the kube-proxy manifest, where image override was possible.

This duplicates the kube-proxy image logic and makes it prone to errors.
Therefore, this change aims to deduplicate it and make it more straightforward.
This is achieved in the following ways:

- GetKubeControlPlaneImage is used for kube-proxy image fetching, thus allowing
for the image to be overriden by UnifiedControlPlaneImage.

- Remove duplicated logic from the manifest and use GetKubeControlPlaneImage to
generate the image for the manifest.

Additionally, GetKubeControlPlaneImageNoOverride is removed as the only use case
for the function is now invalid.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-08-09 12:01:26 +03:00
poothia 04ca57fa4f
Update join_test.go 2018-08-09 11:04:40 +05:30
Lucas Käldström 2ff9bd6699
Rename the KubeConfigFile field to Kubeconfig in ClientConnectionConfiguration 2018-08-08 22:25:55 +03:00
Kubernetes Submit Queue 652cebcba5
Merge pull request #67117 from xiangpengzhao/check-cfgpath
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>.

Check config path for command "kubeadm alpha phase kubelet write-env-file"

**What this PR does / why we need it**:
Explicitly check the `--config` flag of command `kubeadm alpha phase kubelet write-env-file`.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-08-08 10:23:03 -07:00
Kubernetes Submit Queue 15c2dd906e
Merge pull request #66888 from yue9944882/refactor/promote-informers-into-master-cfg
Automatic merge from submit-queue (batch tested with PRs 66394, 66888, 66932). 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>.

Promote internal/external informers into master.Config

**Release note**:

```release-note
NONE
```
xref #66386

Shorten `BuildGenericConfig`'s return list. 
Put the internal and external informers into master.Config. Previous art:


[60614d5cdc/staging/src/k8s.io/apiserver/pkg/server/config.go (L196))
2018-08-08 07:00:08 -07:00
Angus Lees 16e46c8afd kubeadm: chroot to new --rootfs arg
This change adds a new --rootfs=path option to kubeadm, and (if
provided) chroot()s to this path before performing file operations.

This makes it possible to run the kubeadm binary from a container, but
perform remaining file operations against the host filesystem using
something like:

    docker run -v /:/rootfs --net=host --uts=host --pid=host \
       kubeadm:latest init --rootfs /rootfs...

Fixes kubernetes/kubeadm#503
2018-08-08 18:10:39 +10:00
xiangpengzhao 3f2c7b6fda Check config path for command "kubeadm alpha phase kubelet write-env-file" 2018-08-08 14:29:53 +08:00
xiangpengzhao 610ca1f60c Auto generated BUILD files. 2018-08-08 12:06:34 +08:00
xiangpengzhao 5cf9291e02 Set kubeadm version as the default version in phase command. 2018-08-08 12:05:36 +08:00
yue9944882 6bac6fafa0 promote informers into master.Config
review:

1. move informers into master extra config
2. move one post start hook into New()

fixes npe from master integration test
2018-08-08 09:35:45 +08:00
Kubernetes Submit Queue 5ed156d67b
Merge pull request #66196 from tanshanshan/fixspell1
Automatic merge from submit-queue (batch tested with PRs 66196, 67016, 66807, 67023). 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 spelling  mistakes

**What this PR does / why we need it**:
fix spelling  mistakes

**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-07 11:44:02 -07:00
xiangpengzhao 9e204fe7f7 Remove the kubeadm `--skip-preflight-checks` flag 2018-08-07 20:19:54 +08:00
Ed Bartosh d64f489fa1 kubeadm: fix CRI ListKubeContainers API
Current implementation of this API always returns
checks output of 'crictl pods -q' and filters out everything
that doesn't start with k8s_. 'crictl pods -q' returns only pod ids,
so everything is always filtered out.

Removing filtering by name prefix should fix this.

Fixes: kubernetes/kubeadm#926
2018-08-07 10:59:44 +03:00
Kubernetes Submit Queue db9545e69e
Merge pull request #66386 from yue9944882/refactor/etcd-options-config
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>.

Refactor storage factory config with Complete().New() flow

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

1. Split `BuildStorageFactory` constructor into `Complete().New()` flow to build an instance for etcd storage.

2. Put `EtcdOptions` and `StorageSerializationOptions` into a `StorageFactoryOptions` for a more reasonable structured config object.

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

Generally, my idea is to split the huge code in [https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-apiserver/app/server.go](https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-apiserver/app/server.go) into somewhere else making more sense :)

**Release note**:

```release-note
NONE
```
2018-08-06 20:26:02 -07:00
yue9944882 e8ae7887a5 This is a combination of 3 commits.
refactor storage factory options

review: minor changes

1. make storage factory config complete with options
2. make BuildGenericConfig private

review: move codes
2018-08-06 22:29:10 +08:00
Kubernetes Submit Queue a160fe94a5
Merge pull request #64517 from sttts/sttts-apiserver-sectioned-flags
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: output flags in logical sections

<img width="862" alt="bildschirmfoto 2018-06-07 um 16 21 17" src="https://user-images.githubusercontent.com/730123/41105818-d8d68440-6a6e-11e8-91ba-cc682a2c63dd.png">

```release-note
Print kube-apiserver --help flag help in sections.
```
2018-08-06 03:18:57 -07:00
Dr. Stefan Schimanski 42d533e40c apiserver: output flags in logical sections 2018-08-06 08:55:09 +02:00
Kubernetes Submit Queue e48ccceab4
Merge pull request #66823 from bart0sh/PR0026-kubeadm-fix-ImagePullCheck-output
Automatic merge from submit-queue (batch tested with PRs 64815, 66823, 66473, 66466). 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 ImagePullCheck output

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

ImagePullCheck outputs "pulling <image>" line even if image
already exists and is not pulled.
    
Fixed the output to reflect the reality. ImagePullCheck now outputs
either "pulling <image>" or "image <image> exists".

**Release note**:
```release-note
NONE
```
2018-08-03 18:03:00 -07:00
Kubernetes Submit Queue cb1ef9f7e8
Merge pull request #64815 from dixudx/hostname_empty
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>.

error out empty hostname

**What this PR does / why we need it**:
For linux, the hostname is read from file `/proc/sys/kernel/hostname` directly, which can be overwritten with whitespaces.

Should error out such invalid hostnames.

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

**Special notes for your reviewer**:
/cc luxas timothysc 

**Release note**:

```release-note
nodes: improve handling of erroneous host names
```
2018-08-03 17:13:32 -07:00
Kubernetes Submit Queue 2cb1d64c11
Merge pull request #66822 from bart0sh/PR0025-kubeadm-runtime-fix-ImageExists
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: fix runtime.ImageExists API

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

runtime.ImageExists returns error when underlying 'inspect' command
fails. This makes ImagePullCheck to fail as it doesn't expect
runtime.ImageExists to return an error even if image doesn't exist.

**Which issue(s) this PR fixes**:
Fixes [kubeadm issue 1024](https://github.com/kubernetes/kubeadm/issues/1024)

**Release note**:
```release-note
NONE
```
2018-08-02 23:51:30 -07:00
Kubernetes Submit Queue d7bcae8b96
Merge pull request #60791 from mythi/kernel
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>.

kernel_validator: amend kernel config check paths

**What this PR does / why we need it**:
Clear Linux Project for Intel Architecture uses its own path
to store kernel build artifacts. This PR amends the path to kernel validator's 
config check paths.

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

```
e2e_node:  add new kernel config check paths
```
2018-08-02 22:32:46 -07:00
Kubernetes Submit Queue 4a54f3f0d6
Merge pull request #66779 from deads2k/api-05-easy-unit
Automatic merge from submit-queue (batch tested with PRs 66850, 66902, 66779, 66864, 66912). 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 methods to apimachinery to easy unit testing

When unit testing, you often want a selective scheme and codec factory.  Rather than writing the vars and the init function and the error handling, you can simply do

`scheme, codecs := testing.SchemeForInstallOrDie(install.Install)`

@kubernetes/sig-api-machinery-misc 
@sttts 

```release-note
NONE
```
2018-08-02 10:03:16 -07:00
Ed Bartosh 84300e781c kubeadm: fix ImagePullCheck output
ImagePullCheck outputs "pulling <image>" line even if image
already exists and is not pulled.

Fixed the output to reflect the reality. ImagePullCheck now outputs
either "pulling <image>" or "image <image> exists".
2018-08-02 11:58:52 +03:00
David Eads d3bd0eb1d5 make package name match all the import aliases 2018-08-01 15:31:12 -04:00
Joachim Bartosik 8ef369ea2d Mark --horizontal-pod-autoscaler-upscale-delay deprecated 2018-08-01 17:59:51 +02:00
Joachim Bartosik 7681c284f5 Remove UpscaleForbiddenWindow
Instead discard metric values for pods that are unready and have never
been ready (they may report misleading values, the original reason for
introducing scale up forbidden window).

Use per pod metric when pod is:
- Ready, or
- Not ready but creation timestamp and last readiness change are more
  than 10s apart.

In the latter case we asume the pod was ready but later became unready.
We want to use metrics for such pods because sometimes such pods are
unready because they were getting too much load.
2018-08-01 17:47:23 +02:00
Chao Wang 895b6d441d add space for output 2018-08-01 18:08:31 +08:00
Di Xu b3dfe0c652 nodes: improve handling of erroneous host names 2018-08-01 14:57:25 +08:00
Chao Wang 39a4730db6 remove duplicated import 2018-08-01 13:27:42 +08:00
Kubernetes Submit Queue 65ba40c2b0
Merge pull request #66445 from rosti/kubeadm-test-cmd-init
Automatic merge from submit-queue (batch tested with PRs 66445, 66643, 60551). 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: Improve kubeadm init cmd tests

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

This PR improves kubeadm init cmd tests in the following ways:

- Fix a few cases that were always successful (despite completely wrong).
- Add more test cases (for different configs in particular)
- Use dry run, to avoid modifying the system and using kubeadm reset

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

**Special notes for your reviewer**:
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/assign @luxas
/assign @timothysc

**Release note**:

```release-note
NONE
```
2018-07-31 15:56:04 -07:00
Kubernetes Submit Queue 5e546893f7
Merge pull request #66623 from deads2k/gc-01-graph
Automatic merge from submit-queue (batch tested with PRs 66623, 66718). 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>.

expose GC graph via debug handler

Many times when debugging GC problems, it's important to understand the state of the GC graph at a given point in time.  This pull adds the ability to dump that graph in DOT format for later consumption.  It does this by exposing an additional debug handler and allowing any controller init function to produce such a handler that is included under debug.

Sample full output
```
curl http://localhost:10252/debug/controllers/garbagecollector/graph
digraph full {
  // Node definitions.
  0 [
    label="uid=8581a030-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Pod.v1/kube-dns-7b479ccbc6-qz468
"
    group=""
    version="v1"
    kind="Pod"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6-qz468"
    uid="8581a030-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  1 [
    label="uid=822052fc-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Deployment.v1.apps/kube-dns
"
    group="apps"
    version="v1"
    kind="Deployment"
    namespace="kube-system"
    name="kube-dns"
    uid="822052fc-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  2 [
    label="uid=857bd8ac-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
ReplicaSet.v1.apps/kube-dns-7b479ccbc6
"
    group="apps"
    version="v1"
    kind="ReplicaSet"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6"
    uid="857bd8ac-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];

  // Edge definitions.
  0 -> 2;
  2 -> 1;
}
```

You can also select via UID and have all transitive dependencies output:
```
curl http://localhost:10252/debug/controllers/garbagecollector/graph?uid=8581a030-9043-11e8-ad4a-54e1ad486dd3
digraph full {
  // Node definitions.
  0 [
    label="uid=822052fc-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Deployment.v1.apps/kube-dns
"
    group="apps"
    version="v1"
    kind="Deployment"
    namespace="kube-system"
    name="kube-dns"
    uid="822052fc-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  1 [
    label="uid=8581a030-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Pod.v1/kube-dns-7b479ccbc6-qz468
"
    group=""
    version="v1"
    kind="Pod"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6-qz468"
    uid="8581a030-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  2 [
    label="uid=857bd8ac-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
ReplicaSet.v1.apps/kube-dns-7b479ccbc6
"
    group="apps"
    version="v1"
    kind="ReplicaSet"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6"
    uid="857bd8ac-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];

  // Edge definitions.
  1 -> 2;
  2 -> 0;
}
```

And with some sample rendering:
```
curl http://localhost:10252/debug/controllers/garbagecollector/graph  | dot -T svg -o project.svg
```

produces

![gc](https://user-images.githubusercontent.com/8225098/43223895-8e33c126-9022-11e8-8ad9-6b2f986fd974.png)


@kubernetes/sig-api-machinery-pr-reviews 
/assign @caesarxuchao @liggitt 

```release-note
NONE
```
2018-07-31 08:05:03 -07:00
Ed Bartosh c086c235f2 kubeadm: fix runtime.ImageExists API
This API return error when underlying 'inspect' command
fails. This makes ImagePullCheck to fail as it doesn't expect
runtime.ImageExists to return an error even if image doesn't exist.

Fixed this by returning error nil even when inspect command fails.
2018-07-31 13:50:12 +03:00
Kubernetes Submit Queue 2bee858a7b
Merge pull request #66284 from stewart-yu/stewart-sharedtype-move
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>.

Move the` k8s.io/kubernetes/pkg/util/pointer` package to` k8s.io/utils/pointer`

**What this PR does / why we need it**:
Move `k8s.io/kubernetes/pkg/util/pointer` to  `shared utils` directory, so that we can use it  easily.
Close #66010 accidentally, and can't reopen it, so the same as #66010 

**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-30 19:50:36 -07:00
Kubernetes Submit Queue 0c1f933693
Merge pull request #66726 from liggitt/kubelet-server
Automatic merge from submit-queue (batch tested with PRs 62444, 66358, 66724, 66726). 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 kubelet serving cert rotation to beta

xref https://github.com/kubernetes/features/issues/267

This is exercised in the alpha gke e2es, and can be enabled in the non-alpha gke e2es once it no longer requires an alpha feature gate.

```release-note
Kubelet serving certificate bootstrapping and rotation has been promoted to beta status.
```
2018-07-27 22:17:09 -07:00
Kubernetes Submit Queue a8641258b6
Merge pull request #62444 from tianshapjq/refactor-server.go
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>.

refactor server.go to simplify the invokes to kubeFlags and KubeConfiguration

**What this PR does / why we need it**:
Since kubeFlags and KubeletConfiguration have been fields of KubeletServer, we just need to pass the reference of KubeletServer to the following functions. This will simplify the migrations of flags such as BootstrapCheckpointPath and others, as we don't have to specify from which object the migrated field comes.

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

**Release note**:

```release-note
NONE
```
2018-07-27 21:03:05 -07:00
stewart-yu f1343af5d7 auto-generated file 2018-07-28 07:54:17 +08:00
stewart-yu 649b46ff1d fix verify about import error 2018-07-28 07:54:16 +08:00
Jordan Liggitt 56e0a571c0
Move kubelet serving cert rotation to beta 2018-07-27 16:06:04 -04:00
Kubernetes Submit Queue 2ffbaa13d0
Merge pull request #66681 from xlgao-zju/use-constant
Automatic merge from submit-queue (batch tested with PRs 66554, 66616, 66695, 66681). 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] Use KubeletRunDirectory instead of hard-coded way

**What this PR does / why we need it**:
fix `TODO: Make hard-coded "/var/lib/kubelet" strings reference this 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**:
cc @neolit123 

**Release note**:

```release-note
NONE
```
2018-07-27 10:09:14 -07:00
Kubernetes Submit Queue f7641e8710
Merge pull request #66482 from dixudx/kubeadm_use_existing_config
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 join the cluster with pre-existing client certificate if provided

**What this PR does / why we need it**:
support `kubeadm join` with a pre-existing client certificate

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

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

**Release note**:

```release-note
kubeadm now can join the cluster with pre-existing client certificate if provided
```
2018-07-27 05:54:27 -07:00
stewart-yu 55251c716a update the import file for move util/pointer to k8s.io/utils 2018-07-27 19:47:02 +08:00
Mikko Ylinen cc117866bd kernel_validator: amend kernel config check paths
Clear Linux Project for Intel Architecture uses its own path
to store kernel build artifacts. This is documented, e.g.,
in https://github.com/clearlinux/clr-boot-manager.

Adapt kernel validator's config check paths to include Clear
Linux's path too.
2018-07-27 09:07:12 +03:00
Xianglin Gao 6ca1428256 Use KubeletRunDirectory instead of hard-coded way
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-07-27 12:22:57 +08:00
Kubernetes Submit Queue 62891a6f2d
Merge pull request #66658 from dixudx/misleading_kubeadm_image_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>.

remove misleading error message on image pulling

**What this PR does / why we need it**:
Actually all the images needed have already been cached locally already as we have pulled them using `crictl`/`docker` in the preflight checks.

The error here is misleading, which should be removed.

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

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

**Release note**:

```release-note
kubeadm: remove misleading error message regarding image pulling
```
2018-07-26 16:48:56 -07:00
David Eads fb7d137ea2 add debug handler capability for individual controllers 2018-07-26 13:24:36 -04:00
Di Xu 997a612206 kubeadm join the cluster with pre-existing client certificate 2018-07-26 19:34:09 +08:00
xushiwei 00425595 fed8572745 use apps/v1 version for scheduler 2018-07-26 17:37:29 +08:00
Di Xu 3c23905781 remove misleading error message on image pulling 2018-07-26 17:07:59 +08:00
liangwenguo 59a6e658d8 fix grammar error: the predicate verb should be the third person. 2018-07-26 16:51:01 +08:00
Kubernetes Submit Queue d9f02d90be
Merge pull request #66299 from mikedanese/cleanup1
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>.

pkg/controller: remove old clientbuilder methods

everything has moved to client-go now so these are the same as the original Client* methods. The only functional change is the collapse of the "horizontal-pod-autoscaler" from one client to two. This should have no effect because the GoClient was used only for discovery.

```release-note
NONE
```
2018-07-26 00:13:01 -07:00
Kubernetes Submit Queue 2755000b3e
Merge pull request #66499 from rosti/kubedns-images
Automatic merge from submit-queue (batch tested with PRs 66291, 66471, 66499). 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: Pull sidecar and dnsmasq-nanny images when using kube-dns

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

It appears that sidecar and dnsmasq-nanny images are now required for
kube-dns deployment to work correctly. Thus the following default kube-dns
images are used now:

- k8s.gcr.io/k8s-dns-kube-dns-amd64:1.14.10
- k8s.gcr.io/k8s-dns-sidecar-amd64:1.14.10
- k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64:1.14.10

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

**Special notes for your reviewer**:

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/assign @luxas
/assign @timothysc
/kind bug

**Release note**:

```release-note
kubeadm: Pull sidecar and dnsmasq-nanny images when using kube-dns
```
2018-07-24 14:00:01 -07:00
Ed Bartosh 02bab4af63 kubeadm: make error output more verbose
Included error output of the docker/crictl into the
kubeadm error output. This should help users to understand better
why runtime is failing.
2018-07-24 13:49:23 +03:00
Rostislav M. Georgiev fb7ba52341 kubeadm: Pull sidecar and dnsmasq-nanny images when using kube-dns
It appears that sidecar and dnsmasq-nanny images are now required for
kube-dns deployment to work correctly. Thus the following default kube-dns
images are used now:

- k8s.gcr.io/k8s-dns-kube-dns-amd64:1.14.10
- k8s.gcr.io/k8s-dns-sidecar-amd64:1.14.10
- k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64:1.14.10

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-07-24 13:35:27 +03:00
Kubernetes Submit Queue c6e91c1f0c
Merge pull request #66382 from bart0sh/PR0023-kubeadm-config-rename-cri-socket-path
Automatic merge from submit-queue (batch tested with PRs 66296, 66382). 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: rename cri-socket-path -> cri-socket

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

Renamed command line option cri-socket-path for 2 reasons:
- to be consistent with the rest of kubeadm code
  reset/init/join/apply subcommands use --cri-socket
- name is misleading as CRI socket can be also an url, not just a path


**Release note**:
```release-note
renamed command line option  --cri-socket-path of the kubeadm subcommand "kubeadm config images pull" to --cri-socket to be consistent with the rest of kubeadm subcommands.
```
2018-07-23 17:26:04 -07:00
tianshapjq 57e0f05fad refactor cmd/kubelet/app/server.go to simplify the kubeFlags and KubeletConfiguration invokes 2018-07-23 19:07:26 +08:00
Rostislav M. Georgiev 961d776fac kubeadm: Improve kubeadm init cmd tests
kubeadm init cmd tests are improved in the following ways:

- Fix a few cases that were always successful (despite completely wrong).
- Add more test cases (for different configs in particular)
- Use dry run, to avoid modifying the system and using kubeadm reset

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-07-23 12:32:51 +03:00
Ed Bartosh b9006648f2 kubeadm: rename cri-socket-path -> cri-socket
Renamed command line option cri-socket-path for 2 reasons:
- to be consistent with the rest of kubeadm code
  reset/init/join/apply subcommands use --cri-socket
- name is misleading as CRI socket can be also an url,
  not just a path
2018-07-23 11:55:04 +03:00
Lee Verberne 7c558fb7bb Remove kubelet-level docker shared pid flag
The --docker-disable-shared-pid flag has been deprecated since 1.10 and
has been superceded by ShareProcessNamespace in the pod API, which is
scheduled for beta in 1.12.
2018-07-22 16:54:44 +02:00
Kubernetes Submit Queue 098e971c68
Merge pull request #66341 from runiq/kubeadm-no-uid-in-spec
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>.

kubeadm: stop setting UID in the kubelet ConfigMap

**What this PR does / why we need it**: kubeadm: stop setting UID in the kubelet ConfigMap

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

Fixes https://github.com/kubernetes/kubeadm/issues/921#

**Release note**:
```release-note
kubeadm: stop setting UID in the kubelet ConfigMap
```
2018-07-20 16:02:05 -07:00
Kubernetes Submit Queue 4ca548201f
Merge pull request #66278 from bart0sh/PR0021-kubeadm-wrap-tests-in-T.Run
Automatic merge from submit-queue (batch tested with PRs 66152, 66406, 66218, 66278, 65660). 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: wrap runtime tests in a t.Run

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

Improved runtime tests by using [T.Run API](https://golang.org/pkg/testing/#T.Run) 

This should improve testing output and make it more visible
which test is doing what.

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

This PR addresses [this review comment](https://github.com/kubernetes/kubernetes/pull/64611#pullrequestreview-137441722) 

**Release note**:
```release-note
NONE
```
2018-07-20 12:12:19 -07:00
Kubernetes Submit Queue 6c500be080
Merge pull request #66218 from atlassian/handle-errors
Automatic merge from submit-queue (batch tested with PRs 66152, 66406, 66218, 66278, 65660). 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>.

Handle errors

**What this PR does / why we need it**:
This is a followup PR for https://github.com/kubernetes/kubernetes/pull/64664 to handle errors returned from `.AddToScheme()` in places where they are not handled.

**Release note**:
```release-note
NONE
```
/kind cleanup
/sig api-machinery
/cc @sttts
2018-07-20 12:12:15 -07:00
Kubernetes Submit Queue d2cc34fb07
Merge pull request #65771 from smarterclayton/untyped
Automatic merge from submit-queue (batch tested with PRs 65771, 65849). 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 a new conversion path to replace GenericConversionFunc

reflect.Call is very expensive. We currently use a switch block as part of AddGenericConversionFunc to avoid the bulk of top level a->b conversion for our primary types which is hand-written. Instead of having these be handwritten, we should generate them.

The pattern for generating them looks like:

```
scheme.AddConversionFunc(&v1.Type{}, &internal.Type{}, func(a, b interface{}, scope conversion.Scope) error {
  return Convert_v1_Type_to_internal_Type(a.(*v1.Type), b.(*internal.Type), scope)
})
```

which matches AddDefaultObjectFunc (which proved out the approach last year). The
conversion machinery should then do a simple map lookup based on the incoming types and invoke the function.  Like defaulting, it's up to the caller to match the types to arguments, which we do by generating this code.  This bypasses reflect.Call and in the future allows Golang mid-stack inlining to optimize this code.

As part of this change I strengthened registration of custom functions to be generated instead of hand registered, and also strengthened error checking of the generator when it sees a manual conversion to error out.  Since custom functions are automatically used by the generator, we don't really have a case for not registering the functions.

Once this is fully tested out, we can remove the reflection based path and the old registration methods, and all conversion will work from point to point methods (whether generated or custom).

Much of the need for the reflection path has been removed by changes to generation (to omit fields) and changes to Go (to make assigning equivalent structs easy).

```release-note
NONE
```
2018-07-19 09:29:00 -07:00
Patrice Peterson a20ff91c4c kubeadm: stop setting UID in the kubelet ConfigMap
Fixes #921.
2018-07-19 10:34:05 +02:00
Kubernetes Submit Queue 990b3d707c
Merge pull request #66282 from bart0sh/PR0022-kubeadm-require-crictl-only-for-CRI-runtime
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>.

check for crictl executable only for CRI runtime

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

crictl is not used for docker runtime, so InPathCheck check can be skipped for docker.

**Release note**:
```release-note
NONE
```
2018-07-18 10:01:53 -07:00
Clayton Coleman 90b5fbe876
generated: bazel 2018-07-17 23:02:16 -04:00
Clayton Coleman ef561ba8b5
generated: Avoid use of reflect.Call in conversion code paths 2018-07-17 23:02:16 -04:00
Mike Danese efb8827215 pkg/controller: remove old clientbuilder methods
everything has moved to client-go now so these are the same as the
original Client* methods.
2018-07-17 09:06:59 -07:00
Mikhail Mazurskiy 5cab7f9a57
Handle errors 2018-07-17 20:47:14 +10:00
Kubernetes Submit Queue 53151500fb
Merge pull request #66212 from metadave/dp_kubeadm_upgrade_diff_todo
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 upgrade diff -config TODO

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

This PR addresses a TODO in `kubeadm upgrade diff` for the `-config` flag to use `options.AddConfigFlag()` instead of `cmd.Flags().StringVar()`.


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

None

**Special notes for your reviewer**:

/sig kubernetes/sig-cluster-lifecycle-pr-reviews

**Release note**:
```release-note
NONE
```
2018-07-17 03:19:27 -07:00
Ed Bartosh 95eb821674 check for crictl executable only for CRI runtime
crictl is not used for docker runtime, so this check
can be skipped when using docker.
2018-07-17 12:51:21 +03:00
Ed Bartosh ad16fbc5a6 kubeadm: wrap runtime tests in a t.Run
Improved runtime tests by using T.Run API:
https://golang.org/pkg/testing/#T.Run

This should improve the test output and make it more visible
which test is doing what.
2018-07-17 11:34:02 +03:00
Kubernetes Submit Queue 0e097af8d8
Merge pull request #65952 from luxas/kubeadm_init_join_exclusive
Automatic merge from submit-queue (batch tested with PRs 63877, 64559, 65952). 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 the kubeadm config kinds mutually exclusive

**What this PR does / why we need it**:
Right now it would be possible to feed kubeadm with a YAML document with all the four different Config kinds kubeadm at HEAD supports, `MasterConfiguration`, `InitConfiguration`, `JoinConfiguration` and `NodeConfiguration`. This PR makes them mutually exclusive so that kubeadm can know how to handle the config file properly.

**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] https://github.com/kubernetes/kubernetes/pull/65776
 - [x] https://github.com/kubernetes/kubernetes/pull/65628
 - [x] https://github.com/kubernetes/kubernetes/pull/65629
 - [x] https://github.com/kubernetes/kubernetes/pull/65631
 - [x] https://github.com/kubernetes/kubernetes/pull/65940
 - [x] https://github.com/kubernetes/kubernetes/pull/65787
 - [x] https://github.com/kubernetes/kubernetes/pull/65945
 - [x] https://github.com/kubernetes/kubernetes/pull/65951

**Special notes for your reviewer**:
Please only review the last commit

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2018-07-16 17:00:09 -07:00
Kubernetes Submit Queue ac4715d6ac
Merge pull request #64611 from bart0sh/PR0017-kubeadm-create-Container-Runtime
Automatic merge from submit-queue (batch tested with PRs 65429, 64611). 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 runtime details into ContainerRuntime

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

This PR moves all docker and CRI specifics into new ContainerRuntime
entity to isolate container runtime details from the rest of the code.

This should help to avoid having CRI and docker specific checks and code all over the place.

**NOTE: this is a not a finished work, but rather an RFC.**

Things to do:
- test manually in docker and cri-o environments

**Release note**:

```release-note
NONE
```
2018-07-16 14:17:02 -07:00
Ed Bartosh e0dd6cc3db add test cases for kubeadm/app/util/runtime
covered ContainerRuntime API with test cases
2018-07-16 12:20:10 +03:00
Ed Bartosh bfb08bbb7b move runtime details into ContainerRuntime
Created ContainerRuntime and used it in preflight checks,
'reset' and 'image' modules.
2018-07-16 12:20:04 +03:00
hangaoshuai c0cc3ee82f fixtodo: add unit test for function FetchConfigFromFileOrCluster 2018-07-16 09:53:17 +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
Lucas Käldström 728b30b3f1 kubeadm: Make the kubeadm config kinds mutually exclusive 2018-07-15 12:59:58 +02:00
Dave Parfitt 107eaf1928 Fix kubeadm upgrade TODOs
Fix several TODO's related to using a generic flag registration method
for --config and --kubeconfig in kubeadm.
2018-07-14 16:32:37 -04:00
Kubernetes Submit Queue 49454a2635
Merge pull request #65576 from stewart-yu/stewart-kubelet-read#02
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]fix DynamicKubeletConfig feature to beta

**What this PR does / why we need it**:
As [PR](https://github.com/kubernetes/kubernetes/pull/64275) get merged,  DynamicKubeletConfig feature convert to  `beta` in v1.11, and set to `true` in default.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-14 03:04:43 -07:00
Kubernetes Submit Queue af8a1dba68
Merge pull request #65951 from luxas/kubeadm_joinconfig
Automatic merge from submit-queue (batch tested with PRs 66138, 65951). 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>.

Rename `NodeConfiguration` to `JoinConfiguration` in the kubeadm v1alpha3 Config API

**What this PR does / why we need it**:
In v1alpha3, we have made the design decision that `NodeConfiguration` will be renamed `JoinConfiguration`. This PR implements that change. 

**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] https://github.com/kubernetes/kubernetes/pull/65776
 - [x] https://github.com/kubernetes/kubernetes/pull/65628
 - [x] https://github.com/kubernetes/kubernetes/pull/65629
 - [x] https://github.com/kubernetes/kubernetes/pull/65631
 - [x] https://github.com/kubernetes/kubernetes/pull/65940
 - [x] https://github.com/kubernetes/kubernetes/pull/65787
 - [ ] https://github.com/kubernetes/kubernetes/pull/65945

**Special notes for your reviewer**:

Please only review the last three commits here.

**Release note**:

```release-note
[action required] The `NodeConfiguration` kind in the kubeadm v1alpha2 API has been renamed `JoinConfiguration` in v1alpha3
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2018-07-13 20:09:08 -07:00
tanshanshan f68af9e584 fix spell 2018-07-14 10:05:56 +08:00
Kubernetes Submit Queue bc25b1a708
Merge pull request #65676 from dkoshkin/kubeadm-version-timeout
Automatic merge from submit-queue (batch tested with PRs 66094, 65676). 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 a timeout when fetching latest version

**What this PR does / why we need it**:
When there is no internet on the node and `--kubernetes-versio`n is not specified running `kubeadm init` hangs forever with no text output.

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

**Special notes for your reviewer**:
Using the same duration as the existing timeout `externalEtcdRequestTimeout`

Sample output:
```
kubeadm init
unable to get URL "https://dl.k8s.io/release/stable-1.11.txt": Get https://dl.k8s.io/release/stable-1.11.txt: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
```

**Release note**:

```release-note
kubeadm: use an HTTP request timeout when fetching the latest version of Kubernetes from dl.k8s.io
```
2018-07-13 16:04:06 -07:00
fabriziopandini 21baef255b autogenerated 2018-07-13 23:06:34 +02:00
fabriziopandini 54b16cbd9e Rename NodeConfiguration to JoinConfiguration in v1alpha3, but support both names for this release of kubeadm 2018-07-13 23:06:17 +02:00
fabriziopandini a6b0410f83 Automated rename from NodeConfiguration to JoinConfiguration 2018-07-13 22:52:41 +02:00
Kubernetes Submit Queue 60ca804515
Merge pull request #65832 from sttts/sttts-apiserver-reusable-loopback-logic
Automatic merge from submit-queue (batch tested with PRs 65832, 66160, 66145). 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>.

apiserver: make loopback logic in SecureServingOptions reusable

For reuse in other components this PR separates the loopback logic from the GenericApiServer config.
2018-07-13 13:22:04 -07:00
Kubernetes Submit Queue c174e4121f
Merge pull request #65900 from bart0sh/PR0020-cri-socket-not-abspath
Automatic merge from submit-queue (batch tested with PRs 65899, 65900). 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 CRI socket validatioin

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

CRI socket doesn't have to be an absolute path, it should be an url.
However, attempt to use it as an url in 'kubeadm init' command line
causes this validation error:

$ sudo ./kubeadm init --cri-socket unix:///var/run/crio/crio.sock
nodeRegistration.criSocket: Invalid value:
"unix:///var/run/crio/crio.sock": path is not absolute

Fixed by adding ValidateSocket function and using it in the 
ValidateNodeRegistrationOptions check instead of ValidateAbsolutePath.

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

[#928](https://github.com/kubernetes/kubeadm/issues/928)

**Release note**:
```release-note
NONE
```
2018-07-13 10:10:05 -07:00
Dr. Stefan Schimanski dc0a736d1e apiserver: make loopback logic in SecureServingOptions reusable 2018-07-13 13:04:57 +02:00
Dr. Stefan Schimanski c1c564fd4d apiserver: add SecureServingOptions.ExternalAddress
Before this the advertised IP (which shows up in the server cert) in case of
listening to loopback was the first host interface IP. This makes self-signed
certs non-constant, such that we cannot use fixtures.
2018-07-13 09:49:54 +02:00
Dr. Stefan Schimanski 7deccb5b7a apiserver: use fixtures for self-signed certs in test server 2018-07-13 09:49:54 +02: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 64eb015471
Merge pull request #66074 from rosti/print-default
Automatic merge from submit-queue (batch tested with PRs 66136, 64999, 65425, 66120, 66074). 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: Printable default component configs

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

This PR makes default component configs printable via `kubeadm config print-default`.
Component configs are not printed by default. You have to explicitly request
that for concrete API objects via the `--api-objects` command line parameter.
For a list of possible API objects use the help option.

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

**Special notes for your reviewer**:
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/assign @luxas
/assign @timothysc
/kind feature

**Release note**:

```release-note
kubeadm: Default component configs are printable via kubeadm config print-default
```
2018-07-12 15:14:23 -07:00
Kubernetes Submit Queue fce58d25ac
Merge pull request #65425 from islinwb/ipvs_cleanup_rules
Automatic merge from submit-queue (batch tested with PRs 66136, 64999, 65425, 66120, 66074). 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>.

Not step into ipvs.CleanupLeftovers() if canUseIPVS's false

**What this PR does / why we need it**:
Earlier we decide whether we should clean up the left-over ipvs rules inside `ipvs.CleanupLeftovers()`, therefore we call function  `ipvs.CanUseIPVSProxier()` two times (and `GetModules()` two times).  Actually no need to step into `ipvs.CleanupLeftovers()` if `canUseIPVS` is false.

**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-12 15:14:16 -07:00
Kubernetes Submit Queue a54d7c6df3
Merge pull request #64999 from islinwb/nodeip_ipv6
Automatic merge from submit-queue (batch tested with PRs 66136, 64999, 65425, 66120, 66074). 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>.

Get ipv6 nodeIP when in ipv6 cluster

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-12 15:14:12 -07:00
fabriziopandini f9000a3f8a kubeadm-ha-phases 2018-07-12 16:45:12 +02:00
Ed Bartosh 2c764c4b7f fix CRI socket validatioin
CRI socket doesn't have to be an absolute path, it should be an url.
However, attempt to use it as an url in 'kubeadm init' command line
causes this validation error:

$ sudo ./kubeadm init --cri-socket unix:///var/run/crio/crio.sock
nodeRegistration.criSocket: Invalid value:
"unix:///var/run/crio/crio.sock": path is not absolute

Fixed by adding ValidateSocket function and using it in the
ValidateNodeRegistrationOptions check instead of ValidateAbsolutePath.
2018-07-12 14:00:47 +03:00
Rostislav M. Georgiev a899760fef kubeadm: Printable default component configs
Make default component configs printable via `kubeadm config print-default`.
Component configs are not printed by default. You have to explicitly request
that for concrete API objects via the `--api-objects` command line parameter.
For a list of possible API objects use the help option.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-07-12 12:42:16 +03:00
Kubernetes Submit Queue 0972ce1acc
Merge pull request #65649 from rsc/fix-printf
Automatic merge from submit-queue (batch tested with PRs 66076, 65792, 65649). 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>.

kubernetes: fix printf format errors

These are all flagged by Go 1.11's
more accurate printf checking in go vet,
which runs as part of go test.

```release-note
NONE
```
2018-07-11 14:09:08 -07:00
Weibin Lin 69398f8411 Get ipv6 nodeIP when in ipv6 cluster 2018-07-11 15:37:43 +08:00
Bin Lu 773ab3ff70 use pause image with fat-manifest
Signed-off-by: Bin Lu <bin.lu@arm.com>
2018-07-11 11:00:44 +08:00
Russ Cox 2bd91dda64 kubernetes: fix printf format errors
These are all flagged by Go 1.11's
more accurate printf checking in go vet,
which runs as part of go test.

Lubomir I. Ivanov <neolit123@gmail.com>
applied ammend for:
  pkg/cloudprovider/provivers/vsphere/nodemanager.go
2018-07-11 00:10:15 +03:00
Kubernetes Submit Queue 9e98f9a785
Merge pull request #65931 from neolit123/proxy-taint
Automatic merge from submit-queue (batch tested with PRs 65931, 65705, 66033). 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: run kube-proxy on non-master tainted nodes

**What this PR does / why we need it**:
kube-proxy should be able to run on all nodes, independent
on the taint of such nodes.

This restriction was previously removed in bb28449e31 but
then was brought back in d1949261ab.

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews 
/cc @luxas @detiber @dixudx @discordianfish @mxey 
/kind bug
/area kube-proxy
/area kubeadm

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

**Special notes for your reviewer**:
we are removing the requirement again, but please have a look at all the implications here.
hopefully we don't have to bring it again.

**Release note**:

```release-note
kubeadm: run kube-proxy on non-master tainted nodes
```
2018-07-10 14:09:04 -07:00
Tim Allclair b1012b2543
Remove unused io util writer & volume host GetWriter() 2018-07-09 14:09:48 -07:00
Lubomir I. Ivanov 8dcb980c6c kubeadm: run kube-proxy on non-master tainted nodes
kube-proxy should be able to run on all nodes, independent
on the taint of such nodes.

This restriction was previously removed in bb28449e31 but
then was brought back in d1949261ab.

Also, annotate with:
  scheduler.alpha.kubernetes.io/critical-pod: ""

and add a class in the template spec:
  priorityClassName: system-node-critical
2018-07-09 22:39:39 +03:00
Kubernetes Submit Queue f6bbf1f6f8
Merge pull request #65830 from sttts/sttts-apiserver-readwrite-port
Automatic merge from submit-queue (batch tested with PRs 65830, 65780, 65961). 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>.

apiserver: get rid of ReadWritePort in config

Executing removal TODO by making the read write port logic explicit, and not hidden deep in the secure serving code.

Preparation for https://github.com/kubernetes/kubernetes/pull/65832
2018-07-09 09:35:02 -07:00
Kubernetes Submit Queue 5232ad4a00
Merge pull request #65917 from dims/remove-stray-comment-from-merge
Automatic merge from submit-queue (batch tested with PRs 64664, 65836, 65917). 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 stray comment from a merge

Signed-off-by: Davanum Srinivas <davanum@gmail.com>



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

Remove stray comment from a merge.

**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-09 08:07:04 -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
Dr. Stefan Schimanski e15ac9eb72 kube-apiserver: disallow --secure-port 0 2018-07-09 14:03:08 +02:00
dkoshkin 1c5b596b77 Add a timeout when fetching latest version 2018-07-09 07:24:38 -04:00
Lucas Käldström 23ac814999
autogenerated 2018-07-09 04:56:34 +03:00
Lucas Käldström c48dfa6fe9
Rename MasterConfiguration to InitConfiguration in v1alpha3, but support both names for this release of kubeadm 2018-07-09 04:55:45 +03:00
Lucas Käldström 52f0591ad9
Automated rename from MasterConfiguration to InitConfiguration 2018-07-09 04:55:02 +03:00
Lucas Käldström 0be8955466
autogenerated 2018-07-08 21:33:56 +03:00
Lucas Käldström 699949fc87
Update the kubeadm config API roundtrip yaml files 2018-07-08 21:33:28 +03:00
Lucas Käldström 17b3b28190
Update unit tests 2018-07-08 21:32:51 +03:00
Lucas Käldström 495ac9883d
Make kubeadm support {un,}marshalling ComponentConfig structs as different YAML documents 2018-07-08 21:32:28 +03:00
Lucas Käldström 5aef95ebe1
Remove the ComponentConfig structs from the external v1alpha3 API. Use the new componentconfigs pkg for validation and conversion 2018-07-08 21:31:35 +03:00
Lucas Käldström f96ada0c04
Add a new package for handling all ComponentConfig-related code 2018-07-08 21:27:53 +03:00
Lucas Käldström 5e6be9de77
autogenerated 2018-07-08 09:55:33 +03:00
Lucas Käldström 71eda34c01
Update the config API roundtrip tests 2018-07-08 09:50:34 +03:00
Lucas Käldström 3594d2ca39
Update unit tests 2018-07-08 09:50:10 +03:00
Lucas Käldström 35673da7c5
Start using the new path in the internal config for the ComponentConfig structs 2018-07-08 09:49:34 +03:00
Lucas Käldström 8004aad307
kubeadm: Embed the internal variants of the componentconfigs in the internal kubeadm API with conversions 2018-07-08 09:42:46 +03:00
Kubernetes Submit Queue d51bfcd4aa
Merge pull request #65920 from dims/pause-image-should-be-arch-agnostic
Automatic merge from submit-queue (batch tested with PRs 65946, 65904, 65913, 65906, 65920). 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: pause image should be arch agnostic, as it is a manifest list

Signed-off-by: Davanum Srinivas <davanum@gmail.com>



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

`pause` image is backed by a manifest list. so we should not use the arch image when reporting using say `kubeadm config image list`

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

**Special notes for your reviewer**:

**Release note**:

```release-note
kubeadm: Fix pause image to not use architecture, as it is a manifest list
```
2018-07-07 16:25:17 -07:00
Kubernetes Submit Queue 2d288a7da4
Merge pull request #65802 from xlgao-zju/improve-output
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] Print required flags when running kubeadm upgrade plan

**What this PR does / why we need it**:
print required flags when running kubeadm upgrade plan

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

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

**Release note**:

```release-note
kubeadm: print required flags when running kubeadm upgrade plan
```
2018-07-07 12:06:43 -07:00
Kubernetes Submit Queue 097f300a4d
Merge pull request #65707 from dims/remove-deprecated-cadvisor-port
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 --cadvisor-port - has been deprecated since v1.10

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

**Special notes for your reviewer**:
- Deprecated in https://github.com/kubernetes/kubernetes/pull/59827 (v1.10)
- Disabled in https://github.com/kubernetes/kubernetes/pull/63881 (v1.11)

**Release note**:

```release-note
[action required] The formerly publicly-available cAdvisor web UI that the kubelet started using `--cadvisor-port` is now entirely removed in 1.12. The recommended way to run cAdvisor if you still need it, is via a DaemonSet.
```
2018-07-07 05:28:13 -07:00
Kubernetes Submit Queue d1608c2ea1
Merge pull request #65856 from deads2k/controller-01-ignored
Automatic merge from submit-queue (batch tested with PRs 65897, 65909, 65856, 65815). 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>.

only need to ignore resources that match discovery conditions

GC and quota controllers ignore resources that are too expensive to manage.  In kube this is only events.  The incompatible resources should now be excluded on the basis of discovery.  We should actually reflect that in the RESTStorage (done for GC for events) and discovery too.

@liggitt 
@kubernetes/sig-api-machinery-bugs 

```release-note
NONE
```
2018-07-06 12:25:09 -07:00
Davanum Srinivas a6f86c6778
pause image should be arch agnostic
Change-Id: I4997ace30077335767bca402a8b98202c91b950b
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2018-07-06 15:18:43 -04:00
Davanum Srinivas 1eccc2f5db
remove stray comment from a merge
Change-Id: Ie8f680a36241387e04e9602dd52aacbb3b3b1dc2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2018-07-06 14:07:20 -04:00
Xianglin Gao 00552765f2 add test case
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-07-07 00:48:27 +08:00
wojtekt 26b3bacb65 Make proxier params configurable in kubemark 2018-07-06 16:07:15 +02:00
Kubernetes Submit Queue 86b9a53226
Merge pull request #65860 from sttts/sttts-high-ports
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>.

controller-managers: allow high ports in secure serving validation

Certain operating systems will select high port (>32768) when asked for a free port. This PR changes the validation to allow that.

Like https://github.com/kubernetes/kubernetes/pull/65833, but for controller managers.

```release-note
Allow kube- and cloud-controller-manager to listen on ports up to 65535.
```
2018-07-05 19:25:25 -07:00
Kubernetes Submit Queue 43b59986f4
Merge pull request #65866 from sttts/sttts-ctrl-manager-stopch
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>.

kube-controller-manager: add stopCh plumbing

Needed for integration testing.
2018-07-05 13:01:18 -07:00
Kubernetes Submit Queue 667ad2b163
Merge pull request #65867 from sttts/sttts-ctrl-mgr-self-signed-certs
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>.

kube-controller-manager: create self-signed certs

If secure serving is enabled (not automatically wired yet, but 3rdparties could wire it), create self-signed certs if none are given. Reuses the code from k8s.io/apiserver.
2018-07-05 13:01:14 -07:00
Kubernetes Submit Queue c7d4931dad
Merge pull request #65710 from sttts/sttts-unified-apiserver-testserver
Automatic merge from submit-queue (batch tested with PRs 64911, 65710). 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>.

apiextensions-apiserver: add pkg/cmd/server/testing pkg for integration tests

In analogy to kube-apiserver, this implements a uniform apiextensions-apiserver for integration tests which can be started using customized flags.
2018-07-05 11:39:03 -07:00