Commit Graph

1207 Commits (a4e49d19f92132c367feab7f1351a3aaef01bc60)

Author SHA1 Message Date
Eric Chiang 8debdc1501 kubeadm: more random tokens
The strategy of hex encoding a random byte array only uses the
following characters:

	0123456789abcdef

Instead of the entire bootstrapping token character set:

	0123456789abcdefghijklmnopqrstuvwxyz

Update the token generation to use the entire character set. This
increases the token secret from 48 bits of entropy to ~82 bits.

256^8 (1.8e+19) vs. 36^16 (7.9e+24).
2018-01-09 09:20:25 -08:00
Kubernetes Submit Queue df2428c6dd
Merge pull request #57917 from roberthbailey/kubeadm-owners
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 mikedanese from kubeadm owners since he's no longer actively working on the project

**What this PR does / why we need it**: OWNERS file cleanup.

**Release note**:
```release-note
NONE
```
2018-01-08 14:10:27 -08:00
Kubernetes Submit Queue 6244ff3644
Merge pull request #57784 from rajansandeep/upgradenits
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` error while CoreDNS is installed

**What this PR does / why we need it**:
In the scenario when I have CoreDNS installed via `kubeadm init` and I want to continue using CoreDNS after `kubeadm upgrade`, the upgrade is unsuccessful and it gives an error.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-08 08:28:01 -08:00
Sandeep Rajan 9d7b74658d include kube-dns deployment check
ignore 404 error
2018-01-08 20:16:15 +05:30
Kubernetes Submit Queue bd4d511a40
Merge pull request #57852 from misterikkit/moveScheduler
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 scheduler out of plugin directory

**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)*:
This is but one step toward resolving the referenced issue.
/ref #57579

**Special notes for your reviewer**:

**Release note**:

```release-note
Default scheduler code is moved out of the plugin directory.
plugin/pkg/scheduler -> pkg/scheduler
plugin/cmd/kube-scheduler -> cmd/kube-scheduler
```
/sig scheduling
2018-01-05 22:20:13 -08:00
Kubernetes Submit Queue 70e6f45eee
Merge pull request #56084 from andrewsykim/kubeadm/400
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: set kube-apiserver advertise address using downward API

**What this PR does / why we need it**:
Sets kube-apiserver --advertise-address using downward API for self-hosted Kubernetes with 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 # https://github.com/kubernetes/kubeadm/issues/400

**Special notes for your reviewer**:
@luxas mentioned something about losing the ability to customize advertise address via kubeadm, didn't really take that into consideration yet but I can definitely make the necessary changes if needed. 

**Release note**:
```release-note
kubeadm: set kube-apiserver advertise address using downward API
```
2018-01-05 15:05:50 -08:00
Jonathan Basseri 85c5862552 Fix scheduler refs in BUILD files.
Update references to moved scheduler code.
2018-01-05 15:05:01 -08:00
Jonathan Basseri 30b89d830b Move scheduler code out of plugin directory.
This moves plugin/pkg/scheduler to pkg/scheduler and
plugin/cmd/kube-scheduler to cmd/kube-scheduler.

Bulk of the work was done with gomvpkg, except for kube-scheduler main
package.
2018-01-05 15:05:01 -08:00
Robert Bailey 761decc3b5 Remove mikedanese from kubeadm owners since he's no longer
actively working on the project.
2018-01-05 14:46:14 -08:00
Robert Pothier 12301ae319 Kubeadm: clean up MarshalToYamlForCodecs
Proxy will use PrintBytesWithLinePrefix to indent.
2018-01-05 14:38:42 -05:00
Kubernetes Submit Queue afbbd394c1
Merge pull request #57517 from verb/paws-bump
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>.

Bump pause container used by kubelet and tests to 3.1

This updates the version of the pause container used by the kubelet and
various test utilities to 3.1.

**What this PR does / why we need it**: The pause container hasn't been rebuilt in quite a while and needs an update to reap zombies (#50865) and for schema2 manifest (#56253).

**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 #50865, Fixes #56253

**Special notes for your reviewer**:

**Release note**:

```release-note
The kubelet uses a new release 3.1 of the pause container with the Docker runtime. This version will clean up orphaned zombie processes that it inherits.
```
2018-01-04 17:06:48 -08:00
Lee Verberne 1ea697044a Update pause container version to 3.1
This updates the version of the pause container used by the kubelet and
various test utilities to 3.1.

This also adds a CHANGELOG.md for build/pause
2018-01-04 11:35:29 +01:00
Kubernetes Submit Queue 46eabb7d91
Merge pull request #56534 from allenpetersen/updateGengo
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update gengo version to include goimports formatter

Update gengo which now uses goimports to format code and organize imports.

Fixes #55542

**Special notes for your reviewer**:
Updates version of k8s.io/gengo
Takes new dependency on golang.org/x/tools/imports and golang.org/x/tools/go/ast/astutil

**Release Notes**:
```release-note
NONE
```
2018-01-03 17:47:05 -08:00
Kubernetes Submit Queue d8d680be6e
Merge pull request #57797 from kargakis/i-can-do-reviews
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 myself in kubeadm reviewers

/cc @luxas @roberthbailey
2018-01-03 11:15:41 -08:00
Michalis Kargakis dddee91392
Add myself in kubeadm reviewers 2018-01-03 17:17:39 +01:00
Allen Petersen 3d69cea1e5 Update generated files 2018-01-02 22:13:19 -08:00
Christoph Blecker 80e344644e
Regenerate all generated code 2018-01-02 00:21:07 -08:00
xiangpengzhao 38a8c72f8a Print the full path of Kubeconfig files. 2018-01-02 14:33:48 +08:00
andrewsykim 49e01b05e7 kubeadm: set kube-apiserver advertise address using downward API 2017-12-26 14:41:07 -05:00
Kubernetes Submit Queue 18758f502c
Merge pull request #57594 from m1093782566/hairpin
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 incorrect hairpin-mode value and validate it

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

* Fix incorrect hairpin-mode value 

* Add validation

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-12-26 03:59:59 -08:00
Kubernetes Submit Queue 025886a8bf
Merge pull request #57231 from xiangpengzhao/remove-wkl
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 well_known_labels in kubeadm.

**What this PR does / why we need it**:
Cleanup. This is no longer used.

fixes: https://github.com/kubernetes/kubeadm/issues/615

**Release note**:

```release-note
NONE
```
2017-12-26 03:21:15 -08:00
xiangpengzhao 347cdcf198 Auto generated BUILD files. 2017-12-26 10:38:49 +08:00
xiangpengzhao 926baf5fe7 Refactoring ValidateUsages for for bootstrap tokens. 2017-12-26 10:38:49 +08:00
Kubernetes Submit Queue 980a5e80b1
Merge pull request #57132 from zjj2wry/kube-schedule-initflag
Automatic merge from submit-queue (batch tested with PRs 55483, 57132). 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>.

enhance kube-schedule init flag

**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)*:
```
remove TODO: once we switch everything over to Cobra commands, we can go back to calling
utilflag.InitFlags() (by removing its pflag.Parse() call). 
For now, we have to set the normalize func and add the go flag set by hand.
```

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-12-25 10:53:28 -08:00
Kubernetes Submit Queue 0f210153f7
Merge pull request #55483 from xiangpengzhao/kubeadm-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 case for RunCreateToken

**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)*:
ref: https://github.com/kubernetes/kubernetes/pull/55377#discussion_r149910681

**Special notes for your reviewer**:
/cc @luxas
**Release note**:

```release-note
none
```
2017-12-25 10:32:25 -08:00
Di Xu 1c715d51c4 some code change
fix wrong required flags

disable the addition of [flags] to the usage, use customized useline

fix function rename
2017-12-25 16:23:38 +08:00
m1093782566 120a23a025 update kubeadm validation test to fix test error 2017-12-25 11:37:55 +08:00
xiangpengzhao 8b2da625fe Fix kubeadm upgrade unit test failure. 2017-12-25 10:53:33 +08:00
xiangpengzhao 205cbf470e Update DNS version in kubeadm of 1.10 cycle. 2017-12-25 09:13:36 +08:00
Jeff Grafton 46e894bfd3 Switch go binaries from (hacky) static to pure Go 2017-12-23 13:13:09 -08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Tim Hockin e9dd8a68f6 Revert k8s.gcr.io vanity domain
This reverts commit eba5b6092a.

Fixes https://github.com/kubernetes/kubernetes/issues/57526
2017-12-22 14:36:16 -08:00
Kubernetes Submit Queue 09b5e8f411
Merge pull request #57207 from cimomo/kubeadm-fixes
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>.

Improve error messages and comments in KubeAdm.

**What this PR does / why we need it**:
Improve error messages and comments in 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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-12-22 06:56:13 -08:00
Kubernetes Submit Queue cfdf8ae231
Merge pull request #56565 from stewart-yu/fixTextErrorKubeadm
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 minor err in kubeadm

**What this PR does / why we need it**:
fix minor text error in 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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-12-22 06:12:38 -08:00
Kubernetes Submit Queue 7e22151db7
Merge pull request #57358 from ericchiang/kubeadm-upgrade/unit-test-fix
Automatic merge from submit-queue (batch tested with PRs 57139, 57358). 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 upgrade: fix unit test flake

The CA generated for each test case is global and the cases modify
the expiry. This can flake depending on what order the tests run.

Generate a new CA for each test case.

```release-note
NONE
```

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

/cc @kubernetes/sig-cluster-lifecycle-bugs 
/cc @xiangpengzhao
/cc @luxas
2017-12-22 06:04:29 -08:00
Kubernetes Submit Queue 6730a6e927
Merge pull request #57139 from bistros/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fixed typo in kubeadm/v1alpha1/defaults.go

**What this PR does / why we need it**:
fixed some typo in comment

**Release note**:

```release-note
NONE
```
2017-12-22 05:27:04 -08:00
Kubernetes Submit Queue 49a3eed10c
Merge pull request #57235 from xiangpengzhao/update-apps-ver
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 API in kubeadm

**What this PR does / why we need it**:
The core workloads API has been promoted to GA stability in the apps/v1 group version from 1.9. Use apps/v1 API in 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 https://github.com/kubernetes/kubeadm/issues/596

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

**Release note**:

```release-note
NONE
```
2017-12-22 04:33:47 -08:00
xiangpengzhao 8c8cdfe7b7 Update CoreDNS version and Corefile. 2017-12-19 12:10:02 +08:00
xiangpengzhao 88f609fe4d Auto generate BUILD files. 2017-12-19 11:44:19 +08:00
xiangpengzhao 7d919fbd0c Use apps/v1 API in kubeadm. 2017-12-19 11:44:19 +08:00
Eric Chiang eab0e37a63 kubeadm upgrade: fix unit test
The CA generated for each test case is global and the cases modify
the expiry. This can flake depending on what order the tests run.

Generate a new CA for each test case.
2017-12-18 15:35:31 -08:00
Tim Hockin eba5b6092a Use k8s.gcr.io vanity domain for container images 2017-12-18 09:18:34 -08:00
Kubernetes Submit Queue 035ff73f7b
Merge pull request #56294 from xiangpengzhao/kubeadm-minor-cleanup
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Minor cleanup in kubeadm.

```release-note
NONE
```
2017-12-18 03:10:27 -08:00
stewart-yu f41f1887e2 Fix minor err in kubeadm 2017-12-18 18:36:06 +08:00
Kubernetes Submit Queue a35ac9e8fc
Merge pull request #57305 from xiangpengzhao/update-addon-kubeproxy
Automatic merge from submit-queue (batch tested with PRs 57287, 57233, 57305). 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 kube-proxy 1.8 configmap and daemonset manifests in kubeadm

**What this PR does / why we need it**:
Remove unsupported manifests of kube-proxy in kubeadm of 1.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 #

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

**Release note**:

```release-note
NONE
```
2017-12-18 02:19:36 -08:00
Kubernetes Submit Queue a6891528a7
Merge pull request #57233 from xiangpengzhao/kubeadm-support-version
Automatic merge from submit-queue (batch tested with PRs 57287, 57233, 57305). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update kubeadm's minimum supported kubernetes to 1.9.

**What this PR does / why we need it**:
Update it in 1.10 cycle.

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

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

**Release note**:

```release-note
Update kubeadm's minimum supported Kubernetes version in v1.10.x to v1.9.0
```
2017-12-18 02:19:33 -08:00
xiangpengzhao 9c9ac106b8 Auto generated BUILD files. 2017-12-18 15:17:29 +08:00
xiangpengzhao 0de49c461f Remove kube-proxy 1.8 configmap and daemonset manifests in kubeadm. 2017-12-18 15:17:17 +08:00
Matt Kelly 41a4db7f48 kubeadm: Only check for well-known files in preflight 2017-12-17 13:41:15 -05:00
Kubernetes Submit Queue 6ca0bdd455
Merge pull request #55572 from wackxu/altname
Automatic merge from submit-queue (batch tested with PRs 56390, 56334, 55572, 55598, 56563). 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 apiServerCertSANs case for test GetAltNames

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

When fix #55566 , found there is not test case for apiServerCertSANs 

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

assgin @luxas 

**Release note**:

```release-note
NONE
```
2017-12-15 22:51:43 -08:00
xiangpengzhao ed4c51053e Update kubeadm's minimum supported kubernetes to 1.9. 2017-12-16 10:56:55 +08:00
xiangpengzhao 02dabb84eb Remove unused well_known_labels in kubeadm. 2017-12-15 14:59:05 +08:00
Kai Chen 67cf959a1d Improve error messages and comments in KubeAdm. 2017-12-14 11:11:58 -08:00
zhengjiajin ffbfd81c06 remove dependency from cobra, only use option test init flag 2017-12-14 17:31:49 +08:00
Kubernetes Submit Queue bf6907c509
Merge pull request #55900 from cimomo/small-fixes
Automatic merge from submit-queue (batch tested with PRs 55900, 55995, 55913, 55467, 55376). 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 a typo in kubeadm/GetEtcdPodSpec

**What this PR does / why we need it**:
Fix a typo in kubeadm/GetEtcdPodSpec.

**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
```
2017-12-14 00:45:12 -08:00
Kubernetes Submit Queue 32ecf25264
Merge pull request #54994 from xiangpengzhao/kubeadm-val-test
Automatic merge from submit-queue (batch tested with PRs 55954, 56037, 55866, 55984, 54994). 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>.

Improve kubeadm validation unit test coverage.

**What this PR does / why we need it**:
From:
`ok  	k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/validation	0.100s	coverage: 92.3% of statements`
To:
`ok  	k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/validation	0.114s	coverage: 100.0% of statements`

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

**Release note**:

```release-note
NONE
```
2017-12-13 23:26:03 -08:00
bistros 8ac24a5ed2 fixed typo in kubeadm/v1alpha1/defaults.go
fixed some type in comment
2017-12-13 18:43:30 +09:00
Kubernetes Submit Queue b953341d13
Merge pull request #56599 from xiangpengzhao/kubeadm_stable_v19_version
Automatic merge from submit-queue (batch tested with PRs 56599, 56824, 56918, 56967, 56959). 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 the v1.9 branch by default

**What this PR does / why we need it**:
As per https://github.com/kubernetes/kubeadm/blob/master/docs/release-cycle.md, bump the default Kubernetes version to use in kubeadm right before v1.9.0-rc.1 (or maybe rc.0 ?) is cut.

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

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

**Release note**:

```release-note
NONE
```
2017-12-11 19:58:12 -08:00
Kubernetes Submit Queue 2a71ed2141
Merge pull request #57043 from luxas/kubeadm_v19_fixup
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: Don't downgrade etcd on cluster downgrade

**What this PR does / why we need it**:
 - Don't try downgrade etcd on k8s downgrade -- that doesn't work
 - Mark self-hosting as alpha as discussed in the SIG
 - Don't print the beta warning as it confuses users
 - Slightly make the wording around upgrade/downgrade clearer

**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
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-12-11 13:20:21 -08:00
Lucas Käldström f99aae9ce3
kubeadm: Don't downgrade etcd on cluster downgrade 2017-12-11 19:37:18 +02:00
Kubernetes Submit Queue 77a2a64674
Merge pull request #56802 from rajansandeep/updateversion
Automatic merge from submit-queue (batch tested with PRs 55360, 56444, 56687, 56791, 56802). 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>.

Bump CoreDNS version to 1.0.0

**What this PR does / why we need it**:
Updating the CoreDNS version to 1.0.0, which fixes bugs, including the ones which were failing the e2e tests for kubeadm with CoreDNS as the default DNS server (kubernetes/test-infra#5601)

**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
```
2017-12-04 13:40:22 -08:00
Sandeep Rajan d832e6ae63 coredns 1.0.0 2017-12-04 11:57:18 -05:00
Lucas Käldström f7c494fe5b
kubeadm: Fix a couple of upgrade/downgrade-related bugs 2017-12-02 00:27:07 +02:00
Kubernetes Submit Queue 160270800f
Merge pull request #56535 from dims/create-volume-mount-and-host-path-for-cloud-config
Automatic merge from submit-queue (batch tested with PRs 56400, 56535). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Create volumeMount and hostPath for cloud config file

We have a way to specify the cloudProvider in kubeadm.conf. We also
add `--cloud-config /etc/kubernetes/cloud-config` to both the
kubernetes api server and controller manager yaml files if one exists
on the box. However we fail to make that file available to the
process running in the container. We need to make this `cloud-config`
file available to both processes similar to how controller-manager.conf
is passed to controller manager.



**What this PR does / why we need it**:
Fixes https://github.com/kubernetes/kubeadm/issues/576

**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
```
2017-11-29 18:59:13 -08:00
xiangpengzhao 91ccdaa057 kubeadm: Use the v1.9 branch by default 2017-11-30 09:31:46 +08:00
Kubernetes Submit Queue 617821eb39
Merge pull request #56544 from leblancd/v6_dns_probe_brackets
Automatic merge from submit-queue (batch tested with PRs 56497, 56500, 55018, 56544, 56425). 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 brackets around IPv6 kube-dns liveness probe addrs

**What this PR does / why we need it**:
Previously, when an IPv6-only Kubernetes cluster was instantiated
via 'kubeadm init ...', the liveness probes that were
configured by kubeadm for kube-dns currently use IP:port
strings of "::1:53" and "::1:10053". These IP:port strings should
instead include brackets around the ::1 IPv6 loopback address, e.g.
"[::1]:53" and "[::1]:10053".

This change adds the necessary brackets around the ::1 IPv6 loopback
address.

Without this change, the kube-dns sidecar container interprets the
bracket-less strings as IPv4 IP:port strings that have too many
colons, and the kube-dns pod is restarted about once every 2 minutes.

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

/area ipv6
/sig network

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE

```
2017-11-29 15:26:08 -08:00
Kubernetes Submit Queue b86569fe10
Merge pull request #56500 from sbezverk/kubeadm_etcd_fix_1
Automatic merge from submit-queue (batch tested with PRs 56497, 56500, 55018, 56544, 56425). 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 etcd modifying recovery steps

Closes #56499
```release-note
Modifying etcd recovery steps for the case of failed upgrade
```
2017-11-29 15:26:02 -08:00
Serguei Bezverkhi 294114a219 kubeadm etcd modifying recover steps 2017-11-29 15:53:07 -05:00
Davanum Srinivas a11f984356 Create volumeMount and hostPath for cloud config file
We have a way to specify the cloudProvider in kubeadm.conf. We also
add `--cloud-config /etc/kubernetes/cloud-config` to both the
kubernetes api server and controller manager yaml files if one exists
on the box. However we fail to make that file available to the
process running in the container. We need to make this `cloud-config`
file available to both processes similar to how controller-manager.conf
is passed to controller manager.
2017-11-29 15:29:01 -05:00
Dane LeBlanc d626de113f Add brackets around IPv6 kube-dns liveness probe addrs
When a Kubernetes cluster is instantiated in IPv6-only mode
via 'kubeadm init ...', the liveness probes that are
configured by kubeadm for kube-dns currently use IP:port
strings of "::1:53" and "::1:10053". These IP:port strings should
instead include brackets around the ::1 IPv6 loopback address, e.g.
"[::1]:53" and "[::1]:10053".

This change adds the necessary brackets around the ::1 IPv6 loopback
address.

Without this change, the kube-dns sidecar container interprets the
bracket-less strings as IPv4 IP:port strings that have too many
colons, and the kube-dns pod is restarted about once every 2 minutes.

fixes #56543

/area ipv6
/sig network
2017-11-29 07:44:06 -05:00
Davanum Srinivas 6ec2bdf9db Allow config and ignore-preflight to be specified together
In commit 3a0aa06fc9, the flag
was changed from `ignore-checks-errors` to `ignore-preflight-errors`,
but the condition check in ValidateMixedArguments was not updated.
So specifying say `--config kubeadm.conf --ignore-preflight-errors all`
would fail.
2017-11-29 05:56:22 -05:00
xiangpengzhao b5b75997fb Add test case for validate kube-proxy configuration. 2017-11-25 12:29:48 +08:00
xiangpengzhao 2419af51fd Improve kubeadm validation unit test coverage. 2017-11-25 11:43:00 +08:00
Lion-Wei 92117f69e3 add kube config file of kube-proxy to kube-proxy config map 2017-11-25 09:11:54 +08:00
xiangpengzhao cf97d6f6eb Run the kubeletconfig defaulter in kubeadm defaults 2017-11-25 01:15:54 +08:00
xiangpengzhao 1e26acfa52 Enable kube-proxy validation in kubeadm validation. 2017-11-25 01:15:54 +08:00
xiangpengzhao da971d8020 Only set defaults when DynamicKubeletConfig feature gate is on. 2017-11-25 01:15:54 +08:00
xiangpengzhao 845a10f0a9 Auto generated BUILD files. 2017-11-25 01:15:50 +08:00
xiangpengzhao 737c0ec9eb Add validation of kubelet configuration in kubeadm. 2017-11-25 01:11:33 +08:00
Kubernetes Submit Queue 64ccd7665f
Merge pull request #56311 from xiangpengzhao/kubeadm-proxy-ipvs
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 SupportIPVSProxyMode feature gate in kubeadm.

**What this PR does / why we need it**:
Since #55972 gets merged, kubeadm now supports using kube-proxy ComponentConfig. Then `SupportIPVSProxyMode` feature gate can be configured in kube-proxy config. There is no need to config the feature gate in kubeadm (workaround introduced by #53962). The benefit of removing it I can think of is that we don't need to care about the IPVS feature evolution in kubeadm any longer.

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

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

**Release note**:

```release-note
NONE
```
2017-11-24 07:20:27 -08:00
Kubernetes Submit Queue 58fca39de3
Merge pull request #56130 from anguslees/kubeadm-nodehealth
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>.

Make healthchecks skippable, and check masters only

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

Previously kubeadm would abort if _any_ node was not Ready.  This is obviously infeasible in a non-trivial (esp. baremetal) cluster.

This PR makes two changes:
- Allows kubeadm healthchecks to be selectively skipped (made non-fatal) with --ignore-checks-errors.
- Check only that the *master* nodes are Ready.

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

**Special notes for your reviewer**:

Builds on #56072

**Release note**:

```release-note
kubeadm health checks can also be skipped with `--ignore-checks-errors`
```
2017-11-24 04:20:26 -08:00
xiangpengzhao f13e374ddb Auto generated BUILD files. 2017-11-24 12:03:34 +08:00
xiangpengzhao 70983e2838 Remove SupportIPVSProxyMode feature gate in kubeadm. 2017-11-24 12:03:13 +08:00
Kubernetes Submit Queue 0b597b51d6
Merge pull request #55972 from rpothier/v6_proxy_bind_addr
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 kube-proxy ComponentConfig in kubeadm clusters

This change adds configuring the kube-proxy bind address to be an
IPv6 address based on the whether the API server advertise address is IPv6.

It is doing this via the kube-proxy ComponentConfig API now from v1.9

**What this PR does / why we need it**:
This PR sets the bind address for kube-proxy to be a IPv6 address. This is needed for IPv6

**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 #50927
Fixes https://github.com/kubernetes/kubeadm/issues/527

**Special notes for your reviewer**:

**Release note**:

```release-note
Adds kubeadm support for using ComponentConfig for the kube-proxy
```
2017-11-23 17:58:09 -08:00
Angus Lees 3da5985916 Only check Readiness of masters, not every node 2017-11-24 10:27:35 +11:00
Angus Lees 68ea48bd2b Allow healthchecks to be skipped with --ignore-checks-errors too 2017-11-24 10:27:35 +11:00
Kubernetes Submit Queue 362e6293ce
Merge pull request #56190 from edisonxiang/fixcontrolplaneunittests
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 controlplane unit tests

What this PR does / why we need it:

when the flexvolumeDirVolumePath is truely existent in the host,
```cmd/kubeadm/app/phases/controlplane``` unit tests will be failed.

Fixes #56189

Release note:
```release-note
NONE
```
2017-11-23 15:07:32 -08:00
Alexander Kanevskiy 3a0aa06fc9 kubeadm: rename flag to --ignore-preflight-errors
Improves user experience by using name that is more
descriptive.
2017-11-23 15:37:57 +02:00
xiangpengzhao 1c96fa21d2 Minor cleanup in kubeadm. 2017-11-23 20:32:09 +08:00
xiangpengzhao 7de8d545f3 Add test case for RunCreateToken 2017-11-23 19:32:36 +08:00
Kubernetes Submit Queue ad4f8a2f67
Merge pull request #56255 from sbezverk/fix_etcd_version
Automatic merge from submit-queue (batch tested with PRs 56249, 56118, 56255, 56252, 56256). 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 etcd version for 1.10.X kubernetes

Closes #56254
2017-11-23 00:23:23 -08:00
Kubernetes Submit Queue 408f64062f
Merge pull request #55952 from rajansandeep/corednsupgrade
Automatic merge from submit-queue (batch tested with PRs 55952, 49112, 55450, 56178, 56151). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add support to kubeadm upgrade for CoreDNS

**What this PR does / why we need it**:
This PR enables to get CoreDNS in the kubeadm upgrade and alpha phases addons via feature-gates.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
kubeadm: Add CoreDNS support for kubeadm "upgrade" and "alpha phases addons".
```
2017-11-22 21:48:38 -08:00
Robert Pothier ce8113d9a9 Update kubeadm config for setting kube-proxy bind address
This change adds configuring the kube-proxy bind address to be an
IPv6 address based on the whether the API server advertise address is IPv6.
2017-11-23 00:48:20 -05:00
Kubernetes Submit Queue 55d8781b09
Merge pull request #56185 from mattmoyer/kubeadm-print-join-command
Automatic merge from submit-queue (batch tested with PRs 55545, 55548, 55815, 56136, 56185). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: add `--print-join-command` flag for token create.

**What this PR does / why we need it**: This change adds a new flag `kubeadm token create --print-join-command`. When this flag is passed, kubeadm prints the full `kubeadm join [...]` command, including the CA certificate hash which is otherwise annoying to calculate.

**Which issue(s) this PR fixes** fixes https://github.com/kubernetes/kubeadm/issues/519

**Special notes for your reviewer**:

### Example Output
```
$ kubeadm token create --print-join-command
kubeadm join --token 447067.20b55955bd6abe6c 192.168.99.100:8443 --discovery-token-ca-cert-hash sha256:17023a5c90b996e50c514e63e161e46f78be216fd48c0c3df3be67e008b28889
$ kubeadm token create -h
[...]
      --print-join-command   Instead of printing only the token, print the full 'kubeadm join' flag needed to join the cluster using the token.
[...]
```

I ended up not using the approach suggested by @xiangpengzhao in https://github.com/kubernetes/kubernetes/pull/56025 (and also by @fabriziopandini) of reusing the `bootstrap-token` phase code, since that code assumes it can load the CA certificates from `/etc/kubernetes`, but that is only true if kubeadm is run on an already-joined node.

Instead, I wrote code to pull the CA certificates and server endpoint from the kubeconfig that `kubeadm token create` is called with, since that also contains the data and is available even if, e.g., kubeadm is being run from outside the cluster.

**Release note**:
```release-note
kubeadm: added `--print-join-command` flag for `kubeadm token create`.
```

/sig cluster-lifecycle

/cc @fabriziopandini @xiangpengzhao @luxas
2017-11-22 16:52:34 -08:00
Serguei Bezverkhi a63fadfbd5 Fixing etcd version for 1.10.X kubernetes 2017-11-22 17:16:11 -05:00
Kubernetes Submit Queue 93dc3763b0
Merge pull request #56201 from luxas/new_kubeadm_owners
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>.

Restructure cmd/kubeadm/OWNERS

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

After a year of virtually the same people in `cmd/kubeadm/OWNERS`, the SIG has decided to refresh the list of reviewers/approvers a little. If you feel more/other changes are needed yet, please speak up here in this thread, in our weekly SIG meeting or ping me on Slack.

Thanks all everyone that has helped out here and thanks to you who are stepping up more now!

**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
```
@kubernetes/sig-cluster-lifecycle-pr-reviews 

Please ACK that you are ok with this officially here as well:
@kad @timothysc @jamiehannaford @xiangpengzhao @lukemarsden @errordeveloper @mattmoyer @justinsb @fabriziopandini
2017-11-22 14:13:10 -08:00
Kubernetes Submit Queue 4e2f5e2212
Merge pull request #56020 from xiangpengzhao/write-kubeletconf-todisk
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>.

 Write marshalled kubeletconfig object to init-config-dir

**What this PR does / why we need it**:
from @luxas :
>Write the the marshalled kubeletconfig object to /var/lib/kubelet/config/init/kubelet so that the kubelet will start up with the right params on init/join. The only params expected in the kubelet command-line after this is kubelet --init-config-dir /var/lib/kubelet/config/init --dynamic-config-dir /var/lib/kubelet/config/dynamic

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

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

**Release note**:

```release-note
NONE
```
2017-11-22 10:17:56 -08:00
Sandeep Rajan 90a9cd8ca1 support upgrade plan for coredns 2017-11-22 11:14:08 -05:00
Matt Moyer b4b275d255 kubeadm: add `--print-join-command` flag for token create.
This change adds a new flag `kubeadm token create --print-join-command`. When this flag is passed, kubeadm prints the full `kubeadm join [...]` command, including the CA certificate hash which is otherwise annoying to calculate.

Example:
```
$ kubeadm token create --print-join-command
kubeadm join --token 447067.20b55955bd6abe6c 192.168.99.100:8443 --discovery-token-ca-cert-hash sha256:17023a5c90b996e50c514e63e161e46f78be216fd48c0c3df3be67e008b28889
```
2017-11-22 09:29:47 -06:00
xiangpengzhao e89927a890 Should make dir before writing file. 2017-11-22 23:01:54 +08:00