Commit Graph

4438 Commits (33f3332a44745a0c575498ad5b3a807cc944cee6)

Author SHA1 Message Date
Kubernetes Submit Queue 172df7e23d Merge pull request #46865 from sttts/sttts-kube-apiserver-run-test
Automatic merge from submit-queue

kube-apiserver: tests for aggregation and CRDs via delegation

In our integration tests we do not use the real kube-apiserver setup code, but mock our own. Here I use the actual `cmd/kube-apiserver/app.Run()` func with an testing etcd server. This can test the whole delegation chain of aggregator, apiextensions and kube-apiserver.
2017-07-12 02:55:15 -07:00
Kubernetes Submit Queue b66be98174 Merge pull request #39173 from caesarxuchao/include-leaderelection
Automatic merge from submit-queue (batch tested with PRs 47232, 48625, 48613, 48567, 39173)

Include leaderelection in client-go; 

Fix #39117
Fix https://github.com/kubernetes/client-go/issues/28

This PR:
* includes the leaderelection to the staging client-go
* to avoid conflict with golang's testing package, renames package /testing to /testutil, and renames cache/testing to cache/testframework

```release-note
client-go now includes the leaderelection package
```
2017-07-12 00:10:20 -07:00
Kubernetes Submit Queue d396ac53dc Merge pull request #48625 from MrHohn/kube-proxy-metrics-flags
Automatic merge from submit-queue (batch tested with PRs 47232, 48625, 48613, 48567, 39173)

Make kube-proxy's MetricsBindAddress configurable via flag

**What this PR does / why we need it**: From #48600, `MetricsBindAddress` used to be configurable through flag (coupled with `HealthzBindAddress`). But this functionality went away after #44968 separated healthz server from metrics server. This PR adds that functionality back.

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

**Special notes for your reviewer**:
/assign @ncdc 
cc @bowei @r0bj

**Release note**:

```release-note
none
```
2017-07-12 00:10:14 -07:00
Kubernetes Submit Queue a3430ad0c3 Merge pull request #47232 from gyliu513/remove-mesos-cp
Automatic merge from submit-queue

Removed mesos as cloud provider from Kubernetes.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Move Mesos Cloud Provider out of Kubernetes Repo
```
2017-07-12 00:08:20 -07:00
Dr. Stefan Schimanski 5835cfbcce kube-apiserver: add integration test with real Run() func
- for simple Run()
- for aggregation API group priorities
- for CRD creation
2017-07-12 08:47:25 +02:00
Dr. Stefan Schimanski 39e6bbb78b kube-apiserver: make apiserver chain testable 2017-07-12 08:47:25 +02:00
Kubernetes Submit Queue 683b8dea3e Merge pull request #48507 from kad/issue-292
Automatic merge from submit-queue (batch tested with PRs 48196, 42783, 48507, 47719, 46138)

kubeadm: Allows to use versions like 1.6.4 instead v1.6.4

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

As part of issue kubernetes/kubeadm#292 discussion, it
turned out that for users it is not always obvious that
version specification parameter must be in form "vX.Y.Z".
This patch allows to specify it in form "X.Y.Z" and
converts it internally to normal semantic version which
expected in the rest of the code.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
- kubeadm now can accept versions like "1.6.4" where previously it strictly required "v1.6.4"
```
2017-07-11 23:09:11 -07:00
Kubernetes Submit Queue b44a084ad3 Merge pull request #42783 from xilabao/add-extra-args-validate
Automatic merge from submit-queue (batch tested with PRs 48196, 42783, 48507, 47719, 46138)

add extra args validate

`ExtraArgsCheck` return warnings not errors. because kubeadm may create the newer version control plane, there are new arguments that kubeadm doesn't know.
2017-07-11 23:09:09 -07:00
Kubernetes Submit Queue e11020fa39 Merge pull request #48196 from fabriziopandini/kubeadm-phase-certs2
Automatic merge from submit-queue

kubeadm: Implementing the certificates phase fully

**What this PR does / why we need it:**
This contains implementation of certs phases in kubeadm, which is part of the wider effort of implementing phases in kubeadm, previously in alpha stage.

The original proposal for this activity can be found [here](https://github.com/kubernetes/kubeadm/pull/156/files) and related comments.

Kubeadm phase implementation checklist is defined [here](https://github.com/kubernetes/kubeadm/issues/267)

Common implementation guidelines and principles for all phases are defined [here](https://docs.google.com/document/d/1VQMyFIVMfRGQPP3oCUpfjiWtOr3pLxp4g7cP-hXQFXc/edit?usp=sharing)

This PR implements:

- [x] kubeadm phase certs 
  - [x] kubeadm phase certs all
  - [x] kubeadm phase certs ca
  - [x] kubeadm phase certs apiserver
  - [x] kubeadm phase certs apiserver-kubelet-client
  - [x] kubeadm phase certs sa
  - [x] kubeadm phase certs front-proxy-ca
  - [x] kubeadm phase certs front-proxy-client

**Which issue this PR fixes:**
none

**Special notes for your reviewer:**

This PR resubmits the work of #45617, and already includes @luxas reviews. 

Please note that:
- the API - phase\certs.go - is now totally free by any UX concerns, and implements only the core logic for cert generation.
- the UX - cmd\phase\certs.go - now takes charge of UX commands and kubeadm own's rules for placing certs in the certificate dir (e.g. create only if exists)
2017-07-11 22:32:38 -07:00
Guangya Liu 498b034492 Removed mesos as cloud provider from Kubernetes. 2017-07-09 21:54:57 -04:00
Kubernetes Submit Queue 8c07c9aa8b Merge pull request #48608 from sttts/sttts-typemeta-getobjectkind
Automatic merge from submit-queue (batch tested with PRs 47040, 48597, 48608, 48653)

apimachinery: remove unneeded GetObjectKind() impls

Based on https://github.com/kubernetes/kubernetes/pull/48601
2017-07-08 15:33:26 -07:00
Kubernetes Submit Queue 9d079c467e Merge pull request #47040 from zjj2wry/controller-manager
Automatic merge from submit-queue

controller-manager: fix horizontal-pod-autoscaler-use-rest-clients fl…

…ag help info



**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
NONE
```
2017-07-08 14:53:51 -07:00
Dr. Stefan Schimanski da3322c2d9 apimachinery: remove unneeded GetObjectKind() impls 2017-07-08 18:37:37 +02:00
Kubernetes Submit Queue a2e463f6d0 Merge pull request #48546 from deads2k/tpr-19-ripples
Automatic merge from submit-queue (batch tested with PRs 48497, 48604, 48599, 48560, 48546)

remove dead code

This removes the dead code cruft since we stopped serving TPRs.

ref #48152
2017-07-08 07:09:38 -07:00
fabriziopandini c2e9052aea fully implement kubeadm-phase-certs - stash 2017-07-08 14:58:11 +02:00
Chao Xu 65cedeeb43 update bazel 2017-07-07 19:04:26 -07:00
Chao Xu 56de7e702e obvious fix 2017-07-07 19:04:26 -07:00
Chao Xu 24d5279c59 move leaderelection package to client-go 2017-07-07 17:01:04 -07:00
Kubernetes Submit Queue 89136f64b9 Merge pull request #42548 from andrewrynhard/use_secrets
Automatic merge from submit-queue (batch tested with PRs 48374, 48524, 48519, 42548, 48615)

Use Secrets for files that self-hosted pods depend on

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

**Release note**:

```release-note
NONE
```

```
bash-4.2# kubectl --kubeconfig /etc/kubernetes/admin.conf get pods -n kube-system
NAME                                                   READY     STATUS    RESTARTS   AGE
dummy-1628042694-6ghbq                                 1/1       Running   0          42m
kube-dns-1853130399-4nzx4                              3/3       Running   0          9m
kube-flannel-ds-mnq10                                  2/2       Running   2          12m
kube-flannel-ds-n3tl8                                  2/2       Running   0          42m
kube-proxy-lqpcb                                       1/1       Running   0          42m
kube-proxy-pw0pw                                       1/1       Running   0          12m
self-hosted-kube-apiserver-fkkwd                       1/1       Running   1          42m
self-hosted-kube-controller-manager-1387498942-mzg41   1/1       Running   1          42m
self-hosted-kube-scheduler-2588609441-cwhqb            1/1       Running   1          42m
```

### API Server
```
bash-4.2# kubectl --kubeconfig /etc/kubernetes/admin.conf exec self-hosted-kube-apiserver-fkkwd -n kube-system -- ls /etc/pki
ca-trust
java
nssdb
rpm-gpg
tls
bash-4.2# kubectl --kubeconfig /etc/kubernetes/admin.conf exec self-hosted-kube-apiserver-fkkwd -n kube-system -- ls /etc/ssl
certs
bash-4.2# kubectl --kubeconfig /etc/kubernetes/admin.conf exec self-hosted-kube-apiserver-fkkwd -n kube-system -- ls /etc/kubernetes/
pki
bash-4.2# kubectl --kubeconfig /etc/kubernetes/admin.conf exec self-hosted-kube-apiserver-fkkwd -n kube-system -- ls /etc/kubernetes/pki/
apiserver-kubelet-client.crt
apiserver-kubelet-client.key
apiserver.crt
apiserver.key
ca.crt
front-proxy-ca.crt
sa.pub
```

### Scheduler
```
bash-4.2# kubectl --kubeconfig /etc/kubernetes/admin.conf exec self-hosted-kube-scheduler-2588609441-cwhqb -n kube-system -- ls /etc/kubernetes/
scheduler.conf
```

### Controller Manager
```
bash-4.2# kubectl --kubeconfig /etc/kubernetes/admin.conf exec self-hosted-kube-controller-manager-1387498942-mzg41 -n kube-system -- ls /etc/ssl
certs
bash-4.2# kubectl --kubeconfig /etc/kubernetes/admin.conf exec self-hosted-kube-controller-manager-1387498942-mzg41 -n kube-system -- ls /etc/pki
ca-trust
java
nssdb
rpm-gpg
tls
bash-4.2# kubectl --kubeconfig /etc/kubernetes/admin.conf exec self-hosted-kube-controller-manager-1387498942-mzg41 -n kube-system -- ls /etc/kubernetes/
controller-manager.conf
pki
bash-4.2# kubectl --kubeconfig /etc/kubernetes/admin.conf exec self-hosted-kube-controller-manager-1387498942-mzg41 -n kube-system -- ls /etc/kubernetes/pki/
ca.crt
ca.key
sa.key
```

/cc @luxas @liggitt @pires @timothysc
2017-07-07 14:48:33 -07:00
Kubernetes Submit Queue 8df63201d9 Merge pull request #48519 from smarterclayton/kube_deps
Automatic merge from submit-queue (batch tested with PRs 48374, 48524, 48519, 42548, 48615)

Kubelet run() should accept partial KubeletDeps

This is used by integrators that want to perform partial overrides of
key interfaces. Refactors the run() method to fit the existing style and
preserve the existing behavior, but allow (for instance) client
bootstrap and cert refresh even when some dependencies are injected.

@derekwaynecarr hit while reviewing client bootstrap code
2017-07-07 14:48:31 -07:00
Zihong Zheng a4e359aa12 Make kube-proxy's MetricsBindAddress configurable via flag 2017-07-07 12:46:20 -07:00
deads2k 0801ded425 remove dead code 2017-07-07 09:12:29 -04:00
Andrew Rynhard 38c6e83033 Use Secrets for files that self-hosted pods depend on 2017-07-06 20:36:18 -07:00
Kubernetes Submit Queue 50c6211850 Merge pull request #48518 from smarterclayton/separate_cert_man
Automatic merge from submit-queue (batch tested with PRs 48518, 48525, 48269)

Move the kubelet certificate management code into a single package

Code is very similar and belongs together. Will allow future cert callers to potentially make this more generic, as well as to make it easier reuse code elsewhere.
2017-07-06 13:34:42 -07:00
Kubernetes Submit Queue b00df7eb89 Merge pull request #47435 from luxas/kubeadm_new_selfhosting
Automatic merge from submit-queue (batch tested with PRs 47435, 46044)

kubeadm: Make self-hosting work and split it out to a phase

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

 - Removes the old self-hosting code
 - Puts the new self-hosting code in `phases/selfhosting`
   - The new code reads manifests from disk (static pods)...
   - ...mutates the PodSpec as necessary...
   - ...and posts the DaemonSet to the API Server...
   - ...and waits for it to come up
 - Uses DaemonSets for all control plane components
 - Creates a `kubeadm alpha phase selfhosting` command that can be invoked against any kubeadm-cluster after install.

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

fixes: https://github.com/kubernetes/kubeadm/issues/127
(large part of at least)

**Special notes for your reviewer**:

Please only review the fourth commit, based on https://github.com/kubernetes/kubernetes/pull/47345

**Release note**:

```release-note
kubeadm: Make self-hosting work by using DaemonSets and split it out to a phase that can be invoked via the CLI
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @jbeda
2017-07-06 12:43:39 -07:00
Clayton Coleman 01c9b6ce8f
Kubelet run() should accept partial KubeletDeps
This is used by integrators that want to perform partial overrides of
key interfaces. Refactors the run() method to fit the existing style and
preserve the existing behavior, but allow (for instance) client
bootstrap and cert refresh even when some dependencies are injected.
2017-07-06 15:06:25 -04:00
Lucas Käldström 9f1c5a6f0f
kubeadm self-hosting: unit tests and bazel 2017-07-06 20:54:47 +03:00
Lucas Käldström d14478f27a
kubeadm: Make self-hosting work and split out to a phase 2017-07-06 20:54:15 +03:00
Kubernetes Submit Queue 14cd03aed6 Merge pull request #48538 from GheRivero/kubeadm_nodename
Automatic merge from submit-queue

Add node-name flag to `join` phase

**What this PR does / why we need it**: Allow to specify a node-name instead of relaying in `os.Hostname()`
This is useful where kubelet use the name given by the cloud-provider to
register the node.


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

**Special notes for your reviewer**:

**Release note**:
```release-note
Added new flag to `kubeadm join`: --node-name, that lets you specify the name of the Node object that's gonna be created
```
2017-07-06 10:52:41 -07:00
Ghe Rivero 2e2a81578b Add node-name flag to `join` phase
Allow to specify a node-name instead of relaying in `os.Hostname()`
This is useful where kubelet use the name given by the cloud-provider to
register the node.

Partially fix: kubernetes/kubeadm#64
2017-07-06 13:58:14 +02:00
Alexander Kanevskiy d8fcf4fcd7 Allows to use versions like 1.6.4 instead v1.6.4
As part of issue kubernetes/kubeadm#292 discussion, it
turned out that for users it is not always obvious that
version specification parameter must be in form "vX.Y.Z".
This patch allows to specify it in form "X.Y.Z" and
converts it internally to normal semantic version which
expected in the rest of the code.
2017-07-06 14:15:26 +03:00
Clayton Coleman b8e662fcea
Move the kubelet certificate management code into a single package
Code is very similar and belongs together.
2017-07-05 18:11:49 -04:00
Kubernetes Submit Queue c10cc3decd Merge pull request #48353 from deads2k/tpr-17-delete-01
Automatic merge from submit-queue (batch tested with PRs 48480, 48353)

remove tpr api access

xref https://github.com/kubernetes/kubernetes/issues/48152

TPR tentacles go pretty deep. This gets us started by removing API access and we'll move down from there.

@kubernetes/sig-api-machinery-misc 
@ironcladlou this should free up the GC implementation since TPRs will no longer be present and failing.

```release-note
Removing TPR api access per https://github.com/kubernetes/kubernetes/issues/48152
```
2017-07-05 05:49:30 -07:00
Kubernetes Submit Queue 8067e7af7f Merge pull request #48341 from duan-yue/unused_alias
Automatic merge from submit-queue (batch tested with PRs 48473, 48341)

remove redundant alias

**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 #
remove redundant alias

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-07-05 03:09:25 -07:00
Kubernetes Submit Queue 0ec36bdc8f Merge pull request #47043 from CaoShuFeng/validate_audit
Automatic merge from submit-queue

Add Validate() function for audit options

**Release note**:

```
NONE
```
Fixes: #47114
2017-07-04 08:48:20 -07:00
Kubernetes Submit Queue 9385d50100 Merge pull request #47345 from luxas/kubeadm_move_controlplane_phase
Automatic merge from submit-queue (batch tested with PRs 46928, 47345)

kubeadm: Move directory ./master to ./phases/controlplane

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

 - Moves app/master into phases/controlplane. It should be in the phases directory, was just overlooked earlier
 - Harmonizes the import names in phases/controlplane with the similar import names in cmd/kubeadm

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

Please review only second and third commit, based on https://github.com/kubernetes/kubernetes/pull/47339

Targets v1.8

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @timothysc @pipejakob
2017-07-04 04:37:31 -07:00
Lucas Käldström 4bab0e9b54
kubeadm: Harmonize import names in the controlplane phase with all the other code 2017-07-04 12:31:46 +03:00
Lucas Käldström 8046bafca5
kubeadm: Move app/master into a separate phase directory 2017-07-04 12:30:42 +03:00
deads2k 3ee458d246 remove tpr API access 2017-07-03 11:25:59 -04:00
Kubernetes Submit Queue f38adf37de Merge pull request #47429 from timothysc/kubeadm
Automatic merge from submit-queue

Add timothysc to kubeadm reviewers

**What this PR does / why we need it**:
Adds timothysc to kubeadm reviewers b/c I'm working on it this cycle. 

**Release note**:
```
NONE
```
2017-07-03 07:38:03 -07:00
Kubernetes Submit Queue 5eccc7ae80 Merge pull request #48056 from luxas/kubeadm_remove_old_label
Automatic merge from submit-queue

Remove old node role label that is not used by kubeadm

**What this PR does / why we need it**:
This label hasn't been used by kubeadm since v1.5.
v1.5 support was dropped when v1.6 arrived due to a potential security flaw and the earlier alpha status.
So this label hasn't been used for around three months.
It makes sense to remove it in time for v1.8, could already have been done for v1.7

**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
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-06-30 22:06:23 -07:00
Kubernetes Submit Queue f663c4c83e Merge pull request #47489 from Mashimiao/cm-remove-unneeded
Automatic merge from submit-queue (batch tested with PRs 48264, 48324, 48125, 47944, 47489)

remove unneeded variable

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>



**What this PR does / why we need it**:
small fix, remove unneeded variable

**Release note**:

```release-note
NONE
```
2017-06-30 20:58:35 -07:00
Tim Hockin a0db287299 Merge pull request #47934 from wlan0/master
enable docs and man page autogeneration for cloud-controller-manager
2017-06-30 16:58:08 -07:00
Kubernetes Submit Queue e633d3e29c Merge pull request #43558 from xilabao/fix-kubeadm-args
Automatic merge from submit-queue

kubeadm: If `--config` is set, don't allow any other option as it won't have effect

If use config in kubeadm init, cann't get other values from other arguments. 
`kubeadm init --config=../kubeadm.config --token 447ad3.96cda76e3206fca0 --apiserver-bind-port 6445`

So I think we need to allow get values from command and is prior than cofig file.
2017-06-30 16:14:51 -07:00
Kubernetes Submit Queue 2b190bd2f1 Merge pull request #47339 from luxas/kubeadm_v18_cleanup_misc
Automatic merge from submit-queue (batch tested with PRs 48295, 48298, 47339, 44910, 48037)

kubeadm: Remove v1.6 version gates, cleanup unused code, etc.

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

 - Removes v1.6 version gates and requires a control plane version of v1.7.0 and above
 - Removes unused/unnecessary functions that got freed up as a consequence of that


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

Fixes: kubernetes/kubeadm#327

**Special notes for your reviewer**:

This PR targets v1.8, can be merged first when the code freeze is lifted

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @timothysc @mikedanese @pipejakob
2017-06-30 14:34:28 -07:00
Lucas Käldström f4fc98ae01
kubeadm: Remove old feature gates and unused functions 2017-06-30 17:46:34 +03:00
duan-yue 3e09d8c985 remove redundant alias 2017-06-30 20:56:19 +08:00
Kubernetes Submit Queue 40f7b595b3 Merge pull request #48183 from xiangpengzhao/fix-proxy-panic
Automatic merge from submit-queue

Fix kube-proxy panic when running with "--cleanup-iptables=true"

**What this PR does / why we need it**:
Save the `--cleanup-iptables` config for new ProxyServer when it's true.
Also check if Broadcaster and EventClient are nil to avoid other potential panic.

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

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

**Release note**:

```release-note
NONE
```
2017-06-28 12:47:10 -07:00
Kubernetes Submit Queue 38fa62052d Merge pull request #47346 from luxas/kubeadm_fix_tolerations
Automatic merge from submit-queue

kubeadm: Start using Tolerations in yaml code again and unit-test

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

- Earlier there was a problem with decoding Tolerations from yaml. Seems to be fixed now.
- Added an unit test to catch such a failure if that regression ever happens again

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

Targets v1.8

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @timothysc
2017-06-28 07:01:57 -07:00
Lucas Käldström 7baff10bfc
kubeadm: Start using Tolerations in yaml code again 2017-06-28 15:06:39 +03:00