Commit Graph

5569 Commits (25238441fdbf7383e45c05613ec15aab13a5bcb5)

Author SHA1 Message Date
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
Kubernetes Submit Queue 04d1fcc9f3
Merge pull request #52049 from cheftako/ccm-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>.

Fix failure to load volume plugins for #52048

Currently we have two plugin managers.
However one of them limits the cloud plugins it loads.
This means that if cloud provider is set to external the plugins will
not be loaded in *that* plugin manager. However they will be loaded in
the other instance of the plugin manager. So it does not actually save
us anything. It does hamper the efforts to actually get stage 1
separation working.

**What this PR does / why we need it**: It allows the plugins be found for the cloud providers working on stage 1 separation.

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

**Special notes for your reviewer**:

**Release note**:
```release-note NONE
```
2017-11-23 12:53:40 -08:00
Kubernetes Submit Queue 06963c5384
Merge pull request #56208 from kad/ignore-errors-flag
Automatic merge from submit-queue (batch tested with PRs 56208, 55690). 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 flag to --ignore-preflight-errors

**What this PR does / why we need it**:
Addresses comments in #56072
Improves user experience by using name that is more
descriptive.

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

**Special notes for your reviewer**:
/area kubeadm
/sig cluster-lifecycle
/assign @timothysc

**Release note**:
```release-note
NONE
```
2017-11-23 08:20:30 -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
jsafrane 4ad4ee3153 Added PVC Protection Controller
This controller removes protection finalizer from PVCs that are being
deleted and are not referenced by any pod.
2017-11-23 11:46:34 +01:00
pospispa a06901a868 Admission Controller PVC Finalizer Plugin
This admission plugin puts finalizer to every created PVC. The finalizer is
removed by PVCProtectionController when the PVC is not referenced by any
pods and thus the PVC can be deleted.
2017-11-23 11:46:28 +01:00
Kubernetes Submit Queue 7f8521819d
Merge pull request #56256 from thockin/fix-broken-NewProxyServer
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>.

kube-proxy: Fix NewProxyServer

Different OSes need different args.  This is not a great fix, but better
than adding an arg to Windows which doesn't need it.

Fixes #56238

```release-note
NONE
```
2017-11-23 00:23:29 -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 60c2090191
Merge pull request #49112 from gmarek/eventAPI
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>.

New API group for Events.

Fix kubernetes/features#383

cc @shyamjvs 

```release-note
Add events.k8s.io api group with v1beta1 API containing redesigned Event type.
```
2017-11-22 21:48:42 -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
Kubernetes Submit Queue 704a0b52b0
Merge pull request #55548 from dhilipkumars/Extend-testapiserver
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>.

Extend apiserver testserver

**What this PR does / why we need it**:
Extend the test pkg of api-server a little bit so that it can be used by others
**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**:
We wanted to use this test pkg while creating a new integration test fixture, the idea of starting the api-server without actually starting a proper etcd (integration etcd ) is very useful, if would be great to extend this for other usecases such as `insecure` mode too.

It will also be useful to get the working `tmpdir` returned so that we could store additional certs (such as service account public and private keys and kubeconf for this apiserver) if needed, which will be cleaned up automatically by the `teardownFn` when the api server is terminating.

**Release note**:

```release-note
NONE
```
ref: https://github.com/kubernetes/kubernetes/pull/50144
2017-11-22 16:52:26 -08:00
Tim Hockin 79778288de Fix NewProxyServer
Different OSes need different args.  This is not a great fix, but better
than adding an arg to Windows which doesn't need it.
2017-11-22 14:17:10 -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 f8ffbd9d61
Merge pull request #55976 from caesarxuchao/move-mutating-to-last
Automatic merge from submit-queue (batch tested with PRs 51321, 55969, 55039, 56183, 55976). 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 mutating to run last in the mutating admission plugin chain

ref: kubernetes/features#492

Follow up on #54892. (see https://github.com/kubernetes/kubernetes/pull/54892#discussion_r151333585)

Only the last commit is relevant.

The reasons are:
* Mutating webhooks are dynamic, they can always adjust according to the behavior of compiled-in admission plugins, but not the other-way around.
* We'll document that if user deploys mutating webhooks that over some built-in mutating plugins decision, user needs also to disable the built-in validating plugins, otherwise the cluster might block.
2017-11-22 12:00:01 -08:00
Marek Grabowski ef6f0b8c6e generated 2017-11-22 18:40:09 +00:00
gmarek 69e2a9cb48 Add new Events API group 2017-11-22 18:40:09 +00: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
Chao Xu 8e8e32fa05 move the MutatingAdmissionWebhook to the last in the mutating amdission
plugin chain.
2017-11-22 08:55:16 -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
Kubernetes Submit Queue b2a233b6d4
Merge pull request #56156 from sbezverk/kubeadm_upgrade_plan_etcd
Automatic merge from submit-queue (batch tested with PRs 55873, 56156). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding etcd version for kubeadm upgrade plan

Adding etcd version display to kubeadm upgrade plan subcommand
```release-note
Adding etcd version display to kubeadm upgrade plan subcommand
```
Closes https://github.com/kubernetes/kubeadm/issues/531
2017-11-22 06:43:26 -08:00
Serguei Bezverkhi a9ea1b881b Adding etcd version for kubeadm upgrade plan 2017-11-22 07:01:13 -05:00
edisonxiang 29d42afe08 fix fmt wording error 2017-11-22 19:58:59 +08:00
Kubernetes Submit Queue 991e33d36a
Merge pull request #55998 from xiangpengzhao/regen-apiserver-crt
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>.

Regenerate API server serving certificates when upgrading.

**What this PR does / why we need it**:
TODO: 
- [x] check the age of crt.
- [x] check the new version number.

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

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

**Release note**:

```release-note
NONE
```
2017-11-22 03:43:05 -08:00
Lucas Käldström f60b43d6b0
Restructure cmd/kubeadm/OWNERS 2017-11-22 12:01:17 +02:00
dhilipkumars fd8758b047 Extend apiserver testserver such that in can be used in integration tests
abstract out etcd server creation
test/integration/framework: cleanup master_utils.go
kube-apiserver: move StartTestServer tests into test/integration/master
Fix the failing scale test
kube-apiserver's TestServer now returns a struct instead of individual values
2017-11-22 15:16:25 +05:30
Kubernetes Submit Queue bd8d8f4387
Merge pull request #56186 from liggitt/master
Automatic merge from submit-queue (batch tested with PRs 55103, 56036, 56186). 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>.

Revert "Kubelet flags take precedence over config from files/ConfigMaps"

This reverts commit cbebb61450.

Per https://github.com/kubernetes/kubernetes/pull/56097#issuecomment-346243014

```release-note
NONE
```
2017-11-22 00:27:32 -08:00
Kubernetes Submit Queue a83869276f
Merge pull request #56036 from m1093782566/flush-ipvs
Automatic merge from submit-queue (batch tested with PRs 55103, 56036, 56186). 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 cleanup-ipvs flag for kube-proxy 

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

There is no way to tell if a given ipvs rule is created by ipvs proxier or not, and some people have complained that iptables/userspace proxier will clean up their ipvs rules when start up - both iptables and userspace proxiers need to clean up legacy proxy rules created by ipvs proxier.

This PR adds a new `--cleanup-ipvs` flag for kube-proxy for the sake of providing users a way to decide if clean up IPVS rules or not when start iptables or userspace proxier.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Add cleanup-ipvs flag for kube-proxy 
```

/sig network
/area ipvs
/king bug
2017-11-22 00:27:30 -08:00
xiangpengzhao 6034ef48a9 Fix deadlock of writing file on node. 2017-11-22 15:53:20 +08:00
xiangpengzhao 7adced12a6 Refactoring writing kubeletconfig. 2017-11-22 15:53:20 +08:00
xiangpengzhao 8565ee89c5 Write marshalled kubeletconfig object to init-config-dir 2017-11-22 15:53:19 +08:00
xiangpengzhao 5322cc5e02 Auto generated BUILD files. 2017-11-22 15:53:07 +08:00
xiangpengzhao e75c6628de Add unit test case for new funcs 2017-11-22 14:41:41 +08:00
xiangpengzhao 7549b4184f Make expired cert check more clear. 2017-11-22 14:41:40 +08:00
xiangpengzhao 2b00d36241 Address review comments. 2017-11-22 14:41:40 +08:00
xiangpengzhao b37d6641a7 Auto generated BUILD files. 2017-11-22 14:41:37 +08:00
edisonxiang 18f0802852 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-22 14:19:12 +08:00
Kubernetes Submit Queue 1bdb61f828
Merge pull request #54529 from vladimirvivien/k8s-csi-intree-plugin
Automatic merge from submit-queue (batch tested with PRs 54529, 53765). 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 CSI - in-tree Plugin Implementation

**What this PR does / why we need it**:
This PR is part of the internal Kubernetes CSI Volume plugin.  It implements the Attach/Detach/Mount/Unmount API.

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

**Special notes for your reviewer**:
- Implements feature https://github.com/kubernetes/features/issues/178
- Designed https://github.com/kubernetes/community/pull/1258

Other CSI Volume plugin PRs
- CSI Persistent Volume Source - https://github.com/kubernetes/kubernetes/pull/55204

**Release note**:
```release-note
NONE
```
2017-11-21 21:38:56 -08:00
Jordan Liggitt ae7dccf2e9
Revert "Kubelet flags take precedence over config from files/ConfigMaps"
This reverts commit cbebb61450.
2017-11-21 23:55:43 -05:00
Kubernetes Submit Queue 947295a760
Merge pull request #56072 from kad/fine-checks
Automatic merge from submit-queue (batch tested with PRs 51494, 56097, 56072, 56175). 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>.

Implement individual control for kubeadm preflight checks

**What this PR does / why we need it**:
With new flag `--ignore-checks-errors` user is able to
decrease severity of each individual check error to warning.

Old flag `--skip-preflight-checks` now acts as `--ignore-checks-errors=all` and will produce warnings.

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

**Special notes for your reviewer**:
/area kubeadm 
/sig cluster-lifecycle

cc @luxas 

**Release note**:
```release-note
New kubeadm flag `--ignore-checks-errors` that enables to decrease severity of each individual error to warning.
Old flag `--skip-preflight-checks` is marked as deprecated and acts as `--ignore-checks-errors=all`
```
2017-11-21 19:49:31 -08:00
Kubernetes Submit Queue d7a96d5e88
Merge pull request #56097 from mtaufen/kc-file-e2e-test
Automatic merge from submit-queue (batch tested with PRs 51494, 56097, 56072, 56175). 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>.

Kubelet flags take precedence over config from files/ConfigMaps

Changes the Kubelet configuration flag precedence order so that flags
take precedence over config from files/ConfigMaps.

See:
https://docs.google.com/document/d/18-MsChpTkrMGCSqAQN9QGgWuuFoK90SznBbwVkfZryo/

Also modifies e2e node test suite to transform all relevant Kubelet flags into
a config file before starting tests when the KubeletConfigFile feature gate is
true, and turns on the KubeletConfigFile gate for all e2e node tests.
This allows the alpha dynamic Kubelet config feature to continue to 
work in tests after the precedence change.

fixes #56171

Related: https://github.com/kubernetes/features/issues/281


```release-note
CLI flags passed to the Kubelet now take precedence over Kubelet config files and dynamic Kubelet config. This helps ensure backwards compatible behavior across Kubelet binary updates.
```
2017-11-21 19:49:27 -08:00
Kubernetes Submit Queue 943d37246a
Merge pull request #56170 from rajansandeep/corefileupdate
Automatic merge from submit-queue (batch tested with PRs 55340, 55329, 56168, 56170, 56105). 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 the configmap manifest in CoreDNS

**What this PR does / why we need it**:
This PR updates the corefile to retain the pod requests support like in kube-dns. This helps when upgrading CoreDNS using kubeadm upgrade (#55952).

**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-21 18:56:37 -08:00
Kubernetes Submit Queue 277d866111
Merge pull request #50984 from timothysc/checkpoint
Automatic merge from submit-queue (batch tested with PRs 55812, 55752, 55447, 55848, 50984). 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>.

Initial basic bootstrap-checkpoint support

**What this PR does / why we need it**:
Adds initial support for Pod checkpointing to allow for controlled recovery of the control plane during self host failure conditions. 

fixes #49236
xref https://github.com/kubernetes/features/issues/378

**Special notes for your reviewer**:

Proposal is here: https://docs.google.com/document/d/1hhrCa_nv0Sg4O_zJYOnelE8a5ClieyewEsQM6c7-5-o/edit?ts=5988fba8#

1. Controlled tests work, but I have not tested the self hosted api-server recovery, that requires validation and logs.  /cc @luxas 
2. In adding hooks for checkpoint manager much of the tests around basicpodmanager appears to be stub'd.  This has become an anti-pattern in the code and should be avoided.  
3. I need a node-e2e to ensure consistency of behavior. 

**Release note**:
```
Add basic bootstrap checkpointing support to the kubelet for control plane recovery
```

/cc @kubernetes/sig-cluster-lifecycle-misc @kubernetes/sig-node-pr-reviews
2017-11-21 17:57:40 -08:00
Vladimir Vivien c90a68c133 CSI - Generated source code
This commit tracks all auto-generated sources.
2017-11-21 20:21:04 -05:00
Vladimir Vivien dd08d1b489 CSI - API source code implementation
This commit tracks source code update for the CSI volume plugin implementation.
2017-11-21 20:20:58 -05:00
Kubernetes Submit Queue 630dbedef9
Merge pull request #56042 from stewart-yu/kubeadm#554
Automatic merge from submit-queue (batch tested with PRs 56128, 56004, 56083, 55833, 56042). 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>.

Automatically opt into dependent feature gates when using kubeadm

**What this PR does / why we need it**:
There will be a dependency chain between  feature gates.  kubeadm needs to automatically opt into dependent feature gates of a chosen one.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-21 17:05:02 -08:00
Kubernetes Submit Queue 4cafc5459b
Merge pull request #56004 from caesarxuchao/admission-v1beta1
Automatic merge from submit-queue (batch tested with PRs 56128, 56004, 56083, 55833, 56042). 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>.

Graduate the admission and admissionregistration (webhook part) API to v1beta1

ref: kubernetes/features#492

Most changes are mechanical. Please take a look at the commit message to see if the commit is worth reviewing.

```release-note
Action required:
The `admission/v1alpha1` API has graduated to `v1beta1`. Please delete your existing webhooks before upgrading the cluster, and update your admission webhooks to use the latest API, because the API has backwards incompatible changes.
The webhook registration related part of the `admissionregistration` API has graduated to `v1beta1`. Please delete your existing configurations before upgrading the cluster, and update your configuration file to use the latest API.
```
2017-11-21 17:04:54 -08:00
Michael Taufen cbebb61450 Kubelet flags take precedence over config from files/ConfigMaps
Changes the Kubelet configuration flag precedence order so that flags
take precedence over config from files/ConfigMaps.

See issue #56171 for more details.

Also modifies e2e node test suite to transform all relevant Kubelet
flags into a config file before starting tests when the
KubeletConfigFile feature gate is true, and turns on the
KubeletConfigFile gate for all e2e node tests. This allows the alpha
dynamic Kubelet config feature to continue to work in tests after
the precedence change.
2017-11-21 16:02:27 -08:00
Chao Xu fcf4f15c89 update-all generated 2017-11-21 13:00:40 -08:00
Chao Xu 3ad49765d6 change storage, registry, discovery version for admissionregistration 2017-11-21 13:00:39 -08:00
Sandeep Rajan 475d30c814 update coredns manifest 2017-11-21 15:30:10 -05:00
Kubernetes Submit Queue 5337ff8009
Merge pull request #55859 from hzxuzhonghu/listener-genericapiserver
Automatic merge from submit-queue (batch tested with PRs 56021, 55843, 55088, 56117, 55859). 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:  pass a listener into genericapiserver bootstrapping 

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

>At the moment we pass a port via the options into the config. A zero port does not work because the loopback clients created during apiserver initialization need to know the port before. Passing a listener into the server instead would allow us to use a zero port beforehand and bootstrapping order should be fine.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-21 12:16:59 -08:00
Kubernetes Submit Queue ec036d9c0e
Merge pull request #56025 from fabriziopandini/kubeadm-bootstrap
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>.

Enhance kubeadm `bootstrap-token`

**What this PR does / why we need it**:
This PR is part of the effort for improving kubeadm phases, and more specifically improves `bootstrap-token` phase by implementing a behaviour consistent with `kubeadm init`, that is:
- `all` subcommand
- `create` subcommand (with CA pinning stuff and --config) 
- `cluster-info` subcommand was modified, removing --config (thus making it consistent with other phases)
- `allow-auto-approve` subcommand was improved, implementing also creation of RBAC rules for certificate rotation (thus making it consistent with `kubeadm init`)
- Reference docs improved

**Which issue(s) this PR fixes** 
part of the effort for [#461](https://github.com/kubernetes/kubeadm/issues/461)
part of the effort for [#454](https://github.com/kubernetes/kubeadm/issues/454)
part of the effort for [#265](https://github.com/kubernetes/kubeadm/issues/265)

**Special notes for your reviewer**:
CC @luxas

**Release note**:
```release-note
NONE
```
2017-11-21 03:38:34 -08:00
Alexander Kanevskiy e42eb28500 Implement individual control for kubeadm preflight checks
With new flag `--ignore-checks-errors` user is able to
decrease severity of each individual check to warning.

Old flag `--skip-preflight-checks` now acts as
`--ignore-checks-errors=all` and will produce warnings.

Fixes: kubernetes/kubeadm#480
2017-11-21 13:35:38 +02:00
zhangjie 226f8b3c73 delete useless params containerized
Signed-off-by: zhangjie <zhangjie0619@yeah.net>
2017-11-21 18:21:59 +08:00
Kubernetes Submit Queue 80e1c7907e
Merge pull request #52322 from davidz627/multizoneWrongZone
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>.

Fixes issue where PVCs using `standard` StorageClass create PDs in disks in wrong zone in multi-zone GKE clusters

Fixes #50115

Changed GetAllZones to only get zones with nodes that are currently running (renamed to GetAllCurrentZones). Added E2E test to confirm this behavior.
2017-11-21 01:35:01 -08:00
fabriziopandini 5a569b9486 kubeadm-bootstrap 2017-11-21 09:52:46 +01:00
m1093782566 f3e744b661 add cleanup-ipvs flag 2017-11-21 15:05:23 +08:00
Kubernetes Submit Queue 1a831cc243
Merge pull request #56029 from wackxu/errmsg
Automatic merge from submit-queue (batch tested with PRs 55112, 56029, 55740, 56095, 55845). 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 upgrade apply  error logging style

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

Improve kubeadm upgrade apply  error logging style

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

**Special notes for your reviewer**:

/assign @luxas 

**Release note**:

```release-note
NONE
```
2017-11-20 21:03:41 -08:00
Timothy St. Clair ed4401c126 Addition of bootstrap checkpointing 2017-11-20 21:54:15 -06:00
stewart-yu 51fe9299f6 complish feature gate dependency in kubeadm 2017-11-21 11:18:59 +08:00
hzxuzhonghu 6ba30f678c pass listener to genericapiserver 2017-11-21 11:00:15 +08:00
David Zhu e5aec8645d Changed GetAllZones to only get zones with nodes that are currently
running (renamed to GetAllCurrentZones). Added E2E test to confirm this
behavior.

Added node informer to cloud-provider controller to keep track of zones
with k8s nodes in them.
2017-11-20 16:04:18 -08:00
Kubernetes Submit Queue db4134d03f
Merge pull request #56069 from xiangpengzhao/change-kubeadm-validation
Automatic merge from submit-queue (batch tested with PRs 55839, 54495, 55884, 55983, 56069). 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 condition "len(cfg.DiscoveryToken) != 0" to ValidateArgSelection.

**What this PR does / why we need it**:
as per https://github.com/kubernetes/kubernetes/pull/54982#discussion_r149968848
>only when the conditions having len(cfg.DiscoveryToken) != 0 means "using token-based discovery" as is mentioned in the error message.

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

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

**Release note**:

```release-note
NONE
```
2017-11-20 13:08:14 -08:00
Kubernetes Submit Queue 563edef707
Merge pull request #55983 from mtaufen/seccomp-is-alpha
Automatic merge from submit-queue (batch tested with PRs 55839, 54495, 55884, 55983, 56069). 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>.

seccomp is an alpha feature and not feature gated

Move SeccompProfileRoot to KubeletFlags and document flag as alpha.

wrt https://github.com/kubernetes/kubernetes/pull/53833#issuecomment-345396575, seccomp is an alpha feature, but this isn't clearly documented anywhere (the annotation just has the word "alpha" in it, and that's your signal that it's alpha). 

Since seccomp was around before feature gates, it doesn't have one.

Thus SeccompProfileRoot should not be part of KubeletConfiguration, and this PR moves it to KubeletFlags, and amends the help text to note the alpha state of the feature.

fixes: #56087

```release-note
NONE
```
2017-11-20 13:08:12 -08:00
Kubernetes Submit Queue 79edffc93d
Merge pull request #54495 from mikedanese/csr2
Automatic merge from submit-queue (batch tested with PRs 55839, 54495, 55884, 55983, 56069). 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>.

certs: start deprecation of signing asset default paths

Per https://github.com/kubernetes/kubernetes/pull/52334#issuecomment-331212749

```release-note
Defaulting of controller-manager options for --cluster-signing-cert-file and --cluster-signing-key-file is deprecated and will be removed in a later release.
```
2017-11-20 13:08:05 -08:00
Kubernetes Submit Queue b3f7ad7407
Merge pull request #55839 from mindprince/extended-resource-toleration
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 ExtendedResourceToleration admission controller.

/kind feature
/sig scheduling
/area hw-accelerators

There's elaborate discussion on this in #55080. In short, we would like to enable cluster operators and/or cloud providers to create dedicated nodes with extended resources (like GPUs, FPGAs etc.) that are reserved for pods requesting such resources. [Taints is the kubernetes concept to create dedicated nodes.](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#example-use-cases) If the cluster operator or cloud provider wants to create dedicated node pools, they are expected to taint the nodes containing extended resources with the key equal to the name of the resource and effect equal to NoSchedule. If they do that, only pods that have a toleration for such a taint can be scheduled there. To make it easy for the user, this admission controller when enabled, automatically adds a toleration with key `example.com/device`, operator `Exists` and effect `NoSchedule` if an extended resource of name `example.com/device` is requested.

**Release note**:
```release-note
Add ExtendedResourceToleration admission controller. This facilitates creation of dedicated nodes with extended resources. If operators want to create dedicated nodes with extended resources (like GPUs, FPGAs etc.), they are expected to taint the node with extended resource name as the key. This admission controller, if enabled, automatically adds tolerations for such taints to pods requesting extended resources, so users don't have to manually add these tolerations. 
```
2017-11-20 12:28:36 -08:00
xiangpengzhao 6609512890 Regenerate API server serving certificates when upgrading. 2017-11-21 00:03:34 +08:00
xiangpengzhao 35138acfdf Add condition "len(cfg.DiscoveryToken) != 0" to ValidateArgSelection. 2017-11-20 23:54:03 +08:00
wackxu 3592c1be18 Improve kubeadm apply error logging style 2017-11-20 20:40:14 +08:00
Dr. Stefan Schimanski e19257f2ec admission/webhook: move webhook initializer into plugin 2017-11-20 09:28:42 +01:00
Kubernetes Submit Queue 3df3c580b7
Merge pull request #54219 from m1093782566/ipset
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>.

Using ipset doing SNAT and packet filter in IPVS kube-proxy

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

Try ipset in ipvs proxy mode.

**Which issue this PR fixes**: 

fixes #54203

xref: #53393, #53775

**Special notes for your reviewer**:

**Release note**:

```release-note
Using ipset doing SNAT and packet filtering in IPVS kube-proxy
```

/sig network

/area kube-proxy
2017-11-19 22:09:13 -08:00
Kubernetes Submit Queue ff0d72a3fa
Merge pull request #56007 from stewart-yu/fixerror
Automatic merge from submit-queue (batch tested with PRs 55939, 56007). 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 bad return error text

**What this PR does / why we need it**:
fix bad return error text

**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-19 10:01:37 -08:00
Kubernetes Submit Queue 26230218b8
Merge pull request #55939 from fabriziopandini/kubeadm-improve-doc1
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 documentation for kubeadm phases

**What this PR does / why we need it**:
This PR is part of the effort for improving kubeadm reference doc (CLI, website, manpages), and more specifically improves documentation for:
- kubeadm alpha phase certs
- kubeadm alpha phase kubeconfig
- kubeadm alpha phase controlplane
- kubeadm alpha phase etcd
- kubeadm alpha phase uploadconfig
- kubeadm alpha phase addons
- kubeadm alpha phase selfhosting

**Which issue(s) this PR fixes**:
part of the effort for [#265](https://github.com/kubernetes/kubeadm/issues/265)

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-11-19 09:49:03 -08:00
Kubernetes Submit Queue e89bbb5ca9
Merge pull request #56014 from xiangpengzhao/join-kubelet-conf
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>.

Re-engineer the kubeadm join logic.

**What this PR does / why we need it**:
- wait for the kubelet to create `/etc/kubernetes/kubelet.conf`
- use those credentials to PATCH the node

**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-19 08:06:33 -08:00
Kubernetes Submit Queue 0291bd35fb
Merge pull request #56015 from luxas/kubeadm_fix_selfhosting_bug
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 a small bug in the self-hosting code

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

`apps/v1beta2` requires that `DaemonSet.spec.selector.matchLabels` equals `DaemonSet.spec.template.metadata.labels`. Without this change, the API server rejects the DaemonSet in the validation stage.

**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 @xiangpengzhao
2017-11-19 06:32:26 -08:00
fabriziopandini 78cfb5d8a2 kubeadm-improve-doc1 2017-11-19 15:31:17 +01:00
xiangpengzhao 045937aaad Auto generated BUILD files. 2017-11-19 22:03:59 +08:00
xiangpengzhao 12409789a1 Re-engineer the kubeadm join logic. 2017-11-19 22:03:50 +08:00
Kubernetes Submit Queue f0ce7ca051
Merge pull request #55010 from sbezverk/kubeadm_etcd_upgrade_apply
Automatic merge from submit-queue (batch tested with PRs 51192, 55010). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding etcd upgrade option to kubeadm upgrade apply 

This PR adds etcd upgrade functionality to kubeadm upgrade apply.
First commit adds certain functions to be able to deal with a single component of control plane and not just with all three components (apiserver, controller-manager and scheduler). It adds granularity as a result code can be reused. 

Closes: https://github.com/kubernetes/kubeadm/issues/490

```release-note
Adds to **kubeadm upgrade apply**, a new **--etcd-upgrade** keyword. When this keyword is specified, etcd's static pod gets upgraded to the etcd version officially recommended for a target kubernetes release.
```
2017-11-19 05:22:26 -08:00
Lucas Käldström 2a047211f4
kubeadm: Fix a small bug in the self-hosting code 2017-11-19 14:45:16 +02:00
Kubernetes Submit Queue 27b3681cec
Merge pull request #56013 from xiangpengzhao/kubeadm-dns-ip
Automatic merge from submit-queue (batch tested with PRs 56008, 56013). 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>.

KubeletConfiguration.BaseConfig.ClusterDNS defaults to the tenth address of MasterConfiguration.Networking.ServiceSubnet

**What this PR does / why we need it**:
If can get DNS IP from MasterConfiguration.Networking.ServiceSubnet, defaults to it. Otherwise defaults to DefaultClusterDNSIP

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

**Release note**:

```release-note
NONE
```
2017-11-19 03:13:19 -08:00
xiangpengzhao 81c72826ef Move GetDNSIP to a "higher level" pkg. 2017-11-19 17:46:29 +08:00
xiangpengzhao 41281b727f Auto generated BUILD files. 2017-11-19 17:39:57 +08:00
xiangpengzhao 0c7663510d KubeletConfiguration.BaseConfig.ClusterDNS defaults to the tenth address of MasterConfiguration.Networking.ServiceSubnet 2017-11-19 17:31:16 +08:00
stewart-yu 471fd43f53 fix bad return error text 2017-11-19 17:04:20 +08:00
xiangpengzhao 4453f2c777 Fix panic when assigning configmap UID of kubelet configuration. 2017-11-19 15:57:11 +08:00
m1093782566 268da85445 fix fakeIPSet ut error 2017-11-19 12:39:43 +08:00
Chao Xu d3c0765780 Rename GenericAdmissionWebhook to ValidatingAdmissionWebhook 2017-11-18 17:30:23 -08:00
Rohit Agarwal 3c4c85f212 Add ExtendedResourceToleration admission controller. 2017-11-18 16:47:51 -08:00
Serguei Bezverkhi 1f20a8d022 Adding etcd upgrade to kubeadm upgrade apply
List of changes:
- Refactoring staticpod and waiter functions
2017-11-18 18:47:50 -05:00
Kubernetes Submit Queue 5653b69bee
Merge pull request #53929 from wackxu/valuse
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>.

Validate usage strings when creating bootstrap tokens via kubeadm

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

fix TODO: Validate usages here so we don't allow something unsupported

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-18 15:31:28 -08:00
Kubernetes Submit Queue f48b00b0d5
Merge pull request #55903 from fabriziopandini/kubeadm-markmaster
Automatic merge from submit-queue (batch tested with PRs 55233, 55927, 55903, 54867, 55940). 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 kubeadm markmaster

**What this PR does / why we need it**:
This PR is part of the effort for improving kubeadm phases, and more specifically improves `mark-master` phase by implementing a behaviour similar to `kubeadm init`, that is:
- dynamically initialise node name if not provided 
- allow to override with `--node-name` flag or with `--config` 

Also reference doc for `mark-master` was improved.

**Which issue(s) this PR fixes** 
part of the effort for [#454](https://github.com/kubernetes/kubeadm/issues/454)
part of the effort for [#265](https://github.com/kubernetes/kubeadm/issues/265)

**Special notes for your reviewer**:
Alpha disclaimer aligned to change requested on the website.

**Release note**:
```release-note
NONE
```
2017-11-18 12:26:12 -08:00
Kubernetes Submit Queue ef3b27cbd4
Merge pull request #55642 from dashpole/disable_cadvisor_disk_for_cri
Automatic merge from submit-queue (batch tested with PRs 55642, 55897, 55835, 55496, 55313). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Disable container disk metrics when using the CRI stats integration

Issue: https://github.com/kubernetes/kubernetes/issues/51798

As explained in the issue, runtimes which make use of the CRI Stats API still have the performance overhead of collecting those same stats through cAdvisor.
The CRI Stats API has metrics for CPU, Memory, and Disk.  This PR significantly reduces the added overhead due to collecting these stats in both cAdvisor and in the runtime.
This PR disables container disk metrics, which are very expensive to collect.

This PR does not disable node-level disk stats, as the "Raw" container handler does not currently respect ignoring DiskUsageMetrics.
This PR factors out the logic for determining whether or not to use the CRI stats provider into a helper function, as cAdvisor is instantiated before it is passed to the kubelet as a dependency.

cc @kubernetes/sig-node-pr-reviews @derekwaynecarr  
/kind feature
/sig node

/assign @Random-Liu @derekwaynecarr
2017-11-18 10:46:30 -08:00
Kubernetes Submit Queue 8417821252
Merge pull request #55803 from xiangpengzhao/kubeadm-dynamic-kubelet-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>.

Add kubeadm support for Kubelet Dynamic Configuration

**What this PR does / why we need it**:
This PR will make kubeadm support for Kubelet Dynamic Configuration. This is still WIP (and the code seems ugly). Creating the PR for now to let reviewers see if I understand the feature correctly and am on the right path and what else I'm missing.

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

**Special notes for your reviewer**:
This feature is targeting for 1.9 as alpha.
/cc @luxas @mtaufen @mikedanese 

**Release note**:

```release-note
Kubeadm now supports for Kubelet Dynamic Configuration.
```
2017-11-18 03:22:46 -08:00
Chao Xu ea123f82aa Adding the mutating webhook 2017-11-17 21:02:47 -08:00
xiangpengzhao 122e0e231d Add test case for phase kubelet. 2017-11-18 10:22:16 +08:00
xiangpengzhao a4a537d2d1 Retry when update node with configmap fails. 2017-11-18 10:22:16 +08:00
xiangpengzhao 54d6db1191 Make updateNodeWithConfigMap public 2017-11-18 10:22:16 +08:00
xiangpengzhao 6914a8b937 Add phase kubelet 2017-11-18 10:22:15 +08:00
xiangpengzhao c365e179e6 KubeletConfiguration should be a member of MasterConfiguration 2017-11-18 10:22:09 +08:00
Michael Taufen ca8cffef24 seccomp is an alpha feature and not feature gated
Move SeccompProfileRoot to KubeletFlags and document flag as alpha
2017-11-17 17:57:53 -08:00
Michael Taufen 6e49ac382b ColonSeparatedMultimapStringString: allow multiple Set invocations with default override
The first call to Set will clear the map before adding entries;
subsequent calls will simply append to the map.
This makes it possible to override default values with a command-line
option rather than appending to defaults,
while still allowing the distribution of key-value pairs across
multiple flag invocations.

For example: `--flag "a:hello" --flag "b:again" --flag "b:beautiful"
--flag "c:world"` results in `{"a": ["hello"], "b": ["again",
"beautiful"], "c": ["world"]}`
2017-11-17 09:07:47 -08:00
xiangpengzhao 880648f3f1 Set defaults for KubeletConfiguration 2017-11-18 00:55:59 +08:00
xiangpengzhao 54fb5736ed Run TryStartKubelet conditionally; replace hard-code with constants. 2017-11-17 16:57:29 +08:00
xiangpengzhao e8c58338a0 Auto generated files. 2017-11-17 16:57:23 +08:00
xiangpengzhao cafb2f731f Kubeadm supports for Kubelet Dynamic Configuration. 2017-11-17 11:19:12 +08:00
Michael Taufen 617b49858f omitempty 2017-11-16 18:35:13 -08:00
Michael Taufen 1085b6f730 Lift embedded structure out of eviction-related KubeletConfiguration fields
- Changes the following KubeletConfiguration fields from `string` to
`map[string]string`:
  - `EvictionHard`
  - `EvictionSoft`
  - `EvictionSoftGracePeriod`
  - `EvictionMinimumReclaim`
- Adds flag parsing shims to maintain Kubelet's public flags API, while
enabling structured input in the file API.
- Also removes `kubeletconfig.ConfigurationMap`, which was an ad-hoc flag
parsing shim living in the kubeletconfig API group, and replaces it
with the `MapStringString` shim introduced in this PR. Flag parsing
shims belong in a common place, not in the kubeletconfig API.
I manually audited these to ensure that this wouldn't cause errors
parsing the command line for syntax that would have previously been
error free (`kubeletconfig.ConfigurationMap` was unique in that it
allowed keys to be provided on the CLI without values. I believe this was
done in `flags.ConfigurationMap` to facilitate the `--node-labels` flag,
which rightfully accepts value-free keys, and that this shim was then
just copied to `kubeletconfig`). Fortunately, the affected fields
(`ExperimentalQOSReserved`, `SystemReserved`, and `KubeReserved`) expect
non-empty strings in the values of the map, and as a result passing the
empty string is already an error. Thus requiring keys shouldn't break
anyone's scripts.
- Updates code and tests accordingly.

Regarding eviction operators, directionality is already implicit in the
signal type (for a given signal, the decision to evict will be made when
crossing the threshold from either above or below, never both). There is
no need to expose an operator, such as `<`, in the API. By changing
`EvictionHard` and `EvictionSoft` to `map[string]string`, this PR
simplifies the experience of working with these fields via the
`KubeletConfiguration` type. Again, flags stay the same.

Other things:
- There is another flag parsing shim, `flags.ConfigurationMap`, from the
shared flag utility. The `NodeLabels` field still uses
`flags.ConfigurationMap`. This PR moves the allocation of the
`map[string]string` for the `NodeLabels` field from
`AddKubeletConfigFlags` to the defaulter for the external
`KubeletConfiguration` type. Flags are layered on top of an internal
object that has undergone conversion from a defaulted external object,
which means that previously the mere registration of flags would have
overwritten any previously-defined defaults for `NodeLabels` (fortunately
there were none).
2017-11-16 18:35:13 -08:00
fabriziopandini d12a92ccd1 kubeadm-markmaster 2017-11-16 23:10:33 +01:00
Mike Danese 2006fe524b certs: start deprecation of signing asset default paths 2017-11-16 14:09:29 -08:00
Kai Chen 507b03f2ab Fix a typo in kubeadm/GetEtcdPodSpec 2017-11-16 11:15:48 -08:00
Kubernetes Submit Queue 0eb999c26a
Merge pull request #55562 from mtaufen/eject-non-gated-alpha-fields
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 'alpha' KubeletConfiguration fields that aren't feature-gated and self-registration fields to KubeletFlags

Some of these fields are marked "alpha" in help text. They cannot be in the KubeletConfiguration object unless they are feature gated or graduated from alpha. 

Others relate to Kubelet self-registration, and given https://github.com/kubernetes/community/pull/911 I think its prudent to wait and see if these really should be in the KubeletConfiguration type.

For now we just leave them all as flags.

```release-note
NONE
```
2017-11-16 10:36:10 -08:00
Kubernetes Submit Queue 6a3d3a42db
Merge pull request #55581 from yuexiao-wang/remove-redundant
Automatic merge from submit-queue (batch tested with PRs 54647, 55581). 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 redundant code in ValidateDiscovery

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>



**What this PR does / why we need it**:
Remove redundant code in ValidateDiscovery.
It deplicated check for DiscoveryToken and DiscoveryFile as follows:


func ValidateDiscovery(c *kubeadm.NodeConfiguration, fldPath *field.Path) field.ErrorList {
	allErrs := field.ErrorList{}

	if len(c.DiscoveryToken) != 0 {
		allErrs = append(allErrs, ValidateToken(c.DiscoveryToken, fldPath)...)
	}
	if len(c.DiscoveryFile) != 0 {
		allErrs = append(allErrs, ValidateDiscoveryFile(c.DiscoveryFile, fldPath)...)
	}
	allErrs = append(allErrs, ValidateArgSelection(c, fldPath)...)
	allErrs = append(allErrs, ValidateToken(c.TLSBootstrapToken, fldPath)...)
	allErrs = append(allErrs, ValidateJoinDiscoveryTokenAPIServer(c, fldPath)...)

	if len(c.DiscoveryToken) != 0 {
		allErrs = append(allErrs, ValidateToken(c.DiscoveryToken, fldPath)...)
	}
	if len(c.DiscoveryFile) != 0 {
		allErrs = append(allErrs, ValidateDiscoveryFile(c.DiscoveryFile, fldPath)...)
	}
	return allErrs
}

**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-11-16 07:22:16 -08:00
Kubernetes Submit Queue 6ac3136bd4
Merge pull request #55849 from cimomo/small-fixes
Automatic merge from submit-queue (batch tested with PRs 55868, 55393, 55152, 55849). 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 CloudControllerManager

**What this PR does / why we need it**:
Fix a typo in CloudControllerManager
**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-16 06:32:24 -08:00
Kubernetes Submit Queue c5e543308b
Merge pull request #55152 from fabriziopandini/kubeadm-doc-preflight
Automatic merge from submit-queue (batch tested with PRs 55868, 55393, 55152, 55849). 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 documentation for kubeadm preflight command

**What this PR does / why we need it**:
This PR is part of the effort for improving kubeadm reference doc (CLI, website, manpages), and more specifically improves documentation for `kubeadm alpha phase preflight`

**Which issue(s) this PR fixes**:
part of the effort for [#265](https://github.com/kubernetes/kubeadm/issues/265)

**Special notes for your reviewer**:
The PR has two commits:
- `Clone documentation utility from //pkg/kubectl/cmd/templates`, that re-implements in kubeadm some kubectl utilities for handling description and examples for cobra.commands; more PR will follow re-using those utilities. NB. I was forced to add an exception to golint because `blackfriday.Renderer` requires to implement an interface that is not compliant
- `kubeadm-doc-preflight` that implements improvement to `kubeadm alpha phase preflight`

**Release note**:
```release-note
NONE
```
2017-11-16 06:32:21 -08:00
Kubernetes Submit Queue 4060d23f3b
Merge pull request #51990 from madhukar32/get_dns_ip
Automatic merge from submit-queue (batch tested with PRs 55798, 49579, 54862, 55188, 51990). 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: Create dnsIP by selecting the tenth IP from k8s svc CIDR

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

Creates dnsIP by selecting the ninth IP from k8s svc cluster IP, instead of appending 0 to the k8s svcIP string. 

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

**Special notes for your reviewer**:
This is helpful when we have service cluster range CIDR as 10.87.116.64/26 (for example), previously this would have failed while parsing the dnsIP, as we used to append a 0 to the k8s svc clusterIP string. This will get the same dnsIP 10.96.0.10 for very widely used service cluster range CIDR 10.96.0.0/12


**Release note**:
```release-note
None
```
2017-11-16 03:09:25 -08:00
Kubernetes Submit Queue 25af6300bc
Merge pull request #54862 from lioncruise/patch-4
Automatic merge from submit-queue (batch tested with PRs 55798, 49579, 54862, 55188, 51990). 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 grammatical problem in a comment

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

```
2017-11-16 03:09:16 -08:00
fabriziopandini 01b928cd6c kubeadm-doc-preflight 2017-11-16 10:20:22 +01:00
Kubernetes Submit Queue a2efcf8366
Merge pull request #55717 from runcom/fix-kubead-reset
Automatic merge from submit-queue (batch tested with PRs 55682, 55444, 55456, 55717, 55131). 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 crictl command for reset

Signed-off-by: Antonio Murdaca <runcom@redhat.com>



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

This PR is fixing kubeadm reset, we used the wrong command pipeline now that crictl has a new version out. This version targets kube master (1.9-dev) so this is the right fix.

**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
Fix kubeadm reset crictl command
```

@luxas PTAL
2017-11-15 23:06:18 -08:00
Kai Chen 81bf0265c9 Fix typo in CloudControllerManager 2017-11-15 22:17:55 -08:00
Kubernetes Submit Queue d6325933e1
Merge pull request #55546 from fabriziopandini/kubeadm-doc-gen
Automatic merge from submit-queue (batch tested with PRs 55764, 55683, 55468, 54409, 55546). 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>.

streamline kubeadm-doc-gen

**What this PR does / why we need it**:
this PR completes the work of #54616 by automating post processing for kubeadm automatically generate documentation.
Post processing is necessary to adapt generated documents on website conventions, and before this PR, was executed manually.

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
cc @kubernetes/sig-docs-maintainers @Bradamant3 @heckj @luxas
2017-11-15 22:16:10 -08:00
Kubernetes Submit Queue e99544d018
Merge pull request #54409 from intelsdi-x/cpu-enable-state-file
Automatic merge from submit-queue (batch tested with PRs 55764, 55683, 55468, 54409, 55546). 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>.

Enable file back state in static policy

**What this PR does / why we need it**:
Enables file back `State` in `static policy` and cpu manager + tests.
Upon policy start, state read from file is validated whether it meets the policy assumption. In case of any error, state is cleared.

Previous PR: #54408
Next PR: #54409
2017-11-15 22:16:05 -08:00
Kubernetes Submit Queue 4962d299ac
Merge pull request #55468 from yuexiao-wang/change-warning
Automatic merge from submit-queue (batch tested with PRs 55764, 55683, 55468, 54409, 55546). 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: Error out if CA pinning isn't used or opted out of

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>



**What this PR does / why we need it**:
convert the warning to an 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 https://github.com/kubernetes/kubeadm/issues/534

**Special notes for your reviewer**:
/cc @mattmoyer

**Release note**:

```release-note
[action required] kubeadm join: Error out if CA pinning isn't used or opted out of
* kubeadm now requires the user to specify either the `--discovery-token-ca-cert-hash` flag or the `--discovery-token-unsafe-skip-ca-verification` flag.
```
2017-11-15 22:15:59 -08:00
Michael Taufen 523c68ff65 Move ungated 'alpha' KubeletConfiguration fields and self-registration fields to KubeletFlags 2017-11-15 17:47:10 -08:00
Kubernetes Submit Queue 9058769dad
Merge pull request #51955 from danwinship/update-networkpolicy-storage
Automatic merge from submit-queue (batch tested with PRs 55648, 55274, 54982, 51955, 55639). 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>.

Swap NetworkPolicy storage to networking.k8s.io/v1

Finishes(?) the NetworkPolicy v1 migration.
Fixes #50604

The integration test passes. I copied the test-update-storage-objects.sh change from #50327 and have no idea if it's right.

/cc @sttts @caesarxuchao @thockin

**Release note**:
```release-note
```
2017-11-15 12:03:40 -08:00
Kubernetes Submit Queue dab5dc6585
Merge pull request #54982 from xiangpengzhao/cleanup-kubeadm
Automatic merge from submit-queue (batch tested with PRs 55648, 55274, 54982, 51955, 55639). 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:Clean up no longer used k8sVersion param

**What this PR does / why we need it**:
 cleanup for 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)*:


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

**Release note**:

```release-note
NONE
```
~~`kubeadm join` now requires the `--discovery-token-ca-cert-hash` argument to be set, or the `--discovery-token-unsafe-skip-ca-verification` flag to be set for opting out of the CA pinning feature.~~
2017-11-15 12:03:36 -08:00
Kubernetes Submit Queue cdf4d8be81
Merge pull request #55320 from andrewrynhard/flexvol
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: Conditionally mount flexvolume

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

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

```release-note
kubeadm: Fix a bug on some OSes where the kubelet tried to mount a volume path that is non-existent and on a read-only filesystem 
```

/cc @luxas
2017-11-15 11:03:02 -08:00
Kubernetes Submit Queue c339a54b53
Merge pull request #55659 from CaoShuFeng/duplicated_import
Automatic merge from submit-queue (batch tested with PRs 53780, 55663, 55321, 52421, 55659). 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
```
2017-11-15 09:30:40 -08:00
xiangpengzhao b8e7315b5e Clean up no longer used k8sVersion param 2017-11-15 23:24:17 +08:00
madhukar32 359d81419c kubeadm: change in logic of getDNSIP 2017-11-15 23:11:28 +13:00
m1093782566 fbf8a13376 use ipset doing snat and packet filter in ipvs proxy 2017-11-15 18:02:58 +08:00
Kubernetes Submit Queue b2625857ad
Merge pull request #54197 from colemickens/hyperkube-add-cloud-controller-manager
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>.

hyperkube: add cloud-controller-manager

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

Adds `cloud-controller-manager` to `hyperkube`. (fix #55732)

This is useful as a number of deployment tools run all of the kubernetes components from the `hyperkube` image/binary. It also makes testing easier as a single binary/image can be built and pushed quickly.

This PR follows the same pattern of the other kubernetes binaries being available as part of `hyperkube`.

(This PR also makes an error condition appropriately fatal.)

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

**Special notes for your reviewer**: n/a

**Release note**:

```release-note
hyperkube: add cloud-controller-manager
```

/sig cluster-lifecycle
/area cloudprovider
2017-11-15 00:48:32 -08:00
Kubernetes Submit Queue ebe8ea73fd
Merge pull request #54463 from saad-ali/volumeAttachmentAPI
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>.

Introduce new `VolumeAttachment` API Object

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

Introduce a new `VolumeAttachment` API Object. This object will be used by the CSI volume plugin to enable external attachers (see design [here](https://github.com/kubernetes/community/pull/1258). In the future, existing volume plugins can be refactored to use this object as well.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:  Part of issue https://github.com/kubernetes/features/issues/178

**Special notes for your reviewer**:
None

**Release note**:

```release-note
NONE
```
2017-11-14 22:05:27 -08:00
Saad Ali 9f294c1ad0 Generated files for new VolumeAttachemnt object 2017-11-14 17:08:49 -08:00
Saad Ali d96c105d71 Introduce storage v1alpha1 and VolumeAttachment
Introduce the v1alpha1 version to the Kubernetes storage API. And add a
new VolumeAttachment object to that version. This object will initially
be used only by the new CSI Volume Plugin. Eventually existing volume
plugins can be refactored to use it too.
2017-11-14 17:08:48 -08:00
Chao Xu 1adfacc7eb Reorganize the admission webhook code.
Moved client and kubeconfig related code to webhook/config;
Moved the rule matcher to webhook/rules;
Left TODOs saying we are going to move some other common utilities;
Other code is moved to webhook/validation.
2017-11-14 15:59:53 -08:00
Andrew Rynhard 32f16d2cc2
Don't test flexvolume-dir creation 2017-11-14 14:35:04 -08:00
Dan Winship d2a3af9b58 Swap NetworkPolicy storage to networking.k8s.io/v1 2017-11-14 15:15:01 -05:00
David Ashpole 220edbc6e3 disable container disk metrics when using the CRI stats integration 2017-11-14 11:43:08 -08:00
Antonio Murdaca 3ca4a61465
kubeadm: fix crictl command for reset
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-11-14 18:42:52 +01:00
Szymon Scharmach 7e7301ffaf Enable file state in static policy 2017-11-14 18:25:58 +01:00
yuexiao-wang 4387d57ab6 convert this warning to an error in kubeadm
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-11-14 20:33:45 +08:00
Kubernetes Submit Queue 2785ba8ee6
Merge pull request #54602 from huzhengchuan/fix/typeos_kubelet
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 parameter tip

**What this PR does / why we need it**:
run kubelet set --init-config-dir=xxx, kubelet not work. see the error log need to open KubeletConfigFile feature gates.
But 
kubelet --help 
      --init-config-dir string                                   The Kubelet will look in this directory for the init configuration. The path may be absolute or relative; relative paths start at the Kubelet's current working directory. Omit this argument to use the built-in default configuration values. Presently, you must also enable the `DynamicKubeletConfig` feature gate to pass this flag.

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

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-11-14 02:53:18 -08:00
Cao Shufeng 86968e44d0 remove duplicated import 2017-11-14 17:18:17 +08:00
Kubernetes Submit Queue 2fc108b8b2
Merge pull request #53850 from dougm/api-fixed-int
Automatic merge from submit-queue (batch tested with PRs 54005, 55127, 53850, 55486, 53440). 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>.

Enforce use of fixed size int types in the API

Changes 'int' to 'int32', enforced by import_known_versions_test

Follow up to PR #53402



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

This PR changes a few fields within the API from 'int' to 'int32' and is now enforced by import_known_versions_test.  We need this so integer fields are the same size regardless of $GOARCH.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-11-13 16:45:26 -08:00
Kubernetes Submit Queue f575c55589
Merge pull request #54005 from deads2k/rbac-02-aggregation
Automatic merge from submit-queue (batch tested with PRs 54005, 55127, 53850, 55486, 53440). 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>.

aggregate cluster roles

xref https://github.com/kubernetes/community/pull/1219 https://github.com/kubernetes/features/issues/502

This is a pull with API types, a controller, and a demonstration of how to move admin, edit, and view.  Once we agree on the shape, I'll 


I added 
```yaml
aggregationRule:
  clusterRoleSelectors:
  - matchLabels:
      rbac.authorization.k8s.io/aggregate-to-admin: true
```
to the `ClusterRole`.  A controller then goes and gathers all the matching ClusterRoles and sets the `rules` to the union of matching cluster roles.

@kubernetes/sig-auth-pr-reviews 

```release-note
RBAC ClusterRoles can now select other roles to aggregate
```
2017-11-13 16:45:20 -08:00
Doug MacEachern 7950609b31 Enforce use of fixed size int types in the API
Changes 'int' to 'int32', enforced by import_known_versions_test

Follow up to PR #53402
2017-11-13 11:28:59 -08:00
fabriziopandini 1904c64088 kubeadm-doc-gen 2017-11-13 15:32:58 +01:00
Kubernetes Submit Queue 81fa823a6c
Merge pull request #54133 from shun-miyoshi-com/add_output_option
Automatic merge from submit-queue (batch tested with PRs 55594, 47849, 54692, 55478, 54133). 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 kubeadm alpha phase kubeconfig option(--output)

**What this PR does / why we need it**:
This PR will add --output option to `kubeadm alpha phase kubeconfig [command]`
This option can change output directory of kubeconfig.

Prev: kubeadm alpha phase kubeconfig admin
  we can get admin.conf in /etc/kubernetes/ .

This PR: kubeadm alpha phase kubeconfig admin --output /root
  we can get admin.conf in /root/ .

Of course, --output is optional.(default directory is /etc/kubernetes)

Note)
  I have no confidence about my test code.

Thank you.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-11-13 06:09:30 -08:00
David Eads e52383c486 add clusterrole aggregation controller 2017-11-13 08:18:00 -05:00
David Eads a53e5de3db generated 2017-11-13 08:18:00 -05:00
Kubernetes Submit Queue 41fe3ed5bc
Merge pull request #54405 from resouer/clean-docker-dep
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>.

[Part 1] Remove docker dep in kubelet startup

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

Remove dependency of docker during kubelet start up.

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

Part 1 of #54090 

**Special notes for your reviewer**:
Changes include:

1. Move docker client initialization into dockershim pkg.
2. Pass a docker `ClientConfig` from kubelet to dockershim
3. Pass parameters needed by `FakeDockerClient` thru `ClientConfig` to dockershim

(TODO, the second part) Make dockershim tolerate when dockerd is down, otherwise it will still fail kubelet

Please note after this PR, kubelet will still fail if dockerd is down, this will be fixed in the subsequent PR by making dockershim tolerate dockerd failure (initializing docker client in a separate goroutine), and refactoring cgroup and log driver detection. 

**Release note**:

```release-note
Remove docker dependency during kubelet start up 
```
2017-11-13 03:59:53 -08:00
yuexiao-wang 1d4793562e remove redundant code in ValidateDiscovery
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-11-13 14:53:19 +08:00
shun-miyoshi-com 8832763135 add kubeadm alpha phase kubeconfig option(--output)
rename in order to more descriptive

fix kubeconfig_test name
2017-11-13 03:42:57 +00:00
wackxu f65fbde607 add apiServerCertSANs case for test GetAltNames 2017-11-13 11:02:04 +08:00
wackxu 0e1a74731d Validate usage strings when creating bootstrap tokens via kubeadm 2017-11-13 09:37:20 +08:00
Serguei Bezverkhi 39830f3642 Refactoring staticpod and waiter functions 2017-11-12 19:36:56 -05:00
Josh Horwitz a1fddf48c5 Add concurrent service sync flag to CCM 2017-11-12 14:29:47 -05:00
Kubernetes Submit Queue 8c005dddb8
Merge pull request #55438 from fabriziopandini/kubeadm-ha-endpoint-reconciler
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 enable endpoint-reconciler for HA clusters

**What this PR does / why we need it**:
enable endpoint-reconciler on kube-apiserver when creating HA clusters with kubeadm

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

**Special notes for your reviewer**:
CC @luxas 

**Release note**:
```release-note
NONE
```
2017-11-12 09:49:37 -08:00
fabriziopandini 7b7c4d8914 kubeadm enable endpoint-reconciler for ha 2017-11-12 08:30:00 +01:00
Kubernetes Submit Queue d3edf7cfb9
Merge pull request #53337 from jmhardison/kubeadm-config-message-typo
Automatic merge from submit-queue (batch tested with PRs 53337, 55465, 55512, 55522, 54554). 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>.

Wording in missing config from cluster response typo.

**What this PR does / why we need it**:
Resolves a typo in the response message for Kubeadm Upgrade Plan that results in the wording:
"Without this information, 'kubeadm upgrade' don't how to configure your upgraded cluster."

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

**Special notes for your reviewer**:
none

**Release note**:

```release-note
Correct wording of kubeadm upgrade response for missing ConfigMap.
```
2017-11-11 12:44:19 -08:00
Kubernetes Submit Queue f14c0382e4
Merge pull request #54460 from yanxuean/cnibindir
Automatic merge from submit-queue (batch tested with PRs 54460, 55258, 54858, 55506, 55510). 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>.

redendancy code and error log message in cni

**What this PR does / why we need it**:
redendancy code and error log message in cni
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

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

/sig-node
2017-11-11 10:45:16 -08:00
Cole Mickens 49cd7fc7c2 respond to wlan0's feedback 2017-11-10 14:29:00 -08:00
Cole Mickens 598d1f4e43 respond to luxas's feedback 2017-11-10 14:28:59 -08:00
Cole Mickens f1c12f8b13 hyperkube: add alpha subcommand 2017-11-10 14:28:59 -08:00
Cole Mickens 1675f025ea ccm: make missing --cloud-provider fatal 2017-11-10 14:28:58 -08:00
Cole Mickens 91dc0ca339 hyperkube: add cloud-controller-manager 2017-11-10 14:28:58 -08:00
Cole Mickens 976cf098dd ccm: move all argument handling to server 2017-11-10 14:28:58 -08:00
Dr. Stefan Schimanski 1e79dfb959 Update generated code 2017-11-10 18:26:46 +01:00
Dr. Stefan Schimanski ec44425964 kubeadm: fix deepcopy generation due to missing opt-in tag 2017-11-10 18:25:26 +01:00
Dr. Stefan Schimanski 72809a08b9 deepcopy: remove deepcopy register tags 2017-11-10 18:25:26 +01:00
Kubernetes Submit Queue d12d711ba6
Merge pull request #54849 from hzxuzhonghu/audit-graceful-shutdown
Automatic merge from submit-queue (batch tested with PRs 46581, 55426, 54849). 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 shutdown gracefully

**What this PR does / why we need it**:
apiserver shutdown gracefully and wait all non-long running requests finish before process exit.

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

**Special notes for your reviewer**:
remove waitGroup, use atomic to count. 
**Release note**:

```release-note
NONE
```
2017-11-10 03:30:21 -08:00
Kubernetes Submit Queue 96dbf02406
Merge pull request #53733 from neolit123/kubeadm-01
Automatic merge from submit-queue (batch tested with PRs 55265, 54092, 55353, 53733, 55385). 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>.

kubadm/cmd: wording and punctuation fixes

**What this PR does / why we need it**:
This is a follow-up PR from me fixing more wording & punctuation in the `kubeadm/app/cmd` namespace. I think it makes the output shown to the user clearer and better formatted.

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

**Special notes for your reviewer**:
Please let me know if you want anything amended. Certain things might be a subject to an argument, so if the maintainers want them kept the way they are ATM, i would comply.

**Release note**:

```release-note
NONE
```

Lubomir (VMware)
2017-11-10 01:30:27 -08:00
hzxuzhonghu db4f0de280 gracefully shutdown apiserver after all non-long running requests finish 2017-11-10 14:06:52 +08:00
Lubomir I. Ivanov 9fd841670d kubadm/cmd: wording and punctuation fixes
This patch contains wording, punctuation and capitalization fixes
for stdout messages in most kubeadm 'cmd' files.

Also includes changes in '/phases' and '/upgrade' for
consistency.

Signed-off-by: Lubomir I. Ivanov <lubomirivanov@vmware.com>
2017-11-09 22:00:39 +02:00
mbohlool 9ddea83a2c Rename ExternalAdmissionHookConfiguration to ValidatingWebhookConfiguration 2017-11-09 11:39:50 -08:00
Kubernetes Submit Queue d215d4bf8c
Merge pull request #55055 from runcom/check-with-crictl
Automatic merge from submit-queue (batch tested with PRs 55380, 55399, 55377, 55055). 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 CRI for preflights checks

Signed-off-by: Antonio Murdaca <runcom@redhat.com>



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

Add preflights checks to be performed using `crictl` and the kubernetes CRI instead of relying on docker.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
kubeadm: use the CRI for preflights checks
```

@luxas PTAL
2017-11-09 07:38:45 -08:00
Kubernetes Submit Queue 53d66995a2
Merge pull request #55377 from xiangpengzhao/validate-usages
Automatic merge from submit-queue (batch tested with PRs 55380, 55399, 55377, 55055). 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 const instead of hard-code for kubeadm usages

**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**:
/cc @luxas 

**Release note**:

```release-note
NONE
```
2017-11-09 07:38:42 -08:00
Kubernetes Submit Queue e8c659c8fb
Merge pull request #55399 from kad/swap-error
Automatic merge from submit-queue (batch tested with PRs 55380, 55399, 55377, 55055). 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 swap check as an error

**What this PR does / why we need it**:
Based on amount of support issues where warning about enabled
swap not noticed or ignored, it will be better to make this
check as 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)*:

**Special notes for your reviewer**:
cc @luxas 
attention @jpbetz : this change planned to be also cherrypicked to 1.8 branch.
/area kubeadm
/sig cluster-lifecycle 

**Release note**:
```release-note
kubeadm now produces error during preflight checks if swap is enabled. Users, who can setup kubelet to run in unsupported environment with enabled swap, will be able to skip that preflight check.
```
2017-11-09 07:38:39 -08:00