Commit Graph

4502 Commits (29f8ff32c221d1f3d7d59bc4675fda3a3a011c59)

Author SHA1 Message Date
Matt Moyer 06bd22ebf9 kubeadm: add a warning about the default token TTL changing in 1.8
This adds a warning to `kubeadm init` and `kubeadm token create` if they are run without the `--token-ttl` / `--ttl` flags. In 1.7 and before, the tokens generated by these commands defaulted to an infinite TTL (no expiration) in 1.8, they will generate a token with a 24 hour TTL.

The actual default change is in https://github.com/kubernetes/kubernetes/pull/48783. This change is separate so we can cherry pick the warning into the release-1.7 branch.
2017-07-14 08:20:44 -07:00
Matt Moyer ae35377ef5 kubeadm: fix broken `kubeadm init --config` flag.
This code was changed in ea196490a0 to validate that `--config` wasn't passed along with other flags. Unfortunately, the implementation was checking `PersistentFlags()`, which was not parsed at the point it was being validated. The result was that `--config` was _always_ rejected, not just when it was specified alongside other flags.

The fix is to use `Flags()` instead, which contains the expected data.
2017-07-13 16:41:32 -07:00
Mike Danese c201553f27 remove some people from OWNERS so they don't get reviews anymore
These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- bprashanth
- rjnagal
- vmarmol
2017-07-13 10:02:21 -07:00
FengyunPan dfc8b667a2 Fix parsing empty CIDR
Fix #48795
Checking ClusterCIDR and ServiceCIDR before parsing them.
2017-07-13 21:08:43 +08:00
Kubernetes Submit Queue 3f59f21308 Merge pull request #48053 from luxas/kubeadm_move_envparam_to_api
Automatic merge from submit-queue (batch tested with PRs 48781, 48817, 48830, 48829, 48053)

kubeadm: Start to remove old envparams

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

Historically, the envparams feature was used as a way to easily debug `kubeadm` while developing it in the v1.3-v1.4 timeframe. Since then some parameters have been hanging around and not being moved into the API as they should have.

Note: This is a temporary step; moving things into the API. Still, the API is gonna change, this is not the end state. But this is better than keeping the envparams.

I'm gonna deal with `KubernetesDir` in the next PR.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@timothysc @pipejakob
2017-07-12 15:11:16 -07:00
Kubernetes Submit Queue 80531ccd84 Merge pull request #48594 from GheRivero/kubeadm_nodename
Automatic merge from submit-queue

Add node-name flag to `init` 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 fix: kubernetes/kubeadm#64

**Release note**:
```release-note
Added new flag to `kubeadm init`: --node-name, that lets you specify the name of the Node object that will be created
```
2017-07-12 13:52:38 -07:00
Lucas Käldström fb2e6575aa
kubeadm: Start to remove old envparams 2017-07-12 23:15:28 +03:00
Matt Moyer 59f9841d50 Change the default kubeadm bootstrap token TTL to 24 hours. 2017-07-12 10:47:01 -07:00
Kubernetes Submit Queue 7d97208ef7 Merge pull request #48737 from mattmoyer/faster-kubeadm-join
Automatic merge from submit-queue

kubeadm: begin polling for bootstrap cluster info immediately

**What this PR does / why we need it**:
This PR changes the behavior of the `kubeadm` loop that polls the API server waiting for discovery information (`cluster-info`). The previous (inadvertent?) behavior was to sleep for `constants.DiscoveryRetryInterval` (5 seconds) before the first request ([`PollInfinite`](https://godoc.org/k8s.io/apimachinery/pkg/util/wait#PollInfinite) vs. [`PollImmediateInfinite`](https://godoc.org/k8s.io/apimachinery/pkg/util/wait#PollImmediateInfinite)).

After this change, `kubeadm` begins does the first check immediately before it moves into the slower polling mode. This takes around 5 seconds off the average time for a new node to join.

#### Before (~5.5s)
```
root@worker:~# time kubeadm join --token abc.123 192.168.42.10:6443
[...]
real	0m5.523s
user	0m0.112s
sys	0m0.124s
```

#### After (~0.5s)
```
root@worker:~# time kubeadm join --token abc.123 192.168.42.10:6443
[...]
real	0m0.587s
user	0m0.092s
sys	0m0.132s
```

**Which issue this PR fixes**:

**Special notes for your reviewer**:
This is my first Kubernetes PR, so please let me know if it's formatted correctly.

**Release note**:

```release-note
NONE
```
2017-07-12 06:33:36 -07:00
Ghe Rivero 8181fd29b2 Add node-name flag to `init` 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-12 12:40:25 +02:00
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
Matt Moyer 1d9bc00b81 Begin polling for bootstrap cluster info immediately.
The previous behavior was to sleep for `constants.DiscoveryRetryInterval` (5 seconds) before the first request.
2017-07-10 15:40:33 -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
Lucas Käldström 0cbabdd9f7
kubeadm: Remove some old comments 2017-06-30 17:22:08 +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
Kubernetes Submit Queue 6089557887 Merge pull request #48050 from luxas/fix_rbac_configmaps
Automatic merge from submit-queue

kubeadm: Expose only the cluster-info ConfigMap in the kube-public ns

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

Noticed a bug; we should only expose the `cluster-info` ConfigMap.

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

**Special notes for your reviewer**:

Cherrypick-candidate for v1.8 cc @dchen1107 
Not blocking the release though...

**Release note**:

```release-note
NONE
```
@jbeda @pipejakob @timothysc @kubernetes/sig-cluster-lifecycle-pr-reviews
2017-06-28 03:29:27 -07:00
xiangpengzhao f12dc94fa9
Fix kube-proxy panic when running with "--cleanup-iptables=true" 2017-06-28 16:43:00 +08:00
Kubernetes Submit Queue d19a2841e3 Merge pull request #47645 from jsafrane/integration-test-speedup
Automatic merge from submit-queue (batch tested with PRs 48139, 48042, 47645, 48054, 48003)

Speed up attach/detach controller integration tests

Internal attach/detach controller timers should be configurable and tests should use much shorter values.

`reconcilerSyncDuration` is deliberately left out of `TimerConfig` because it's the only one that's not a constant one, it's configurable by user.

Fixes #47129 

Before:
```
--- PASS: TestPodDeletionWithDswp (63.21s)
--- PASS: TestPodUpdateWithWithADC (13.68s)
--- PASS: TestPodUpdateWithKeepTerminatedPodVolumes (13.55s)
--- PASS: TestPodAddedByDswp (183.01s)
--- PASS: TestPersistentVolumeRecycler (12.55s)
--- PASS: TestPersistentVolumeDeleter (12.54s)
--- PASS: TestPersistentVolumeBindRace (3.51s)
--- PASS: TestPersistentVolumeClaimLabelSelector (12.50s)
--- PASS: TestPersistentVolumeClaimLabelSelectorMatchExpressions (12.54s)
--- PASS: TestPersistentVolumeMultiPVs (3.05s)
--- PASS: TestPersistentVolumeMultiPVsPVCs (4.36s)
--- PASS: TestPersistentVolumeControllerStartup (7.29s)
--- PASS: TestPersistentVolumeProvisionMultiPVCs (5.02s)
--- PASS: TestPersistentVolumeMultiPVsDiffAccessModes (12.48s)
ok  	k8s.io/kubernetes/test/integration/volume	359.727s
```

After:
```
--- PASS: TestPodDeletionWithDswp (3.71s)
--- PASS: TestPodUpdateWithWithADC (3.63s)
--- PASS: TestPodUpdateWithKeepTerminatedPodVolumes (3.70s)
--- PASS: TestPodAddedByDswp (5.68s)
--- PASS: TestPersistentVolumeRecycler (12.54s)
--- PASS: TestPersistentVolumeDeleter (12.55s)
--- PASS: TestPersistentVolumeBindRace (3.55s)
--- PASS: TestPersistentVolumeClaimLabelSelector (12.50s)
--- PASS: TestPersistentVolumeClaimLabelSelectorMatchExpressions (12.52s)
--- PASS: TestPersistentVolumeMultiPVs (3.98s)
--- PASS: TestPersistentVolumeMultiPVsPVCs (3.85s)
--- PASS: TestPersistentVolumeControllerStartup (7.18s)
--- PASS: TestPersistentVolumeProvisionMultiPVCs (5.23s)
--- PASS: TestPersistentVolumeMultiPVsDiffAccessModes (12.48s)
ok  	k8s.io/kubernetes/test/integration/volume	103.267s
```

PV controller tests are the slowest ones now.

@kubernetes/sig-storage-pr-reviews 
/assign @gnufied 

```release-note
NONE
```
2017-06-27 14:08:17 -07:00
Kubernetes Submit Queue 6d1da16456 Merge pull request #47731 from jsravn/use-endpoints-cache-for-endpoint-controller
Automatic merge from submit-queue

Use endpoints informer for the endpoint controller

This substantially reduces the number of API calls made by the endpoint
controller. Currently the controller makes an API call per endpoint for
each service that is synced. When the 30s resync is triggered, this
results in an API call for every single endpoint in the cluster. This
quickly exceeds the default qps/burst limit of 20/30 even in small
clusters, leading to delays in endpoint updates.

This change modifies the controller to use the endpoint informer cache
for all endpoint GETs. This means we only make API calls for changes in
endpoints. As a result, qps only depends on the pod activity in the
cluster, rather than the number of services.



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

Address endpoint update delays as described in https://github.com/kubernetes/kubernetes/issues/47597.

**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/kubernetes/issues/47597

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-27 05:20:12 -07:00
Kubernetes Submit Queue 49c151e433 Merge pull request #48049 from luxas/kubeadm_rolling_proxy
Automatic merge from submit-queue

kubeadm: Make kube-proxy RollingUpgradeable

**What this PR does / why we need it**:
Sets the right updateStrategy for kube-proxy.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@pipejakob @timothysc @kubernetes/sig-cluster-lifecycle-pr-reviews
2017-06-27 04:29:39 -07:00
James Ravn 9fc5a547ae Use endpoints informer for the endpoint controller
This substantially reduces the number of API calls made by the endpoint
controller. Currently the controller makes an API call per endpoint for
each service that is synced. When the 30s resync is triggered, this
results in an API call for every single endpoint in the cluster. This
quickly exceeds the default qps/burst limit of 20/30 even in small
clusters, leading to delays in endpoint updates.

This change modifies the controller to use the endpoint informer cache
for all endpoint GETs. This means we only make API calls for changes in
endpoints. As a result, qps only depends on the pod activity in the
cluster, rather than the number of services.
2017-06-27 10:17:09 +01:00
Kubernetes Submit Queue aac42add77 Merge pull request #47443 from p0lyn0mial/use_incluster_cfg_when_creating_ext_informers
Automatic merge from submit-queue (batch tested with PRs 48012, 47443, 47702, 47178)

incluster config will be used when creating external shared informers.

**What this PR does / why we need it**:
Previously the loopback configuration was used to talk to the server.
As a consequence a custom API server was unable to talk to the root API server.
This PR changes the above by using incluster configuration to create shared informers.

**Release note**:

```release-note
NONE
```
2017-06-26 17:48:01 -07:00
Kubernetes Submit Queue eaa6571229 Merge pull request #47514 from jsafrane/move-savepodtofile
Automatic merge from submit-queue (batch tested with PRs 48074, 47971, 48044, 47514, 47647)

Move LoadPodFromFile to volume utils

SavePodToFile is not used anywhere and LoadPodFromFile is used only by PV
recycler.

Fix #16970

```release-note
NONE
```
2017-06-26 11:40:58 -07:00
Kubernetes Submit Queue 8cbe10497e Merge pull request #48044 from bowei/kube-dns-1.14.4
Automatic merge from submit-queue (batch tested with PRs 48074, 47971, 48044, 47514, 47647)

Update kube-dns to 1.14.4

- Fixes broken arm dnsmasq image
- Fixes kube-dns log spam issue

https://github.com/kubernetes/dns/issues/111

```release-note
none
```
2017-06-26 11:40:56 -07:00
Jan Safranek c2dc5b5bf1 Move LoadPodFromFile to volume utils
SavePodToFile is not used anywhere and LoadPodFromFile is used only by PV
recycler.
2017-06-26 16:02:43 +02:00
Lucas Käldström e25a5b1546
Remove old node role label that is not used by kubeadm 2017-06-26 14:46:15 +03:00
Lucas Käldström 037c9e8965
kubeadm: Expose only the cluster-info ConfigMap in the kube-public ns 2017-06-26 12:56:06 +03:00
Lucas Käldström 49d7d5d0d8
kubeadm: Make kube-proxy RollingUpgradeable 2017-06-26 12:33:54 +03:00
Kubernetes Submit Queue 637cc0a8ba Merge pull request #46276 from karataliu/removeDupMsg
Automatic merge from submit-queue (batch tested with PRs 47961, 46276)

Remove duplicate error message output in hyperkube.

**What this PR does / why we need it**:
Currently hyperkube binary will always print duplicate messages if fatal error occurs:
```
$ ./kubelet # run without permission
I0523 08:38:02.642638   25701 feature_gate.go:144] feature gates: map[]
W0523 08:38:02.642827   25701 server.go:472] No API client: no api servers specified
Error: failed to run Kubelet: error reading /var/run/kubernetes/kubelet.key, certificate and key must be supplied as a pair
Error: failed to run Kubelet: error reading /var/run/kubernetes/kubelet.key, certificate and key must be supplied as a pair
```

This is due to RunToExit will print out the error which Run has just printed. https://github.com/kubernetes/kubernetes/blob/8bee44b/cmd/hyperkube/hyperkube.go#L178-L189

This was introduced in following commit for adding GOMAXPROCS calls.
1e679f0069

The following commit removes GOMAXPROCS calls, but did not remove the corresponding error output line.
88ea80b572


**Which issue this PR fixes**

**Special notes for your reviewer**:

**Release note**:
2017-06-26 02:11:54 -07:00
Bowei Du 85025ef7dc Update kube-dns to 1.14.4
- Fixes broken arm dnsmasq image
- Fixes kube-dns log spam issue
2017-06-25 23:53:37 -07:00
Kubernetes Submit Queue f9bf1f3b06 Merge pull request #47348 from luxas/kubeadm_remove_validate_phase
Automatic merge from submit-queue

kubeadm: Remove the validate phase as it's not needed

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

This validation code was added in v1.4 as a way to remove flakiness between deploying the control plane in Static Pods and deploying kube-discovery as a Deployment.

That isn't the case anymore and we're not experiencing such flakiness, as we're using other methods like checking `/healthz` to determine a healthy control plane before proceeding.

https://github.com/kubernetes/kubernetes/pull/43881 removed this logic from `kubeadm init` to having it as a phase. But that phase isn't needed or used in any way, so now I'm removing it here.

**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 @mikedanese
2017-06-24 12:15:48 -07:00
Lucas Käldström 051db16083
kubeadm: Cleanup version gates for the Node Authorizer when targeting v1.8 2017-06-24 19:21:41 +03:00
Lucas Käldström 4380d1fbdd
kubeadm: Remove the validate phase as it's not needed nor used 2017-06-24 19:10:26 +03:00
Daneyon Hansen 36c9e1f42e Adds IPv6 test cases 2017-06-23 16:43:16 -07:00
Kubernetes Submit Queue 0fe8006455 Merge pull request #47803 from gtirloni/kubeadm-phase-preflight
Automatic merge from submit-queue (batch tested with PRs 47694, 47772, 47783, 47803, 47673)

Add "alpha phase preflight" command

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

Adds "alpha phase preflight" command to kubeadm in order to run pre-flight checks independently of init phase.

**Which issue this PR fixes:** fixes kubernetes/kubeadm#314

/cc @luxas
2017-06-23 08:29:30 -07:00
Kubernetes Submit Queue d95a8bf66b Merge pull request #47783 from NickrenREN/containerruntime
Automatic merge from submit-queue (batch tested with PRs 47694, 47772, 47783, 47803, 47673)

Make different container runtimes constant

Make different container runtimes constant to avoid hardcode

**Release note**:

```release-note
NONE
```
2017-06-23 08:29:28 -07:00
Kubernetes Submit Queue fcfbfecdfd Merge pull request #47856 from mikedanese/bootstrap-resume
Automatic merge from submit-queue (batch tested with PRs 47915, 47856, 44086, 47575, 47475)

kubelet should resume csr bootstrap

Right now the kubelet creates a new csr object with the same key every
time it restarts during the bootstrap process. It should resume with the
old csr object if it exists. To do this the name of the csr object must
be stable.

Issue https://github.com/kubernetes/kubernetes/issues/47855
2017-06-23 04:06:20 -07:00
Kubernetes Submit Queue 467705be00 Merge pull request #47195 from dims/bind-cadvisor-on-kubelet-interface
Automatic merge from submit-queue (batch tested with PRs 47922, 47195, 47241, 47095, 47401)

Run cAdvisor on the same interface as kubelet

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

cAdvisor currently binds to all interfaces. Currently the only
solution is to use iptables to block access to the port. We
are better off making cAdvisor to bind to the interface that
kubelet uses for better security.

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

Fixes #11710

**Special notes for your reviewer**:

**Release note**:

```release-note
cAdvisor binds only to the interface that kubelet is running on instead of all interfaces.
```
2017-06-22 21:33:27 -07:00
wlan0 38b060c4fd enable docs and man page autogeneration for cloud-controller-manager 2017-06-22 17:04:26 -07:00
Mike Danese 627c414c1b kubelet should resume csr bootstrap
Right now the kubelet creates a new csr object with the same key every
time it restarts during the bootstrap process. It should resume with the
old csr object if it exists. To do this the name of the csr object must
be stable. Also using a list watch here eliminates a race condition
where a watch event is missed and the kubelet stalls.
2017-06-22 23:45:15 +02:00
p0lyn0mial 074544b3b0 incluster config will be used when creating external shared informers.
previously the loopback configuration was used to talk to the server.
As a consequence a custom API server was unable to talk to the root API server.
2017-06-22 21:48:50 +02:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Chao Xu 7d5dbdaa09 manually fix protogen 2017-06-22 11:30:58 -07:00
Chao Xu e74c17a0ed vendorless path for informer-gen 2017-06-22 11:30:57 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu e364f5e8ee let conversion-gen to choose localSchemeBuiler 2017-06-22 10:27:42 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kubernetes Submit Queue de4c381219 Merge pull request #47877 from ixdy/update-1.7-images
Automatic merge from submit-queue

Update addons with upstream CVE fixes

**What this PR does / why we need it**: refreshes the kube-dns, metadata-proxy, and fluentd-gcp, event-exporter, prometheus-to-sd, and ip-masq-agent addons with new base images containing fixes for the following vulnerabilities:
* CVE-2016-4448
* CVE-2016-9841
* CVE-2016-9843
* CVE-2017-1000366
* CVE-2017-2616
* CVE-2017-9526

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Update kube-dns, metadata-proxy, and fluentd-gcp, event-exporter, prometheus-to-sd, and ip-masq-agent addons with new base images containing fixes for CVE-2016-4448, CVE-2016-9841, CVE-2016-9843,  CVE-2017-1000366, CVE-2017-2616, and CVE-2017-9526.
```
/assign @bowei @MrHohn @Q-Lee @crassirostris @dnardo 
/cc @dchen1107 @timstclair
2017-06-22 09:31:51 -07:00
Kubernetes Submit Queue 96716d3eb4 Merge pull request #47857 from deads2k/agg-35-routing
Automatic merge from submit-queue (batch tested with PRs 47878, 47503, 47857)

restore working aggregator and avoid duplicate informers

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

This runs the informer all the way through and makes sure its started.

@lavalamp ptal
@kubernetes/sig-api-machinery-bugs
2017-06-21 21:12:18 -07:00
Kubernetes Submit Queue aa1c8daf19 Merge pull request #47858 from mikedanese/fix
Automatic merge from submit-queue (batch tested with PRs 47851, 47824, 47858, 46099)

bump the gke-cert-controller wokers to match it's qps

This increases Issuance per second from 2.5 csrs to 5 csrs which is the theoretical limit with the current client side rate limiting.

Issue https://github.com/kubernetes/kubernetes/issues/47855
2017-06-21 15:21:17 -07:00
Jeff Grafton 405f38c43f Update kube-dns images to 1.14.3 2017-06-21 15:13:48 -07:00
deads2k f525c0815e restore working aggregator and avoid duplicate informers 2017-06-21 15:14:59 -04:00