Commit Graph

6715 Commits (abb70aee9875be5170b4a06b0fb45d4b0795c214)

Author SHA1 Message Date
Chao Wang 765e2fc788 use v1 version of advanced audit policy in kubeadm 2018-08-09 19:38:05 +08:00
Rostislav M. Georgiev dedf139288 kubeadm: Deduplicate kube-proxy image logic
Until now, kube-proxy image was handled in two separate places:

- In images.go along with the pre-pull code and without having the image
override capabilities (via UnifiedControlPlaneImage)

- In the kube-proxy manifest, where image override was possible.

This duplicates the kube-proxy image logic and makes it prone to errors.
Therefore, this change aims to deduplicate it and make it more straightforward.
This is achieved in the following ways:

- GetKubeControlPlaneImage is used for kube-proxy image fetching, thus allowing
for the image to be overriden by UnifiedControlPlaneImage.

- Remove duplicated logic from the manifest and use GetKubeControlPlaneImage to
generate the image for the manifest.

Additionally, GetKubeControlPlaneImageNoOverride is removed as the only use case
for the function is now invalid.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-08-09 12:01:26 +03:00
poothia 04ca57fa4f
Update join_test.go 2018-08-09 11:04:40 +05:30
Lucas Käldström 2ff9bd6699
Rename the KubeConfigFile field to Kubeconfig in ClientConnectionConfiguration 2018-08-08 22:25:55 +03:00
Kubernetes Submit Queue 652cebcba5
Merge pull request #67117 from xiangpengzhao/check-cfgpath
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>.

Check config path for command "kubeadm alpha phase kubelet write-env-file"

**What this PR does / why we need it**:
Explicitly check the `--config` flag of command `kubeadm alpha phase kubelet write-env-file`.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-08-08 10:23:03 -07:00
Kubernetes Submit Queue 15c2dd906e
Merge pull request #66888 from yue9944882/refactor/promote-informers-into-master-cfg
Automatic merge from submit-queue (batch tested with PRs 66394, 66888, 66932). 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>.

Promote internal/external informers into master.Config

**Release note**:

```release-note
NONE
```
xref #66386

Shorten `BuildGenericConfig`'s return list. 
Put the internal and external informers into master.Config. Previous art:


[60614d5cdc/staging/src/k8s.io/apiserver/pkg/server/config.go (L196))
2018-08-08 07:00:08 -07:00
xiangpengzhao 3f2c7b6fda Check config path for command "kubeadm alpha phase kubelet write-env-file" 2018-08-08 14:29:53 +08:00
xiangpengzhao 610ca1f60c Auto generated BUILD files. 2018-08-08 12:06:34 +08:00
xiangpengzhao 5cf9291e02 Set kubeadm version as the default version in phase command. 2018-08-08 12:05:36 +08:00
yue9944882 6bac6fafa0 promote informers into master.Config
review:

1. move informers into master extra config
2. move one post start hook into New()

fixes npe from master integration test
2018-08-08 09:35:45 +08:00
Kubernetes Submit Queue 5ed156d67b
Merge pull request #66196 from tanshanshan/fixspell1
Automatic merge from submit-queue (batch tested with PRs 66196, 67016, 66807, 67023). 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 spelling  mistakes

**What this PR does / why we need it**:
fix spelling  mistakes

**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
```
2018-08-07 11:44:02 -07:00
xiangpengzhao 9e204fe7f7 Remove the kubeadm `--skip-preflight-checks` flag 2018-08-07 20:19:54 +08:00
Ed Bartosh d64f489fa1 kubeadm: fix CRI ListKubeContainers API
Current implementation of this API always returns
checks output of 'crictl pods -q' and filters out everything
that doesn't start with k8s_. 'crictl pods -q' returns only pod ids,
so everything is always filtered out.

Removing filtering by name prefix should fix this.

Fixes: kubernetes/kubeadm#926
2018-08-07 10:59:44 +03:00
Kubernetes Submit Queue db9545e69e
Merge pull request #66386 from yue9944882/refactor/etcd-options-config
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactor storage factory config with Complete().New() flow

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

1. Split `BuildStorageFactory` constructor into `Complete().New()` flow to build an instance for etcd storage.

2. Put `EtcdOptions` and `StorageSerializationOptions` into a `StorageFactoryOptions` for a more reasonable structured config object.

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

Generally, my idea is to split the huge code in [https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-apiserver/app/server.go](https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-apiserver/app/server.go) into somewhere else making more sense :)

**Release note**:

```release-note
NONE
```
2018-08-06 20:26:02 -07:00
yue9944882 e8ae7887a5 This is a combination of 3 commits.
refactor storage factory options

review: minor changes

1. make storage factory config complete with options
2. make BuildGenericConfig private

review: move codes
2018-08-06 22:29:10 +08:00
Kubernetes Submit Queue a160fe94a5
Merge pull request #64517 from sttts/sttts-apiserver-sectioned-flags
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>.

kube-apiserver: output flags in logical sections

<img width="862" alt="bildschirmfoto 2018-06-07 um 16 21 17" src="https://user-images.githubusercontent.com/730123/41105818-d8d68440-6a6e-11e8-91ba-cc682a2c63dd.png">

```release-note
Print kube-apiserver --help flag help in sections.
```
2018-08-06 03:18:57 -07:00
Dr. Stefan Schimanski 42d533e40c apiserver: output flags in logical sections 2018-08-06 08:55:09 +02:00
Kubernetes Submit Queue e48ccceab4
Merge pull request #66823 from bart0sh/PR0026-kubeadm-fix-ImagePullCheck-output
Automatic merge from submit-queue (batch tested with PRs 64815, 66823, 66473, 66466). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: fix ImagePullCheck output

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

ImagePullCheck outputs "pulling <image>" line even if image
already exists and is not pulled.
    
Fixed the output to reflect the reality. ImagePullCheck now outputs
either "pulling <image>" or "image <image> exists".

**Release note**:
```release-note
NONE
```
2018-08-03 18:03:00 -07:00
Kubernetes Submit Queue cb1ef9f7e8
Merge pull request #64815 from dixudx/hostname_empty
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>.

error out empty hostname

**What this PR does / why we need it**:
For linux, the hostname is read from file `/proc/sys/kernel/hostname` directly, which can be overwritten with whitespaces.

Should error out such invalid hostnames.

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

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

**Release note**:

```release-note
nodes: improve handling of erroneous host names
```
2018-08-03 17:13:32 -07:00
Kubernetes Submit Queue 2cb1d64c11
Merge pull request #66822 from bart0sh/PR0025-kubeadm-runtime-fix-ImageExists
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: fix runtime.ImageExists API

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

runtime.ImageExists returns error when underlying 'inspect' command
fails. This makes ImagePullCheck to fail as it doesn't expect
runtime.ImageExists to return an error even if image doesn't exist.

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

**Release note**:
```release-note
NONE
```
2018-08-02 23:51:30 -07:00
Kubernetes Submit Queue d7bcae8b96
Merge pull request #60791 from mythi/kernel
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>.

kernel_validator: amend kernel config check paths

**What this PR does / why we need it**:
Clear Linux Project for Intel Architecture uses its own path
to store kernel build artifacts. This PR amends the path to kernel validator's 
config check paths.

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

```
e2e_node:  add new kernel config check paths
```
2018-08-02 22:32:46 -07:00
Kubernetes Submit Queue 4a54f3f0d6
Merge pull request #66779 from deads2k/api-05-easy-unit
Automatic merge from submit-queue (batch tested with PRs 66850, 66902, 66779, 66864, 66912). 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 methods to apimachinery to easy unit testing

When unit testing, you often want a selective scheme and codec factory.  Rather than writing the vars and the init function and the error handling, you can simply do

`scheme, codecs := testing.SchemeForInstallOrDie(install.Install)`

@kubernetes/sig-api-machinery-misc 
@sttts 

```release-note
NONE
```
2018-08-02 10:03:16 -07:00
Ed Bartosh 84300e781c kubeadm: fix ImagePullCheck output
ImagePullCheck outputs "pulling <image>" line even if image
already exists and is not pulled.

Fixed the output to reflect the reality. ImagePullCheck now outputs
either "pulling <image>" or "image <image> exists".
2018-08-02 11:58:52 +03:00
David Eads d3bd0eb1d5 make package name match all the import aliases 2018-08-01 15:31:12 -04:00
Joachim Bartosik 8ef369ea2d Mark --horizontal-pod-autoscaler-upscale-delay deprecated 2018-08-01 17:59:51 +02:00
Joachim Bartosik 7681c284f5 Remove UpscaleForbiddenWindow
Instead discard metric values for pods that are unready and have never
been ready (they may report misleading values, the original reason for
introducing scale up forbidden window).

Use per pod metric when pod is:
- Ready, or
- Not ready but creation timestamp and last readiness change are more
  than 10s apart.

In the latter case we asume the pod was ready but later became unready.
We want to use metrics for such pods because sometimes such pods are
unready because they were getting too much load.
2018-08-01 17:47:23 +02:00
Chao Wang 895b6d441d add space for output 2018-08-01 18:08:31 +08:00
Di Xu b3dfe0c652 nodes: improve handling of erroneous host names 2018-08-01 14:57:25 +08:00
Chao Wang 39a4730db6 remove duplicated import 2018-08-01 13:27:42 +08:00
Kubernetes Submit Queue 65ba40c2b0
Merge pull request #66445 from rosti/kubeadm-test-cmd-init
Automatic merge from submit-queue (batch tested with PRs 66445, 66643, 60551). 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: Improve kubeadm init cmd tests

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

This PR improves kubeadm init cmd tests in the following ways:

- Fix a few cases that were always successful (despite completely wrong).
- Add more test cases (for different configs in particular)
- Use dry run, to avoid modifying the system and using kubeadm reset

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

**Special notes for your reviewer**:
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/assign @luxas
/assign @timothysc

**Release note**:

```release-note
NONE
```
2018-07-31 15:56:04 -07:00
Kubernetes Submit Queue 5e546893f7
Merge pull request #66623 from deads2k/gc-01-graph
Automatic merge from submit-queue (batch tested with PRs 66623, 66718). 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>.

expose GC graph via debug handler

Many times when debugging GC problems, it's important to understand the state of the GC graph at a given point in time.  This pull adds the ability to dump that graph in DOT format for later consumption.  It does this by exposing an additional debug handler and allowing any controller init function to produce such a handler that is included under debug.

Sample full output
```
curl http://localhost:10252/debug/controllers/garbagecollector/graph
digraph full {
  // Node definitions.
  0 [
    label="uid=8581a030-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Pod.v1/kube-dns-7b479ccbc6-qz468
"
    group=""
    version="v1"
    kind="Pod"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6-qz468"
    uid="8581a030-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  1 [
    label="uid=822052fc-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Deployment.v1.apps/kube-dns
"
    group="apps"
    version="v1"
    kind="Deployment"
    namespace="kube-system"
    name="kube-dns"
    uid="822052fc-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  2 [
    label="uid=857bd8ac-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
ReplicaSet.v1.apps/kube-dns-7b479ccbc6
"
    group="apps"
    version="v1"
    kind="ReplicaSet"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6"
    uid="857bd8ac-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];

  // Edge definitions.
  0 -> 2;
  2 -> 1;
}
```

You can also select via UID and have all transitive dependencies output:
```
curl http://localhost:10252/debug/controllers/garbagecollector/graph?uid=8581a030-9043-11e8-ad4a-54e1ad486dd3
digraph full {
  // Node definitions.
  0 [
    label="uid=822052fc-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Deployment.v1.apps/kube-dns
"
    group="apps"
    version="v1"
    kind="Deployment"
    namespace="kube-system"
    name="kube-dns"
    uid="822052fc-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  1 [
    label="uid=8581a030-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Pod.v1/kube-dns-7b479ccbc6-qz468
"
    group=""
    version="v1"
    kind="Pod"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6-qz468"
    uid="8581a030-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  2 [
    label="uid=857bd8ac-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
ReplicaSet.v1.apps/kube-dns-7b479ccbc6
"
    group="apps"
    version="v1"
    kind="ReplicaSet"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6"
    uid="857bd8ac-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];

  // Edge definitions.
  1 -> 2;
  2 -> 0;
}
```

And with some sample rendering:
```
curl http://localhost:10252/debug/controllers/garbagecollector/graph  | dot -T svg -o project.svg
```

produces

![gc](https://user-images.githubusercontent.com/8225098/43223895-8e33c126-9022-11e8-8ad9-6b2f986fd974.png)


@kubernetes/sig-api-machinery-pr-reviews 
/assign @caesarxuchao @liggitt 

```release-note
NONE
```
2018-07-31 08:05:03 -07:00
Ed Bartosh c086c235f2 kubeadm: fix runtime.ImageExists API
This API return error when underlying 'inspect' command
fails. This makes ImagePullCheck to fail as it doesn't expect
runtime.ImageExists to return an error even if image doesn't exist.

Fixed this by returning error nil even when inspect command fails.
2018-07-31 13:50:12 +03:00
Kubernetes Submit Queue 2bee858a7b
Merge pull request #66284 from stewart-yu/stewart-sharedtype-move
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 the` k8s.io/kubernetes/pkg/util/pointer` package to` k8s.io/utils/pointer`

**What this PR does / why we need it**:
Move `k8s.io/kubernetes/pkg/util/pointer` to  `shared utils` directory, so that we can use it  easily.
Close #66010 accidentally, and can't reopen it, so the same as #66010 

**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
```
2018-07-30 19:50:36 -07:00
Kubernetes Submit Queue 0c1f933693
Merge pull request #66726 from liggitt/kubelet-server
Automatic merge from submit-queue (batch tested with PRs 62444, 66358, 66724, 66726). 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 kubelet serving cert rotation to beta

xref https://github.com/kubernetes/features/issues/267

This is exercised in the alpha gke e2es, and can be enabled in the non-alpha gke e2es once it no longer requires an alpha feature gate.

```release-note
Kubelet serving certificate bootstrapping and rotation has been promoted to beta status.
```
2018-07-27 22:17:09 -07:00
Kubernetes Submit Queue a8641258b6
Merge pull request #62444 from tianshapjq/refactor-server.go
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>.

refactor server.go to simplify the invokes to kubeFlags and KubeConfiguration

**What this PR does / why we need it**:
Since kubeFlags and KubeletConfiguration have been fields of KubeletServer, we just need to pass the reference of KubeletServer to the following functions. This will simplify the migrations of flags such as BootstrapCheckpointPath and others, as we don't have to specify from which object the migrated field comes.

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

**Release note**:

```release-note
NONE
```
2018-07-27 21:03:05 -07:00
stewart-yu f1343af5d7 auto-generated file 2018-07-28 07:54:17 +08:00
stewart-yu 649b46ff1d fix verify about import error 2018-07-28 07:54:16 +08:00
Jordan Liggitt 56e0a571c0
Move kubelet serving cert rotation to beta 2018-07-27 16:06:04 -04:00
Kubernetes Submit Queue 2ffbaa13d0
Merge pull request #66681 from xlgao-zju/use-constant
Automatic merge from submit-queue (batch tested with PRs 66554, 66616, 66695, 66681). 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 KubeletRunDirectory instead of hard-coded way

**What this PR does / why we need it**:
fix `TODO: Make hard-coded "/var/lib/kubelet" strings reference this constant.`

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

**Release note**:

```release-note
NONE
```
2018-07-27 10:09:14 -07:00
Kubernetes Submit Queue f7641e8710
Merge pull request #66482 from dixudx/kubeadm_use_existing_config
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm join the cluster with pre-existing client certificate if provided

**What this PR does / why we need it**:
support `kubeadm join` with a pre-existing client certificate

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

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

**Release note**:

```release-note
kubeadm now can join the cluster with pre-existing client certificate if provided
```
2018-07-27 05:54:27 -07:00
stewart-yu 55251c716a update the import file for move util/pointer to k8s.io/utils 2018-07-27 19:47:02 +08:00
Mikko Ylinen cc117866bd kernel_validator: amend kernel config check paths
Clear Linux Project for Intel Architecture uses its own path
to store kernel build artifacts. This is documented, e.g.,
in https://github.com/clearlinux/clr-boot-manager.

Adapt kernel validator's config check paths to include Clear
Linux's path too.
2018-07-27 09:07:12 +03:00
Xianglin Gao 6ca1428256 Use KubeletRunDirectory instead of hard-coded way
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-07-27 12:22:57 +08:00
Kubernetes Submit Queue 62891a6f2d
Merge pull request #66658 from dixudx/misleading_kubeadm_image_check
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 misleading error message on image pulling

**What this PR does / why we need it**:
Actually all the images needed have already been cached locally already as we have pulled them using `crictl`/`docker` in the preflight checks.

The error here is misleading, which should be removed.

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

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

**Release note**:

```release-note
kubeadm: remove misleading error message regarding image pulling
```
2018-07-26 16:48:56 -07:00
David Eads fb7d137ea2 add debug handler capability for individual controllers 2018-07-26 13:24:36 -04:00
Di Xu 997a612206 kubeadm join the cluster with pre-existing client certificate 2018-07-26 19:34:09 +08:00
xushiwei 00425595 fed8572745 use apps/v1 version for scheduler 2018-07-26 17:37:29 +08:00
Di Xu 3c23905781 remove misleading error message on image pulling 2018-07-26 17:07:59 +08:00
liangwenguo 59a6e658d8 fix grammar error: the predicate verb should be the third person. 2018-07-26 16:51:01 +08:00
Kubernetes Submit Queue d9f02d90be
Merge pull request #66299 from mikedanese/cleanup1
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>.

pkg/controller: remove old clientbuilder methods

everything has moved to client-go now so these are the same as the original Client* methods. The only functional change is the collapse of the "horizontal-pod-autoscaler" from one client to two. This should have no effect because the GoClient was used only for discovery.

```release-note
NONE
```
2018-07-26 00:13:01 -07:00
Kubernetes Submit Queue 2755000b3e
Merge pull request #66499 from rosti/kubedns-images
Automatic merge from submit-queue (batch tested with PRs 66291, 66471, 66499). 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: Pull sidecar and dnsmasq-nanny images when using kube-dns

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

It appears that sidecar and dnsmasq-nanny images are now required for
kube-dns deployment to work correctly. Thus the following default kube-dns
images are used now:

- k8s.gcr.io/k8s-dns-kube-dns-amd64:1.14.10
- k8s.gcr.io/k8s-dns-sidecar-amd64:1.14.10
- k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64:1.14.10

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

**Special notes for your reviewer**:

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/assign @luxas
/assign @timothysc
/kind bug

**Release note**:

```release-note
kubeadm: Pull sidecar and dnsmasq-nanny images when using kube-dns
```
2018-07-24 14:00:01 -07:00
Ed Bartosh 02bab4af63 kubeadm: make error output more verbose
Included error output of the docker/crictl into the
kubeadm error output. This should help users to understand better
why runtime is failing.
2018-07-24 13:49:23 +03:00
Rostislav M. Georgiev fb7ba52341 kubeadm: Pull sidecar and dnsmasq-nanny images when using kube-dns
It appears that sidecar and dnsmasq-nanny images are now required for
kube-dns deployment to work correctly. Thus the following default kube-dns
images are used now:

- k8s.gcr.io/k8s-dns-kube-dns-amd64:1.14.10
- k8s.gcr.io/k8s-dns-sidecar-amd64:1.14.10
- k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64:1.14.10

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-07-24 13:35:27 +03:00
Kubernetes Submit Queue c6e91c1f0c
Merge pull request #66382 from bart0sh/PR0023-kubeadm-config-rename-cri-socket-path
Automatic merge from submit-queue (batch tested with PRs 66296, 66382). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: rename cri-socket-path -> cri-socket

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

Renamed command line option cri-socket-path for 2 reasons:
- to be consistent with the rest of kubeadm code
  reset/init/join/apply subcommands use --cri-socket
- name is misleading as CRI socket can be also an url, not just a path


**Release note**:
```release-note
renamed command line option  --cri-socket-path of the kubeadm subcommand "kubeadm config images pull" to --cri-socket to be consistent with the rest of kubeadm subcommands.
```
2018-07-23 17:26:04 -07:00
tianshapjq 57e0f05fad refactor cmd/kubelet/app/server.go to simplify the kubeFlags and KubeletConfiguration invokes 2018-07-23 19:07:26 +08:00
Rostislav M. Georgiev 961d776fac kubeadm: Improve kubeadm init cmd tests
kubeadm init cmd tests are improved in the following ways:

- Fix a few cases that were always successful (despite completely wrong).
- Add more test cases (for different configs in particular)
- Use dry run, to avoid modifying the system and using kubeadm reset

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-07-23 12:32:51 +03:00
Ed Bartosh b9006648f2 kubeadm: rename cri-socket-path -> cri-socket
Renamed command line option cri-socket-path for 2 reasons:
- to be consistent with the rest of kubeadm code
  reset/init/join/apply subcommands use --cri-socket
- name is misleading as CRI socket can be also an url,
  not just a path
2018-07-23 11:55:04 +03:00
Lee Verberne 7c558fb7bb Remove kubelet-level docker shared pid flag
The --docker-disable-shared-pid flag has been deprecated since 1.10 and
has been superceded by ShareProcessNamespace in the pod API, which is
scheduled for beta in 1.12.
2018-07-22 16:54:44 +02:00
Kubernetes Submit Queue 098e971c68
Merge pull request #66341 from runiq/kubeadm-no-uid-in-spec
Automatic merge from submit-queue (batch tested with PRs 66341, 66405, 66403, 66264, 66447). 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: stop setting UID in the kubelet ConfigMap

**What this PR does / why we need it**: kubeadm: stop setting UID in the kubelet ConfigMap

**Which issue(s) this PR fixes**:

Fixes https://github.com/kubernetes/kubeadm/issues/921#

**Release note**:
```release-note
kubeadm: stop setting UID in the kubelet ConfigMap
```
2018-07-20 16:02:05 -07:00
Kubernetes Submit Queue 4ca548201f
Merge pull request #66278 from bart0sh/PR0021-kubeadm-wrap-tests-in-T.Run
Automatic merge from submit-queue (batch tested with PRs 66152, 66406, 66218, 66278, 65660). 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: wrap runtime tests in a t.Run

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

Improved runtime tests by using [T.Run API](https://golang.org/pkg/testing/#T.Run) 

This should improve testing output and make it more visible
which test is doing what.

**Which issue(s) this PR fixes**:

This PR addresses [this review comment](https://github.com/kubernetes/kubernetes/pull/64611#pullrequestreview-137441722) 

**Release note**:
```release-note
NONE
```
2018-07-20 12:12:19 -07:00
Kubernetes Submit Queue 6c500be080
Merge pull request #66218 from atlassian/handle-errors
Automatic merge from submit-queue (batch tested with PRs 66152, 66406, 66218, 66278, 65660). 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>.

Handle errors

**What this PR does / why we need it**:
This is a followup PR for https://github.com/kubernetes/kubernetes/pull/64664 to handle errors returned from `.AddToScheme()` in places where they are not handled.

**Release note**:
```release-note
NONE
```
/kind cleanup
/sig api-machinery
/cc @sttts
2018-07-20 12:12:15 -07:00
Kubernetes Submit Queue d2cc34fb07
Merge pull request #65771 from smarterclayton/untyped
Automatic merge from submit-queue (batch tested with PRs 65771, 65849). 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 a new conversion path to replace GenericConversionFunc

reflect.Call is very expensive. We currently use a switch block as part of AddGenericConversionFunc to avoid the bulk of top level a->b conversion for our primary types which is hand-written. Instead of having these be handwritten, we should generate them.

The pattern for generating them looks like:

```
scheme.AddConversionFunc(&v1.Type{}, &internal.Type{}, func(a, b interface{}, scope conversion.Scope) error {
  return Convert_v1_Type_to_internal_Type(a.(*v1.Type), b.(*internal.Type), scope)
})
```

which matches AddDefaultObjectFunc (which proved out the approach last year). The
conversion machinery should then do a simple map lookup based on the incoming types and invoke the function.  Like defaulting, it's up to the caller to match the types to arguments, which we do by generating this code.  This bypasses reflect.Call and in the future allows Golang mid-stack inlining to optimize this code.

As part of this change I strengthened registration of custom functions to be generated instead of hand registered, and also strengthened error checking of the generator when it sees a manual conversion to error out.  Since custom functions are automatically used by the generator, we don't really have a case for not registering the functions.

Once this is fully tested out, we can remove the reflection based path and the old registration methods, and all conversion will work from point to point methods (whether generated or custom).

Much of the need for the reflection path has been removed by changes to generation (to omit fields) and changes to Go (to make assigning equivalent structs easy).

```release-note
NONE
```
2018-07-19 09:29:00 -07:00
Patrice Peterson a20ff91c4c kubeadm: stop setting UID in the kubelet ConfigMap
Fixes #921.
2018-07-19 10:34:05 +02:00
Kubernetes Submit Queue 990b3d707c
Merge pull request #66282 from bart0sh/PR0022-kubeadm-require-crictl-only-for-CRI-runtime
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>.

check for crictl executable only for CRI runtime

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

crictl is not used for docker runtime, so InPathCheck check can be skipped for docker.

**Release note**:
```release-note
NONE
```
2018-07-18 10:01:53 -07:00
Clayton Coleman 90b5fbe876
generated: bazel 2018-07-17 23:02:16 -04:00
Clayton Coleman ef561ba8b5
generated: Avoid use of reflect.Call in conversion code paths 2018-07-17 23:02:16 -04:00
Mike Danese efb8827215 pkg/controller: remove old clientbuilder methods
everything has moved to client-go now so these are the same as the
original Client* methods.
2018-07-17 09:06:59 -07:00
Mikhail Mazurskiy 5cab7f9a57
Handle errors 2018-07-17 20:47:14 +10:00
Kubernetes Submit Queue 53151500fb
Merge pull request #66212 from metadave/dp_kubeadm_upgrade_diff_todo
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix kubeadm upgrade diff -config TODO

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

This PR addresses a TODO in `kubeadm upgrade diff` for the `-config` flag to use `options.AddConfigFlag()` instead of `cmd.Flags().StringVar()`.


**Which issue(s) this PR fixes** 

None

**Special notes for your reviewer**:

/sig kubernetes/sig-cluster-lifecycle-pr-reviews

**Release note**:
```release-note
NONE
```
2018-07-17 03:19:27 -07:00
Ed Bartosh 95eb821674 check for crictl executable only for CRI runtime
crictl is not used for docker runtime, so this check
can be skipped when using docker.
2018-07-17 12:51:21 +03:00
Ed Bartosh ad16fbc5a6 kubeadm: wrap runtime tests in a t.Run
Improved runtime tests by using T.Run API:
https://golang.org/pkg/testing/#T.Run

This should improve the test output and make it more visible
which test is doing what.
2018-07-17 11:34:02 +03:00
Kubernetes Submit Queue 0e097af8d8
Merge pull request #65952 from luxas/kubeadm_init_join_exclusive
Automatic merge from submit-queue (batch tested with PRs 63877, 64559, 65952). 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 the kubeadm config kinds mutually exclusive

**What this PR does / why we need it**:
Right now it would be possible to feed kubeadm with a YAML document with all the four different Config kinds kubeadm at HEAD supports, `MasterConfiguration`, `InitConfiguration`, `JoinConfiguration` and `NodeConfiguration`. This PR makes them mutually exclusive so that kubeadm can know how to handle the config file properly.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref: kubernetes/kubeadm#911
Depends on:
 - [x] https://github.com/kubernetes/kubernetes/pull/65776
 - [x] https://github.com/kubernetes/kubernetes/pull/65628
 - [x] https://github.com/kubernetes/kubernetes/pull/65629
 - [x] https://github.com/kubernetes/kubernetes/pull/65631
 - [x] https://github.com/kubernetes/kubernetes/pull/65940
 - [x] https://github.com/kubernetes/kubernetes/pull/65787
 - [x] https://github.com/kubernetes/kubernetes/pull/65945
 - [x] https://github.com/kubernetes/kubernetes/pull/65951

**Special notes for your reviewer**:
Please only review the last commit

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2018-07-16 17:00:09 -07:00
Kubernetes Submit Queue ac4715d6ac
Merge pull request #64611 from bart0sh/PR0017-kubeadm-create-Container-Runtime
Automatic merge from submit-queue (batch tested with PRs 65429, 64611). 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 details into ContainerRuntime

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

This PR moves all docker and CRI specifics into new ContainerRuntime
entity to isolate container runtime details from the rest of the code.

This should help to avoid having CRI and docker specific checks and code all over the place.

**NOTE: this is a not a finished work, but rather an RFC.**

Things to do:
- test manually in docker and cri-o environments

**Release note**:

```release-note
NONE
```
2018-07-16 14:17:02 -07:00
Ed Bartosh e0dd6cc3db add test cases for kubeadm/app/util/runtime
covered ContainerRuntime API with test cases
2018-07-16 12:20:10 +03:00
Ed Bartosh bfb08bbb7b move runtime details into ContainerRuntime
Created ContainerRuntime and used it in preflight checks,
'reset' and 'image' modules.
2018-07-16 12:20:04 +03:00
hangaoshuai c0cc3ee82f fixtodo: add unit test for function FetchConfigFromFileOrCluster 2018-07-16 09:53:17 +08:00
Kubernetes Submit Queue c861ceb41a
Merge pull request #66116 from chenyb4/kubeadm_check
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix kubeadm checks import error

kubeadm checks package import path exist "kubernetes/test",
So change the import path.
* move "k8s.io/kubernetes/test/e2e_node/system" directory file
  tto "k8s.io/kubernetes/cmd/kubeadm/app/util/system" and change checks import
* remove "k8s.io/kubernetes/test/e2e_node/system" directory

Issues report link:
https://github.com/kubernetes/kubeadm/issues/976

Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>



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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-15 14:52:43 -07:00
Lucas Käldström 728b30b3f1 kubeadm: Make the kubeadm config kinds mutually exclusive 2018-07-15 12:59:58 +02:00
Dave Parfitt 107eaf1928 Fix kubeadm upgrade TODOs
Fix several TODO's related to using a generic flag registration method
for --config and --kubeconfig in kubeadm.
2018-07-14 16:32:37 -04:00
Kubernetes Submit Queue 49454a2635
Merge pull request #65576 from stewart-yu/stewart-kubelet-read#02
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[kubeadm]fix DynamicKubeletConfig feature to beta

**What this PR does / why we need it**:
As [PR](https://github.com/kubernetes/kubernetes/pull/64275) get merged,  DynamicKubeletConfig feature convert to  `beta` in v1.11, and set to `true` in default.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-14 03:04:43 -07:00
Kubernetes Submit Queue af8a1dba68
Merge pull request #65951 from luxas/kubeadm_joinconfig
Automatic merge from submit-queue (batch tested with PRs 66138, 65951). 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>.

Rename `NodeConfiguration` to `JoinConfiguration` in the kubeadm v1alpha3 Config API

**What this PR does / why we need it**:
In v1alpha3, we have made the design decision that `NodeConfiguration` will be renamed `JoinConfiguration`. This PR implements that change. 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref: kubernetes/kubeadm#911
Depends on:
 - [x] https://github.com/kubernetes/kubernetes/pull/65776
 - [x] https://github.com/kubernetes/kubernetes/pull/65628
 - [x] https://github.com/kubernetes/kubernetes/pull/65629
 - [x] https://github.com/kubernetes/kubernetes/pull/65631
 - [x] https://github.com/kubernetes/kubernetes/pull/65940
 - [x] https://github.com/kubernetes/kubernetes/pull/65787
 - [ ] https://github.com/kubernetes/kubernetes/pull/65945

**Special notes for your reviewer**:

Please only review the last three commits here.

**Release note**:

```release-note
[action required] The `NodeConfiguration` kind in the kubeadm v1alpha2 API has been renamed `JoinConfiguration` in v1alpha3
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2018-07-13 20:09:08 -07:00
tanshanshan f68af9e584 fix spell 2018-07-14 10:05:56 +08:00
Kubernetes Submit Queue bc25b1a708
Merge pull request #65676 from dkoshkin/kubeadm-version-timeout
Automatic merge from submit-queue (batch tested with PRs 66094, 65676). 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 a timeout when fetching latest version

**What this PR does / why we need it**:
When there is no internet on the node and `--kubernetes-versio`n is not specified running `kubeadm init` hangs forever with no text output.

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

**Special notes for your reviewer**:
Using the same duration as the existing timeout `externalEtcdRequestTimeout`

Sample output:
```
kubeadm init
unable to get URL "https://dl.k8s.io/release/stable-1.11.txt": Get https://dl.k8s.io/release/stable-1.11.txt: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
```

**Release note**:

```release-note
kubeadm: use an HTTP request timeout when fetching the latest version of Kubernetes from dl.k8s.io
```
2018-07-13 16:04:06 -07:00
fabriziopandini 21baef255b autogenerated 2018-07-13 23:06:34 +02:00
fabriziopandini 54b16cbd9e Rename NodeConfiguration to JoinConfiguration in v1alpha3, but support both names for this release of kubeadm 2018-07-13 23:06:17 +02:00
fabriziopandini a6b0410f83 Automated rename from NodeConfiguration to JoinConfiguration 2018-07-13 22:52:41 +02:00
Kubernetes Submit Queue 60ca804515
Merge pull request #65832 from sttts/sttts-apiserver-reusable-loopback-logic
Automatic merge from submit-queue (batch tested with PRs 65832, 66160, 66145). 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: make loopback logic in SecureServingOptions reusable

For reuse in other components this PR separates the loopback logic from the GenericApiServer config.
2018-07-13 13:22:04 -07:00
Kubernetes Submit Queue c174e4121f
Merge pull request #65900 from bart0sh/PR0020-cri-socket-not-abspath
Automatic merge from submit-queue (batch tested with PRs 65899, 65900). 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 CRI socket validatioin

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

CRI socket doesn't have to be an absolute path, it should be an url.
However, attempt to use it as an url in 'kubeadm init' command line
causes this validation error:

$ sudo ./kubeadm init --cri-socket unix:///var/run/crio/crio.sock
nodeRegistration.criSocket: Invalid value:
"unix:///var/run/crio/crio.sock": path is not absolute

Fixed by adding ValidateSocket function and using it in the 
ValidateNodeRegistrationOptions check instead of ValidateAbsolutePath.

**Which issue(s) this PR fixes** :

[#928](https://github.com/kubernetes/kubeadm/issues/928)

**Release note**:
```release-note
NONE
```
2018-07-13 10:10:05 -07:00
Dr. Stefan Schimanski dc0a736d1e apiserver: make loopback logic in SecureServingOptions reusable 2018-07-13 13:04:57 +02:00
Dr. Stefan Schimanski c1c564fd4d apiserver: add SecureServingOptions.ExternalAddress
Before this the advertised IP (which shows up in the server cert) in case of
listening to loopback was the first host interface IP. This makes self-signed
certs non-constant, such that we cannot use fixtures.
2018-07-13 09:49:54 +02:00
Dr. Stefan Schimanski 7deccb5b7a apiserver: use fixtures for self-signed certs in test server 2018-07-13 09:49:54 +02:00
Yuanbin.Chen f2eee3fe2a Fix kubeadm checks import error
kubeadm checks package import path exist "kubernetes/test",
So change the import path.

  * move "k8s.io/kubernetes/test/e2e_node/system" directory file
    to "k8s.io/kubernetes/cmd/kubeadm/app/util/system"
  * change system package import path
  * remove "k8s.io/kubernetes/test/e2e_node/system" directory

Issues report link:
https://github.com/kubernetes/kubeadm/issues/976

Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>
2018-07-13 14:27:46 +08:00
Kubernetes Submit Queue 64eb015471
Merge pull request #66074 from rosti/print-default
Automatic merge from submit-queue (batch tested with PRs 66136, 64999, 65425, 66120, 66074). 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: Printable default component configs

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

This PR makes default component configs printable via `kubeadm config print-default`.
Component configs are not printed by default. You have to explicitly request
that for concrete API objects via the `--api-objects` command line parameter.
For a list of possible API objects use the help option.

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

**Special notes for your reviewer**:
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/assign @luxas
/assign @timothysc
/kind feature

**Release note**:

```release-note
kubeadm: Default component configs are printable via kubeadm config print-default
```
2018-07-12 15:14:23 -07:00
Kubernetes Submit Queue fce58d25ac
Merge pull request #65425 from islinwb/ipvs_cleanup_rules
Automatic merge from submit-queue (batch tested with PRs 66136, 64999, 65425, 66120, 66074). 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>.

Not step into ipvs.CleanupLeftovers() if canUseIPVS's false

**What this PR does / why we need it**:
Earlier we decide whether we should clean up the left-over ipvs rules inside `ipvs.CleanupLeftovers()`, therefore we call function  `ipvs.CanUseIPVSProxier()` two times (and `GetModules()` two times).  Actually no need to step into `ipvs.CleanupLeftovers()` if `canUseIPVS` is false.

**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
```
2018-07-12 15:14:16 -07:00
Kubernetes Submit Queue a54d7c6df3
Merge pull request #64999 from islinwb/nodeip_ipv6
Automatic merge from submit-queue (batch tested with PRs 66136, 64999, 65425, 66120, 66074). 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>.

Get ipv6 nodeIP when in ipv6 cluster

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-12 15:14:12 -07:00
fabriziopandini f9000a3f8a kubeadm-ha-phases 2018-07-12 16:45:12 +02:00
Ed Bartosh 2c764c4b7f fix CRI socket validatioin
CRI socket doesn't have to be an absolute path, it should be an url.
However, attempt to use it as an url in 'kubeadm init' command line
causes this validation error:

$ sudo ./kubeadm init --cri-socket unix:///var/run/crio/crio.sock
nodeRegistration.criSocket: Invalid value:
"unix:///var/run/crio/crio.sock": path is not absolute

Fixed by adding ValidateSocket function and using it in the
ValidateNodeRegistrationOptions check instead of ValidateAbsolutePath.
2018-07-12 14:00:47 +03:00
Rostislav M. Georgiev a899760fef kubeadm: Printable default component configs
Make default component configs printable via `kubeadm config print-default`.
Component configs are not printed by default. You have to explicitly request
that for concrete API objects via the `--api-objects` command line parameter.
For a list of possible API objects use the help option.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-07-12 12:42:16 +03:00
Kubernetes Submit Queue 0972ce1acc
Merge pull request #65649 from rsc/fix-printf
Automatic merge from submit-queue (batch tested with PRs 66076, 65792, 65649). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubernetes: fix printf format errors

These are all flagged by Go 1.11's
more accurate printf checking in go vet,
which runs as part of go test.

```release-note
NONE
```
2018-07-11 14:09:08 -07:00
Weibin Lin 69398f8411 Get ipv6 nodeIP when in ipv6 cluster 2018-07-11 15:37:43 +08:00