Commit Graph

5376 Commits (79778288de676b5d2fde1f11ca92d57a3bf638f0)

Author SHA1 Message Date
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 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
Kubernetes Submit Queue aedba56cad
Merge pull request #55380 from xiangpengzhao/kubeadm-util
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 volumeutil.LoadPodFromFile for pod spec

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

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

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

**Release note**:

```release-note
NONE
```
2017-11-09 07:13:49 -08:00
Kubernetes Submit Queue dd9981d038
Merge pull request #53651 from sttts/sttts-apis-core
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 core API to pkg/apis/core

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

This moves the types in pkg/api and most of pkg/api/v1 to pkg/apis/core to match the other api groups, following-up on what https://github.com/kubernetes/kubernetes/pull/44784 did for the external types.

It's a nearly 100% mechanical package move with a number of trivial fixups in code-generators and in tests which do string comparisons of types via reflection.

**Most importantly:**

- group names are unchanged
- apimachinery semantics are unchanged
- the outside api is unchanged.

Note that some packages for helpers are left in pkg/api/v1. Splitting them into helpers which belong tightly to the api and those which are not is left to follow-ups.

@kubernetes/sig-api-machinery-pr-reviews
2017-11-09 06:13:39 -08:00
Kubernetes Submit Queue 7a0979c55e
Merge pull request #52547 from xiangpengzhao/remove-kubelet-flag
Automatic merge from submit-queue (batch tested with PRs 54868, 52547). 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 deprecated stale flags of kube-apiserver

**What this PR does / why we need it**:
These flags have been marked as deprecated for more than two years. This PR removes them.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
action required: Deprecated flags `--portal-net` and `service-node-ports` of kube-apiserver are removed.
```
2017-11-09 04:30:00 -08:00
Alexander Kanevskiy 2a1496c2ea Make swap check as an error
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.
2017-11-09 14:25:36 +02:00
Kubernetes Submit Queue 065e45087b
Merge pull request #54868 from kad/kubeadm-issue-496
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: Extended KubeletVersionCheck

**What this PR does / why we need it**:
KubeletVersionCheck now able to detect if kubelet version
is higher than control plane. As this might lead to malfunctional
cluster setups, kubeadm will give warning.

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

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

**Release note**:
```release-note
- kubeadm will produce error if kubelet too new for control plane
```
2017-11-09 04:12:49 -08:00
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
xiangpengzhao 0faa96e7ff Use volumeutil.LoadPodFromFile for pod spec 2017-11-09 18:57:24 +08:00
Antonio Murdaca 46683b76fd
kubeadm: use the CRI for preflights checks
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-11-09 11:42:43 +01:00
Kubernetes Submit Queue 11fc906c2b
Merge pull request #54052 from m1093782566/netlink
Automatic merge from submit-queue (batch tested with PRs 55247, 55324, 55261, 55147, 54052). 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 dummy device operation by netlink for ipvs proxier

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

Currently, we implement network interface operations, e.g. create a dummy device and delete a dummy interface via ip cmd and then collect the exist code. For example, we assume the following command:
```
ip link add kube-ipvs0 type dummy 
```
returns 2 means the dummy device `kube-ipvs0` exists, see https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/ipvs/proxier.go#L1529 .

However, from the man page of ip command, exit status 2 just means an error was reported by the kernel, see http://man7.org/linux/man-pages/man8/ip.8.html#EXIT_STATUS.

So, that's a bug.

This PR implements dummy device operation by netlink for ipvs proxier so that can get ride of ip command operations.

**Which issue this PR fixes**: 

fixes #54054

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig network
/area kube-proxy
/kind bug
2017-11-09 00:59:32 -08:00
Kubernetes Submit Queue d28fccfabe
Merge pull request #55261 from ncdc/kube-proxy-config-fix-conntrack-zero-values
Automatic merge from submit-queue (batch tested with PRs 55247, 55324, 55261, 55147, 54052). 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>.

Restore kube-proxy's support for 0 values for conntrack settings

**What this PR does / why we need it**: re-allow 0 values for kube-proxy conntrack min, max, max per core, tcp close wait timeout, tcp established timeout.

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

**Special notes for your reviewer**:
- I adjusted validation to allow for 0 values for some of the conntrack settings, as otherwise the "leave the limit as-is" logic wouldn't be allowed.
- I moved the loading of the config file from the cobra command's Validate method to Complete. This way, the config is fully resolved before validation happens. Otherwise, it just validates the default config values first, and _then_ the config is loaded.
- I think I got all the default values & nil checking correct, but please review carefully!

**Release note**:

```release-note
Restored kube-proxy's support for 0 values for conntrack min, max, max per core, tcp close wait timeout, and tcp established timeout.
```
2017-11-09 00:59:23 -08:00
xiangpengzhao a537cc2d72 Use const instead of hard-code for kubeadm usages 2017-11-09 16:03:47 +08:00
Kubernetes Submit Queue 8a9d44913b
Merge pull request #55348 from jpbetz/fix-testcrd-race
Automatic merge from submit-queue (batch tested with PRs 55092, 55348, 55095, 55277, 55352). 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 data race in TestCRD

Fix this race:
```
==================
WARNING: DATA RACE
Write at 0x00c42a845350 by goroutine 748:
  k8s.io/kubernetes/cmd/kube-apiserver/app/testing.TestCRD()
      cmd/kube-apiserver/app/testing/server_test.go:257 +0x15da
  testing.tRunner()
      /root/.cache/bazel/_bazel_root/e9f728bbd90b3fba632eb31b20e1dacd/external/go_sdk/src/testing/testing.go:746 +0x16c

Previous write at 0x00c42a845350 by goroutine 481:
  k8s.io/kubernetes/cmd/kube-apiserver/app/testing.TestCRD.func2()
      cmd/kube-apiserver/app/testing/server_test.go:250 +0x241
```

Related to #54095
2017-11-08 21:18:19 -08:00
Kubernetes Submit Queue d0cf4de51f
Merge pull request #55125 from oracle/for/upstream/master/#55124
Automatic merge from submit-queue (batch tested with PRs 55301, 55319, 54018, 55322, 55125). 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 for configmap resource lock type to CCM

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

Adds support for configmap resource locks which can be specified currently via CLI args to the CCM. Currently the `--leader-elect-resource-lock=configmaps` is ignored. 

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

```release-note
Fix support for configmap resource lock type in CCM
```

/cc @wlan0 @luxas @andrewsykim 

@prydie 


Output after running with this flag. 
```
$ kubectl -n kube-system get cm cloud-controller-manager -oyaml
apiVersion: v1
kind: ConfigMap
metadata:
  annotations:
    control-plane.alpha.kubernetes.io/leader: '{"holderIdentity":"<host>-external-cloud-controller","leaseDurationSeconds":15,"acquireTime":"2017-11-06T00:14:41Z","renewTime":"2017-11-06T00:17:54Z","leaderTransitions":0}'
  creationTimestamp: 2017-11-06T00:14:41Z
  name: cloud-controller-manager
  namespace: kube-system
  resourceVersion: "2548197"
  selfLink: /api/v1/namespaces/kube-system/configmaps/cloud-controller-manager
  uid: 7c4cfe24-c287-11e7-99e4-0000170192f0
```
2017-11-08 20:23:35 -08:00
Kubernetes Submit Queue a701a42a82
Merge pull request #49763 from supereagle/versioned-group-clients
Automatic merge from submit-queue (batch tested with PRs 55331, 55272, 55228, 49763, 55242). 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 versiond group clients from client-go

**What this PR does / why we need it**:
Some **Deprecated** group clients are still used, replace them with versioned group clients.

**Which issue this PR fixes**: fixes #49760

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

**Release note**:
```release-note
NONE
```
2017-11-08 17:13:27 -08:00
Kubernetes Submit Queue d42be07e08
Merge pull request #52501 from rajansandeep/featurecoredns
Automatic merge from submit-queue (batch tested with PRs 54493, 52501, 55172, 54780, 54819). 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 CoreDNS as feature in kubeadm

**What this PR does / why we need it**:
This PR adds CoreDNS as a DNS plugin via the feature-gate option in Kubeadm init.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
kubeadm: Add an experimental mode to deploy CoreDNS instead of KubeDNS
```
/cc @johnbelamaric
2017-11-08 15:41:14 -08:00
Joe Betz df4f693b3b Fix data race in TestCRD 2017-11-08 14:44:11 -08:00
Alexander Kanevskiy de272d0617 kubeadm: Extended KubeletVersionCheck
KubeletVersionCheck now able to detect if kubelet version
is higher than control plane. As this might lead to malfunctional
cluster setups, kubeadm will give warning.

Fixes: kubernetes/kubeadm#496
2017-11-08 23:36:27 +02:00
Andrew Rynhard de3cf25224
Conditionally mount flexvolume 2017-11-08 07:05:29 -08:00
Kubernetes Submit Queue 42d5dc709e
Merge pull request #55259 from ironcladlou/gc-partial-discovery
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>.

Tolerate partial discovery in garbage collector

Allow the garbage collector to tolerate partial discovery failures. On a
partial failure, use whatever was discovered, log the failures, and
allow the resync logic to try again later.

Fixes #55022.

```release-note
API discovery failures no longer crash the kube controller manager via the garbage collector.
```

/cc @caesarxuchao
2017-11-07 18:53:51 -08:00
Dan Mace c3dd82c30c Tolerate partial discovery in garbage collector
Allow the garbage collector to tolerate partial discovery failures. On a
partial failure, use whatever was discovered, log the failures, and
allow the resync logic to try again later.

Fixes #55022.
2017-11-07 16:54:49 -05:00
Andy Goldstein ea78586832 Re-allow 0 for kube-proxy conntrack settings
When kube-proxy was refactored to use a configuration file, the ability
to use 0 for conntrack min, max, max per core, and tcp timeouts was
inadvertently broken; if you specified 0, it would instead apply the
default value from defaults.go.

This change restores the ability to use 0 to mean 0.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-07 14:45:30 -05:00
Kubernetes Submit Queue e1de2ad507
Merge pull request #52562 from ironcladlou/kube-scheduler-config
Automatic merge from submit-queue (batch tested with PRs 53592, 52562, 55175, 55213). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactor kube-scheduler config API, command, and server setup

Refactor the kube-scheduler configuration API, command setup, and server setup according to the guidelines established in #32215 and using the kube-proxy refactor (#34727) as a model of a well factored component adhering to said guidelines.

* Config API: clarify meaning and use of algorithm source by replacing modality derived from bools and string emptiness checks with an explicit AlgorithmSource type hierarchy.
* Config API: consolidate client connection config with common structs.
* Config API: split and simplify healthz/metrics server configuration.
* Config API: clarify leader election configuration.
* Config API: improve defaulting.
* CLI: deprecate all flags except `--config`.
* CLI: port all flags to new config API.
* CLI: refactor to match kube-proxy Cobra command style.
* Server: refactor away configurator.go to clarify application wiring.
* Server: refactor to more clearly separate wiring/setup from running.

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

@kubernetes/api-reviewers 
@kubernetes/sig-cluster-lifecycle-pr-reviews 
@kubernetes/sig-scheduling-pr-reviews 

/cc @ncdc @timothysc @bsalamat

```release-note
The kube-scheduler command now supports a `--config` flag which is the location of a file containing a serialized scheduler configuration. Most other kube-scheduler flags are now deprecated.
```
2017-11-07 11:21:19 -08:00
Kubernetes Submit Queue 576c9118a6
Merge pull request #53592 from frodenas/bootstrap-controller
Automatic merge from submit-queue (batch tested with PRs 53592, 52562, 55175, 55213). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Check RegisterMetricAndTrackRateLimiterUsage error when starting BootstrapSigner & TokenCleaner controllers

**What this PR does / why we need it**:
Prevent `BootstrapSigner` and `TokenCleaner` controllers to start if `metrics.RegisterMetricAndTrackRateLimiterUsage` returns an error.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-07 11:21:15 -08:00
Kubernetes Submit Queue 552d2b35bd
Merge pull request #55237 from andrewsykim/kubeadm-remove-priority-admission
Automatic merge from submit-queue (batch tested with PRs 53273, 55058, 55237, 50140). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: remove priority admission controller for v1.9

**What this PR does / why we need it**:
Removes Priority Admission Controller in kubeadm since it's currently in alpha. 

**Release note**:
```release-note
Removes Priority Admission Controller from kubeadm since it's alpha. 
```

cc @luxas
2017-11-07 09:39:42 -08:00
Sandeep Rajan f3dc622032 adding coredns as a featuregate 2017-11-07 12:32:42 -05:00
Kubernetes Submit Queue dd70d3c28b
Merge pull request #55166 from kad/kubeadm-issue-522
Automatic merge from submit-queue (batch tested with PRs 55214, 55166). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: don't create duplicate volume/mount

**What this PR does / why we need it**:
If certificates for etcd are located in the same directory or
subdirectories of kubernetes pki directory, don't create separate
volumes and mounts in manifests.

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

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

**Release note**:
```release-note
NONE
```
2017-11-07 08:01:20 -08:00
Dan Mace efb2bb71cd Refactor scheduler config API
Refactor the kube-scheduler configuration API, command setup, and server
setup according to the guidelines established in #32215 and using the
kube-proxy refactor (#34727) as a model of a well factored component
adhering to said guidelines.

* Config API: clarify meaning and use of algorithm source by replacing
modality derived from bools and string emptiness checks with an explicit
AlgorithmSource type hierarchy.
* Config API: consolidate client connection config with common structs.
* Config API: split and simplify healthz/metrics server configuration.
* Config API: clarify leader election configuration.
* Config API: improve defaulting.
* CLI: deprecate all flags except `--config`.
* CLI: port all flags to new config API.
* CLI: refactor to match kube-proxy Cobra command style.
* Server: refactor away configurator.go to clarify application wiring.
* Server: refactor to more clearly separate wiring/setup from running.

Fixes #52428.
2017-11-07 09:41:39 -05:00
Dan Mace 25ca287707 Update generated files 2017-11-07 09:41:35 -05:00
Joe Betz a00340afb3
Merge pull request #54640 from mattmoyer/kubeadm-fix-init-token-ttl
Fix `kubeadm init --token-ttl=0`/config `tokenTTL: "0"`.
2017-11-07 06:33:27 -08:00
Kubernetes Submit Queue eb578813cb
Merge pull request #55157 from sttts/sttts-etcd3-scheme
Automatic merge from submit-queue (batch tested with PRs 55061, 55157, 55231). 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: remove scheme arg from NewUnsecuredEtcd3TestClientServer

Not necessary anymore.
2017-11-07 06:03:16 -08:00
andrewsykim 7be4926758 kubeadm: remove priority admission controller for v1.9 2017-11-07 08:28:05 -05:00
Matt Moyer 8ab898f858 Fix `kubeadm init --token-ttl=0`/config `tokenTTL: "0"`.
This was broken because the API machinery defaulting mechanism couldn't differentiate between an unset value (which should default to 24 hours) and a value explicitly set to 0 (which should mean infinite).

The fix is to change `TokenTTL` from a `metav1.Duration` to `*metav1.Duration` so that `nil` can represent the unspecified value.

This bug was introduced in https://github.com/kubernetes/kubernetes/pull/48783.
2017-11-07 07:24:52 -06:00
supereagle b694d51842 use versiond group clients from client-go 2017-11-07 14:47:22 +08:00
Kubernetes Submit Queue 9feabbdaeb
Merge pull request #55130 from Lion-Wei/kubeadm-modprobe
Automatic merge from submit-queue (batch tested with PRs 53866, 54852, 55178, 55185, 55130). 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 mount path '/lib/modules'

**What this PR does / why we need it**:
Kube-proxy need mount path '/lib/modules' to load kernel modules automatically inside the pod.

We already have this pr: #52003, for 'cluster/addons' and `saltbase'.

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

**Release note**:
```release-note
NONE
```
2017-11-06 22:20:39 -08:00
Kubernetes Submit Queue 2907168a87
Merge pull request #53645 from xiangpengzhao/fix-kubeproxy-cc
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 KubeProxyConfiguration out of componentconfig API group

**What this PR does / why we need it**:
move KubeProxyConfiguration out of componentconfig API group

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

**Special notes for your reviewer**:
/cc @thockin @ncdc 

**Release note**:

```release-note
NONE
```
2017-11-06 14:55:02 -08:00
Kubernetes Submit Queue 01f205adf5
Merge pull request #54759 from sakshamsharma/remove-google-kms-in-tree
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 Google Cloud KMS's in-tree integration

Removes the following introduced by #48574 and others:
* `kms.go` which contained the cloudkms-specific code for Google Cloud KMS service.
* Registering the Google Cloud KMS in the KMS plugin registry.
* Google's `cloudkms` API package from `vendor` folder. 

The following changes are upcoming:
* Removal of KMSPluginRegistry. This would not be needed anymore, since KMS providers will be out-of-tree from now on (so no need of registering them, an address of the process would be enough).
* A service which allows encrypt/decrypt functionality (satisfies `envelope.Service` interface) if initialized with an IP/Port of an out-of-tree process serving KMS requests. Will tentatively use gRPC requests to talk to this external service.

Reference: https://github.com/kubernetes/kubernetes/pull/54439#issuecomment-340062801 and https://github.com/kubernetes/kubernetes/issues/51965#issuecomment-339333937.

```release-note
Google KMS integration was removed from in-tree in favor of a out-of-process extension point that will be used for all KMS providers.
```
2017-11-06 14:10:43 -08:00
Alexander Kanevskiy 13ffe2cf4e kubeadm: don't create duplicate volume/mount
If certificates for etcd are located in the same directory or
subdirectories of kubernetes pki directory, don't create separate
volumes and mounts in manifests.

Fixes kubernetes/kubeadm#522
2017-11-06 16:00:11 +02:00
Dr. Stefan Schimanski 11d9dd8cec apiserver: remove scheme arg from NewUnsecuredEtcd3TestClientServer 2017-11-06 13:05:33 +01:00
Lion-Wei 0a60be5c0a kubeadm mount path '/lib/modules' 2017-11-06 10:18:10 +08:00
Josh Horwitz 590e626939 Add support for configmap resource lock type to CCM 2017-11-05 19:24:16 -05:00
Kubernetes Submit Queue 210626577b
Merge pull request #54750 from ss22ever/branch1
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>.

Stop using the PersistentVolumeLabel admission controller in v1.9

**What this PR does / why we need it**:
Stop using the PersistentVolumeLabel admission controller in v1.9, as in v1.9, we're targeting out-of-tree cloud providers to be ready to use more generally as part of moving to beta.

**Which issue this PR fixes**:
 fixes kubernetes/kubeadm#444
2017-11-05 14:00:46 -08:00
root 824cf1f960 Stop using the PersistentVolumeLabel admission controller in v1.9 2017-11-05 19:43:58 +00:00
Kubernetes Submit Queue 5691a8d4fe
Merge pull request #54721 from runcom/reset-remove-dockerism
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: reset: use crictl to reset containers

@luxas PTAL



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



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

This patch makes kubeadm to try and reset containers using `crictl` first instead of docker. The reason is that kubeadm reset is ineffective with new container runtimes using the CRI (like CRI-O).
This patch uses `crictl` first and falls back to `docker` in case `crictl` isn't available. 

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

Fix https://github.com/kubernetes/kubeadm/issues/508

**Special notes for your reviewer**:

**Release note**:

```release-note
kubeadm: reset: use crictl to reset containers
```
2017-11-04 14:49:52 -07:00
Kubernetes Submit Queue 3e245366f0
Merge pull request #53484 from danehans/kubeadm_probe
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>.

Adds Support for Configurable Kubeadm Probes.

**What this PR does / why we need it**:
Allows kubeadm liveness probes to be configurable using extra args. Needed to provide deployment flexibility where services are not bound to `127.0.0.1`.

**Which issue this PR fixes**: fixes https://github.com/kubernetes/kubeadm/issues/473

**Special notes for your reviewer**:
Needed for IPv6 support.
/sig network
/area ipv6

**Release note**:
```release-note
```
2017-11-04 14:04:27 -07:00
xiangpengzhao 291647e6d9 Use "kubeproxy.config.k8s.io" as final group name. 2017-11-04 11:42:36 +08:00
xiangpengzhao ff36eefd17 Rename kubeproxy config pkg and group. 2017-11-04 11:42:36 +08:00
xiangpengzhao 91ab8fe1e7 NewOptions doesn't need to return error in signature. 2017-11-04 11:38:57 +08:00
xiangpengzhao 1d589600bc Use global Scheme for API group. 2017-11-04 11:38:57 +08:00
xiangpengzhao 2b938b985c Use const GroupName instead of hard-code. 2017-11-04 11:38:57 +08:00
xiangpengzhao 75b9fb28bf auto generated files 2017-11-04 11:38:57 +08:00
xiangpengzhao 5c8c1f43fa move KubeProxyConfiguration out of componentconfig API group 2017-11-04 11:38:57 +08:00
Kubernetes Submit Queue 2ecb368026
Merge pull request #53679 from kow3ns/workloadsv1
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>.

Workloads V1

**What this PR does / why we need it**: This PR promotes the Deployment, ReplicaSet, and DaemonSet StatefulSet, ControllerRevision kinds to the apps/v1 group version.

https://github.com/kubernetes/features/issues/353

**Special notes for your reviewer**:
There will be at least two followups to this PR. The first to add a scale sub-resource when the correct location is resolved, and the second to deal with Conditions in the workloads API.

While it would have been preferable to move the kinds individually providing a lesser burden on reviewers, this proved impracticable due to the intricacies of version resolution in kubectl for objects of the different kinds in the same group.  

```release-note
DaemonSet, Deployment, ReplicaSet, and StatefulSet have been promoted to GA and are available in the apps/v1 group version.
```
2017-11-03 15:17:16 -07:00
Daneyon Hansen 1d47893608 Adds Support for Configurable Kubeadm Probes. 2017-11-03 10:42:29 -07:00
Kubernetes Submit Queue 12752f3139
Merge pull request #55041 from wackxu/remdup
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 duplicate healthz check register

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

We registe healthz check twice, another is 

https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-controller-manager/app/controllermanager.go#L203

we should remove the duplicate 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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-03 07:18:00 -07:00
Kubernetes Submit Queue 676e28ff7a
Merge pull request #54848 from xiangpengzhao/add-ipvsscheduler-testcase
Automatic merge from submit-queue (batch tested with PRs 54906, 54120, 54934, 54915, 54848). 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 unit test coverage for kube-proxy configuration.

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

**Release note**:

```release-note
NONE
```
2017-11-02 23:02:18 -07:00
Kubernetes Submit Queue 9ca2bda520
Merge pull request #54934 from akosiaris/master
Automatic merge from submit-queue (batch tested with PRs 54906, 54120, 54934, 54915, 54848). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Only parse ClusterCIDR, ServiceCIDR if AllocateNodeCIDRs

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

Avoid unnecessary spam in kube-controller-manager log if --cluster-cidr is not specified and --allocate-node-cidrs is false. Add clarification in kube-controller-manager help about that.

**Release note**
```release-note
Avoid unnecessary spam in kube-controller-manager log if --cluster-cidr is not specified and --allocate-node-cidrs is false.
```
2017-11-02 23:02:13 -07:00
Kubernetes Submit Queue b006bc5d04
Merge pull request #54120 from m1093782566/fix-proxy-mode
Automatic merge from submit-queue (batch tested with PRs 54906, 54120, 54934, 54915, 54848). 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 kube-proxy fall back to iptables firstly when unable to load kernel modules

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

Fix kube-proxy fall back to iptables firstly when unable to load kernel modules

**Which issue this PR fixes**: 

fixes #54121

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/kind bug
/sig network
/area kube-proxy
2017-11-02 23:02:10 -07:00
wackxu 22a706ed50 remove duplicate healthz check register 2017-11-03 11:27:30 +08:00
m1093782566 ea930dbe5c fix kube-proxy mode 2017-11-03 09:41:54 +08:00
Kubernetes Submit Queue 9c41f9baf1
Merge pull request #50887 from netroby/patch-1
Automatic merge from submit-queue (batch tested with PRs 55016, 50887). 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>.

If command.Execute() return err, print to stdErr

The current kube-proxy not print error if (execute() failed) . not so good and not so friendly to user.
If print err to stdError, will show us why it failed.
2017-11-02 15:40:15 -07:00
Kenneth Owens 26bf978c07 Promotes the StatefulSet, ControllerRevision, Deployment, and ReplicaSet kinds to the apps/v1 group version. 2017-11-02 14:19:04 -07:00
Kubernetes Submit Queue 3a15fdbe7e
Merge pull request #54643 from mtaufen/structure-manifest-url-header
Automatic merge from submit-queue (batch tested with PRs 52367, 53363, 54989, 54872, 54643). 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>.

Lift embedded structure out of ManifestURLHeader field

Related: #53833

```release-note
It is now possible to set multiple manifest url headers via the Kubelet's --manifest-url-header flag. Multiple headers for the same key will be added in the order provided. The ManifestURLHeader field in KubeletConfiguration object (kubeletconfig/v1alpha1) is now a map[string][]string, which facilitates writing JSON and YAML files.
```
2017-11-02 12:59:24 -07:00
Alexandros Kosiaris 4dddb8c6b3 Only parse ClusterCIDR, ServiceCIDR if AllocateNodeCIDRs
ClusterCIDR and ServiceCIDR are settings that are only used if at least
AllocateNodeCIDRs is set. The route controller requires in addition to
it for ConfigureCloudRoutes to be true as well. Since
AllocateNodeCIDRs is by default false, if guard the parsing of these
settings in order to not unnecessarily spam logs. Amend the
documentation of kube-controller-manager for the 2 settings to point
out the requirement of AllocateNodeCIDRs to be true as well
2017-11-02 19:25:03 +02:00
Antonio Murdaca bb0cd2714b
kubeadm: reset: use crictl to reset containers
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-11-02 15:58:56 +01:00
tcharding 8739ee7bd1 cmd: genutils: remove golint_failure entry
`golint` emits warnings

```
exported function OutDir should have comment or be unexported.
strings should not be capitalized or end with punctuation or a newline
```

- Add documentation comment to exported function OutDir.
- Remove newline from error string.
- Remove `hack\.golint_failures` entry for `cmd/genutils`
2017-11-02 12:48:15 +11:00
Kubernetes Submit Queue 219731cb3a
Merge pull request #54926 from zhangxiaoyu-zidif/fix-kubelet-args
Automatic merge from submit-queue (batch tested with PRs 54894, 54630, 54828, 54926, 54865). 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 kubelet startup args

**What this PR does / why we need it**:
There should not be space between memory and disk.

**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-01 17:52:24 -07:00
Kubernetes Submit Queue 7d404ddbc1
Merge pull request #54630 from lioncruise/patch-2
Automatic merge from submit-queue (batch tested with PRs 54894, 54630, 54828, 54926, 54865). 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 syntax error in a comment

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-11-01 17:52:19 -07:00
Kubernetes Submit Queue 574492aed6
Merge pull request #53553 from bsteciuk/kubeadm-windows
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 - Added initial support for Windows worker nodes to join cluster using kubeadm

**What this PR does / why we need it**:
This PR adds initial support for adding a Windows worker node to a Kubernetes cluster with kubeadm.  Also adds Windows build of kubeadm to node build targets. 

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

**Special notes for your reviewer**:

Depends on #53730 

**Release note**:

```release-note
kubeadm: Add support for adding a Windows node
```
2017-11-01 14:58:58 -07:00
Kubernetes Submit Queue f5b6dd8709
Merge pull request #53962 from Lion-Wei/kubeadm-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>.

support kube-proxy ipvs mode for kubeadm

**What this PR does / why we need it**:
When using `kubeadm` to build a cluster, you can chose kube-proxy with ipvs mode by add flag `--kube-proxy-mode=ipvs`.

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

**Special notes for your reviewer**:
By default, use `iptables` mode. 
**Release note**:
```release-note
NONE
```
2017-11-01 09:04:56 -07:00
Kubernetes Submit Queue 96067e6d7b
Merge pull request #54543 from jamiehannaford/self-hosted-etcd-api
Automatic merge from submit-queue (batch tested with PRs 49840, 54937, 54543). 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 self-hosted etcd API to kubeadm

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

This PR is part of a larger set that implements self-hosted etcd. This PR takes a first step by adding:

1. new API types in `cmd/kubeadm/app/apis` for configuring self-hosted etcd 
2. new Go types in `cmd/kubeadm/app/phases/etcd/spec` used for constructing EtcdCluster CRDs for the etcd-operator. The reason we define these in trunk is because kubeadm cannot import `github.com/coreos/etcd-operator` as a dependency until it's in its own repo. Until then, we need to redefine the structs in our codebase.

**Which issue this PR fixes**:

https://github.com/kubernetes/kubeadm/issues/261
https://github.com/kubernetes/kubeadm/issues/277

**Special notes for your reviewer**:

This is the first step PR in order to save reviewers from a goliath PR

**Release note**:
```release-note
NONE
```
2017-11-01 08:20:28 -07:00
Kubernetes Submit Queue 746cc43f4b
Merge pull request #54937 from xiangpengzhao/remove-kubeadm-const
Automatic merge from submit-queue (batch tested with PRs 49840, 54937, 54543). 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 MinimumCSRAutoApprovalClusterRolesVersion in 1.9 cycle.

**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**:
Have we already bumped the minimum supported version to v1.8.0?
/cc @luxas 

**Release note**:

```release-note
NONE
```
2017-11-01 08:20:25 -07:00
Kubernetes Submit Queue c119a60946
Merge pull request #49840 from andrewrynhard/variable_certs_dir
Automatic merge from submit-queue (batch tested with PRs 49840, 54937, 54543). 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 it possible to configure volume mounts via the config file

**What this PR does / why we need it**:
Kubeadm mounts host CA certs into api server and controller manager. It uses `/etc/pki` and does not allow for the path to be configurable. This PR adds a default to `/etc/pki` but also allows a user to configure the path in the config file. In the case of using Container Linux, the CAs are located at `/usr/share/ca-certificates`, so without this PR the hardcoded `/etc/pki` path is used and will break, for example, the `--cloud-provider` flag because of missing CAs.

Fixes https://github.com/kubernetes/kubeadm/issues/484
Fixes https://github.com/kubernetes/kubeadm/issues/476
Fixes https://github.com/kubernetes/kubeadm/issues/441

/cc @luxas
2017-11-01 08:20:22 -07:00
Bob Steciuk 44fbec29c4 Kubeadm - Added initial support for Windows worker nodes to join cluster using kubeadm
Added kubeadm to node build targets

Created unix/windows specific conditionally compiled for checks.go and defaults.go
2017-11-01 10:36:37 -04:00
xiangpengzhao df81ecf396 Remove MinimumCSRAutoApprovalClusterRolesVersion in 1.9 cycle. 2017-11-01 20:51:32 +08:00
Ferran Rodenas d67898b875 Check RegisterMetricAndTrackRateLimiterUsage error when starting controllers
Signed-off-by: Ferran Rodenas <rodenasf@vmware.com>
2017-11-01 12:46:07 +01:00
Jamie Hannaford c19d146f87 Add generated files 2017-11-01 11:40:52 +01:00
Jamie Hannaford 5eae39d688 Add selfHosted etcd API 2017-11-01 11:40:44 +01:00
zhangxiaoyu-zidif d30cbea838 fix kubelet startup args 2017-11-01 17:30:51 +08:00
Andrew Rynhard 5a64c049e6
Allow extra volumes to be defined 2017-10-31 21:44:45 -07:00
Harry Zhang de1c305356 Remove docker dep in kubelet startup
Update bazel
2017-11-01 10:03:01 +08:00
netroby 0914db052e
Remove spaces 2017-11-01 07:53:46 +08:00
netroby 89e38d9d7c
Fix one line, remove fprintf 2017-11-01 07:53:14 +08:00
Shijun Qin ad336e57cf
fix a grammatical problem in a comment 2017-10-31 20:03:56 +08:00
Kubernetes Submit Queue eb658d699a
Merge pull request #54016 from praseodym/kubeadm-upgrade-plan-offline
Automatic merge from submit-queue (batch tested with PRs 54160, 54016). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix `kubeadm upgrade plan` for offline operation

**What this PR does / why we need it**:
This PR allows `kubeadm upgrade plan` to work in firewalled/offline/otherwise restricted environments by ignoring errors when trying to reach dl.k8s.io. Instead, we fall back to the current kubeadm version as the latest stable version. This is a reasonable as a user is [expected to install a recent version of kubeadm before upgrading](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm-upgrade-1-8/#upgrading-your-control-plane).

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

**Special notes for your reviewer**: Should preferably be cherrypicked to 1.8.

```release-note
Fix `kubeadm upgrade plan` for offline operation: ignore errors when trying to fetch latest versions from dl.k8s.io
```
2017-10-31 01:23:18 -07:00
Kubernetes Submit Queue 94935721d5
Merge pull request #54160 from mtaufen/runtime-config-to-flags
Automatic merge from submit-queue (batch tested with PRs 54160, 54016). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move runtime-related flags from KubeletConfiguration to KubeletFlags

With respect to https://github.com/kubernetes/kubernetes/pull/53833#issuecomment-336317287, move runtime-related flags out of KubeletConfiguration.

Broader issue: https://github.com/kubernetes/features/issues/281

```release-note
NONE
```
2017-10-31 01:23:15 -07:00
xiangpengzhao 9abf4b1d73 Add test case for validateIPVSSchedulerMethod. 2017-10-31 16:22:05 +08:00
xiangpengzhao 36a3193ca9 Add test case for validateHostPort. 2017-10-31 16:06:32 +08:00
xiangpengzhao cac6db5d94 Add test case for validateClientConnectionConfiguration. 2017-10-31 15:48:02 +08:00
Lion-Wei abe8df611b support kube-proxy ipvs mode for kubeadm 2017-10-31 10:37:22 +08:00
Michael Taufen 7cb21746c0 Lift embedded structure out of ManifestURLHeader field 2017-10-30 15:37:55 -07:00
Kubernetes Submit Queue d7567cd6c7
Merge pull request #54704 from dims/try-clean-up-stores
Automatic merge from submit-queue (batch tested with PRs 53796, 54666, 54516, 54625, 54704). 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 TestCRD Flake

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

The DestroyFunc functions returned by generic.NewRawStorage is never
called when we do a StartTestServer() in the test suite. For a quick
hack for now, added TrackStorageCleanup/RegisterStorageCleanup and
CleanupStorage. Note that unless TrackStorageCleanup is called (which
is called only from the test suite) the other two methods are
no-ops essentially. So no change in behavior at runtime. This vastly
brings down the number of goroutines that are left behind when this
test is executed and should reduce if not eliminate the flakiness
of TestCRD

**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-10-30 13:48:41 -07:00