Commit Graph

4490 Commits (c0287ce4207f4a3de158bfe4cf9a704ae5ac157e)

Author SHA1 Message Date
Kubernetes Submit Queue c0287ce420 Merge pull request #47316 from k82cn/k8s_47315
Automatic merge from submit-queue (batch tested with PRs 48981, 47316, 49180)

Added golint check for pkg/kubelet.

**What this PR does / why we need it**:
Added golint check for pkg/kubelet, and make golint happy.

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

**Release note**:
```release-note-none
```
2017-07-19 11:21:25 -07:00
Kubernetes Submit Queue cb1f42ad18 Merge pull request #49137 from deads2k/proxier-01-really-nil
Automatic merge from submit-queue (batch tested with PRs 49058, 49072, 49137, 49182, 49045)

check for nil value in interface for proxier health

golang allows for a non-nil interface to have a nil value (not type).  This results in an NPE at runtime.

@sttts remember that bit about go?  Trivia becomes real :(
2017-07-19 10:27:25 -07:00
deads2k 6d21f37aee check for nil value in interface for proxier health 2017-07-19 08:13:52 -04:00
Kubernetes Submit Queue defbe45397 Merge pull request #49130 from deads2k/server-30-admission
Automatic merge from submit-queue (batch tested with PRs 48043, 48200, 49139, 36238, 49130)

expose RegisterAllAdmissionPlugins so that admission chains can be reused

Exposes the admission plugin registration functions so that sets of plugins can be re-used.

@sttts @p0lyn0mial
2017-07-19 01:57:36 -07:00
Kubernetes Submit Queue 495f5b261f Merge pull request #49139 from deads2k/cli-15-proxy-defaults
Automatic merge from submit-queue (batch tested with PRs 48043, 48200, 49139, 36238, 49130)

expose method to allow externally setting defaults on an external type

The options are an exposed type.  This allows you to set the defaults on them.

@derekwaynecarr who normally owns this bit?
2017-07-19 01:57:30 -07:00
Kubernetes Submit Queue effcdda0ce Merge pull request #49055 from mbohlool/bugfix2
Automatic merge from submit-queue (batch tested with PRs 49055, 49128, 49132, 49134, 49110)

OpenAPI bug: Array/Map Ptr Elements' handing was incorrect

If you have an array of map of pointers, OpenAPI spec generation would fail.

fixes: #49074
2017-07-18 21:54:18 -07:00
Klaus Ma 63b78a37e0 Added golint check for pkg/kubelet. 2017-07-19 11:33:06 +08:00
Kubernetes Submit Queue ccaaf5cad5 Merge pull request #48232 from caesarxuchao/move-admission-v1alph1
Automatic merge from submit-queue (batch tested with PRs 48702, 48965, 48740, 48974, 48232)

Move admission/v1alpha1 to k8s.io/api

Fix https://github.com/kubernetes/kubernetes/issues/47972
2017-07-18 20:06:21 -07:00
Kubernetes Submit Queue fc1d2b3be7 Merge pull request #48256 from xiangpengzhao/move-pkg-util
Automatic merge from submit-queue (batch tested with PRs 48481, 48256)

Refactor: pkg/util into sub-pkgs

**What this PR does / why we need it**:
- move code in pkg/util into sub-pkgs
- delete some unused funcs

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

**Special notes for your reviewer**:
This is the final work of #15634. It will close that issue.
/cc @thockin 

**Release note**:

```release-note
NONE
```
2017-07-18 18:19:19 -07:00
Chao Xu 57a96ca40a move admission/v1alpha1 to k8s.io/api 2017-07-18 13:26:20 -07:00
Kubernetes Submit Queue bc2e5381e9 Merge pull request #49102 from aleksandra-malinowska/kubemark-node-provider-id
Automatic merge from submit-queue (batch tested with PRs 46094, 48544, 48807, 49102, 44174)

add InstanceID to fake cadvisor (used in Kubemark)

This change is for setting Node.Spec.ProviderID field in Kubemark hollow nodes. It shouldn't affect other tests using cadvisor.Fake as field is nil by default.

cc @gmarek
2017-07-18 11:20:57 -07:00
Kubernetes Submit Queue 5bbdfc6661 Merge pull request #48544 from sttts/sttts-typed-deepcopy-1.8
Automatic merge from submit-queue (batch tested with PRs 46094, 48544, 48807, 49102, 44174)

Static deepcopy – phase 1

This PR is the follow-up of https://github.com/kubernetes/kubernetes/pull/36412, replacing the
dynamic reflection based deepcopy with static DeepCopy+DeepCopyInto methods on API types.

This PR **does not yet** include the code dropping the cloner from the scheme and all the
porting of the calls to scheme.Copy. This will be part of a follow-up "Phase 2" PR.

A couple of the commits will go in first:
- [x] audit: fix deepcopy registration  https://github.com/kubernetes/kubernetes/pull/48599
- [x] apimachinery+apiserver: separate test types in their own packages #48601 
- [x] client-go: remove TPR example #48604
- [x] apimachinery: remove unneeded GetObjectKind() impls #48608 
- [x] sanity check against origin, that OpenShift's types are fine for static deepcopy https://github.com/deads2k/origin/pull/34

TODO **after** review here:
- [x] merge https://github.com/kubernetes/gengo/pull/32 and update vendoring commit
2017-07-18 11:20:51 -07:00
deads2k 41a4faa611 expose method to allow externally setting defaults on an external type 2017-07-18 13:56:25 -04:00
deads2k b00d19608a expose RegisterAllAdmissionPlugins so that admission chains can be built reused 2017-07-18 13:30:06 -04:00
Kubernetes Submit Queue 4103f40fc2 Merge pull request #49046 from luxas/kubeadm_markmaster_phase
Automatic merge from submit-queue (batch tested with PRs 48333, 48806, 49046)

kubeadm: Split out markmaster to its own phase

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

Splits out related and atomic code into its own phase that can be invokable easily from the CLI.
Makes the code much easier to read by not using recursion and `wait.InfinitePoll` _inside_ of a recursing function, etc.

**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/53
Part of this more long-term goal: https://github.com/kubernetes/kubeadm/issues/148

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-07-18 06:25:05 -07:00
Aleksandra Malinowska c174625116 add InstanceID to fake cadvisor (used in Kubemark) 2017-07-18 12:10:54 +02:00
Alexander Kanevskiy ef048142a5 Cleanup usage of cmd/kubeadm/app/images in addons
Maintain kube-proxy DaemonSet definition in one place
2017-07-18 11:24:15 +03:00
Lucas Käldström 0d3218faef
kubeadm: Split out markmaster to its own phase 2017-07-18 11:08:43 +03:00
Dr. Stefan Schimanski 8dd0989b39 Update generated code 2017-07-18 09:28:49 +02:00
Dr. Stefan Schimanski 39d95b9b06 deepcopy: add interface deepcopy funcs
- add DeepCopyObject() to runtime.Object interface
- add DeepCopyObject() via deepcopy-gen
- add DeepCopyObject() manually
- add DeepCopySelector() to selector interfaces
- add custom DeepCopy func for TableRow.Cells
2017-07-18 09:28:47 +02:00
xiangpengzhao 01daf707c5 Refactor: pkg/util into sub-pkgs 2017-07-18 14:34:08 +08:00
mbohlool 4a7e1df8e0 OpenAPI bug: Array/Map Ptr Elements' handing was incorrect 2017-07-17 22:45:30 -07:00
Kubernetes Submit Queue d3ff93efff Merge pull request #49018 from luxas/kubeadm_cleanup_kubernetesdir
Automatic merge from submit-queue (batch tested with PRs 49019, 48919, 49040, 49018, 48874)

kubeadm: Remove the old KubernetesDir envparam

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

The last piece of https://github.com/kubernetes/kubernetes/issues/48053 for moving the env params into the API, and the KubernetesDir into a constant.

After this pretty mechanical change, we might offer short-hand functions in constants like `GetStaticPodManifestDir()` etc easily in order to centralize the `filepath.Join` logic into one place.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
cc @kubernetes/sig-cluster-lifecycle-pr-reviews @fabriziopandini
2017-07-17 21:25:11 -07:00
Kubernetes Submit Queue 023fed7176 Merge pull request #49019 from luxas/kubeadm_remove_old_comments
Automatic merge from submit-queue

kubeadm: Remove some old comments

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

Removes old and outdated comments.

**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
```
@dmmcquay
2017-07-17 21:13:59 -07:00
Kubernetes Submit Queue 96f7788f78 Merge pull request #48797 from FengyunPan/fix-empty-cidr
Automatic merge from submit-queue (batch tested with PRs 48231, 47377, 48797, 49020, 49033)

Fix parsing empty CIDR

Fix #48795
Checking ClusterCIDR and ServiceCIDR before parsing them.

**Release note**:
```release-note
NONE
```
2017-07-17 19:37:45 -07:00
Kubernetes Submit Queue 68fcc59214 Merge pull request #48231 from jcbsmpsn/update-kubelet-to-client-go
Automatic merge from submit-queue (batch tested with PRs 48231, 47377, 48797, 49020, 49033)

Migrate kubelet and linked code from clientset_generated to client-go

Ran a script in the kubernetes repo to migrate kubelet and linked code from clientset_generated package imports to client-go imports.

**NOTE:** There are also some manual changes that were made in order to accommodate some
differences between clientset_generated and client-go. The manual changes are isolated into a
single commit titled "Manual changes."

```sh
#! /bin/bash

for file in $(find . \( -name "clientset_generated" -o -name "informers_generated" \) -prune -o -type f -name "*.go"); do

  if [[ -d $file ]]; then
    continue
  fi

  if [[ $file == "./cmd/libs/go2idl/informer-gen/main.go" ]]; then
    continue
  fi

  sed -i '
      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset"|clientset "k8s.io/client-go/kubernetes"|;

      # Correct a couple of unique cases.
      s|clientset clientset "k8s.io/client-go/kubernetes"|clientset "k8s.io/client-go/kubernetes"|;
      s|cs clientset "k8s.io/client-go/kubernetes"|clientset "k8s.io/client-go/kubernetes"|;
      s|VersionedClientSetPackage: clientset "k8s.io/client-go/kubernetes"|VersionedClientSetPackage: "k8s.io/client-go/kubernetes"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1"|"k8s.io/client-go/kubernetes/typed/certificates/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1"|"k8s.io/client-go/kubernetes/typed/core/v1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1"|"k8s.io/client-go/kubernetes/typed/extensions/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1"|"k8s.io/client-go/kubernetes/typed/autoscaling/v1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1"|"k8s.io/client-go/kubernetes/typed/authentication/v1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1"|"k8s.io/client-go/kubernetes/typed/authorization/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1"|"k8s.io/client-go/kubernetes/typed/apps/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1"|"k8s.io/client-go/kubernetes/typed/rbac/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake"|"k8s.io/client-go/kubernetes/fake"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake"|"k8s.io/client-go/kubernetes/typed/core/v1/fake"|;

      s|k8s.io/kubernetes/pkg/client/clientset_generated/clientset|k8s.io/client-go/kubernetes|;



      s|informers "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions"|"k8s.io/client-go/informers"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/core/v1"|"k8s.io/client-go/informers/core/v1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/apps/v1beta1"|"k8s.io/client-go/informers/apps/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/extensions/v1beta1"|"k8s.io/client-go/informers/extensions/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/batch/v1"|"k8s.io/client-go/informers/batch/v1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/autoscaling/v1"|"k8s.io/client-go/informers/autoscaling/v1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/policy/v1beta1"|"k8s.io/client-go/informers/policy/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/certificates/v1beta1"|"k8s.io/client-go/informers/certificates/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/storage/v1"|"k8s.io/client-go/informers/storage/v1"|;



      s|"k8s.io/kubernetes/pkg/client/listers/core/v1"|"k8s.io/client-go/listers/core/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/apps/v1beta1"|"k8s.io/client-go/listers/apps/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1"|"k8s.io/client-go/listers/extensions/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/autoscaling/v1"|"k8s.io/client-go/listers/autoscaling/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/batch/v1"|"k8s.io/client-go/listers/batch/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1"|"k8s.io/client-go/listers/certificates/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/storage/v1"|"k8s.io/client-go/listers/storage/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/policy/v1beta1"|"k8s.io/client-go/listers/policy/v1beta1"|;


  ' $file
done

hack/update-bazel.sh

hack/update-gofmt.sh
```
2017-07-17 19:37:41 -07:00
Kubernetes Submit Queue 290a0edaf3 Merge pull request #48808 from kad/safe-docker-tags
Automatic merge from submit-queue (batch tested with PRs 49017, 45440, 48384, 45894, 48808)

Make sure that image tags contain only allowed characters.

**What this PR does / why we need it**:
Version strings can contain symbols that are not allowed
as part of image tags. Replace those with underscores.

**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**:
Part of work related to usage of CI images which has versions like "v1.8.0-alpha.1.910+5ca03d674e1495" but image tags in registry are "v1.8.0-alpha.1.910_5ca03d674e1495"

Attn @luxas 

**Release note**:
```release-note
NONE
```
2017-07-17 16:26:59 -07:00
Jacob Simpson b565f53822 update-bazel.sh 2017-07-17 15:06:08 -07:00
Chao Xu acb76cfeb6 import all types for controller manager 2017-07-17 15:05:38 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Alexander Kanevskiy 5a4d560e5f Make sure that image tags contain only allowed characters.
Version strings can contain symbols that are not allowed
as part of image tags. Replace those with underscores.
2017-07-17 23:52:17 +03:00
Lucas Käldström d0ab597b8e
kubeadm: Make kube-proxy tolerate the uninitialized cloud taint 2017-07-17 23:23:25 +03:00
Lucas Käldström 66328996f2
kubeadm: Remove the old KubernetesDir envparam 2017-07-17 14:40:53 +03:00
Kubernetes Submit Queue e8eb858b2a Merge pull request #47187 from leblancd/v6_only_proxy_server
Automatic merge from submit-queue (batch tested with PRs 47309, 47187)

Add IPv6 test cases to kube-proxy server test.

**What this PR does / why we need it**: This change adds some IPv6 test cases for the kube-proxy server. Also adds some test cases for negative conditions for better test coverage.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-07-16 20:00:56 -07:00
Kubernetes Submit Queue d7528e8e93 Merge pull request #44129 from xiangpengzhao/flags-clean
Automatic merge from submit-queue (batch tested with PRs 44129, 48030, 48906)

Add default=false to usage of kube-apiserver allow-privileged flag

**What this PR does / why we need it**:
Users will be clear about default value of `allow-privileged` flag.
2017-07-15 17:13:37 -07:00
Kubernetes Submit Queue 8532cdfd69 Merge pull request #48886 from mikedanese/cleanup
Automatic merge from submit-queue

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-14 11:46:10 -07:00
Kubernetes Submit Queue 47f86ddb04 Merge pull request #48783 from mattmoyer/change-kubeadm-default-token-ttl
Automatic merge from submit-queue (batch tested with PRs 48572, 48838, 48931, 48783, 47090)

kubeadm: change the default bootstrap token TTL to 24 hours

**What this PR does / why we need it**:
This PR changes the TTL for the default bootstrap token generated by `kubeadm init` (without the `--token-ttl` parameter) and `kubeadm token create` (without the `--ttl` flag). Previously, the default TTL was infinite. After this change it is 24 hours.

~~The reasoning for 2 hours as a default is that it's 1) long enough that someone manually using kubeadm (copy-pasting) shouldn't have any issues and 2) short enough that if something is going to break, it should break while the user/admin is still paying attention to the cluster. I'm open to bikeshedding about the exact value, 2 hours is a bit of a strawman.~~

**Edit: updated this to 24 hours instead of 2 hours.**

This is a breaking change if you rely on infinite TTL tokens (e.g., if you had an ASG group of worker nodes). The old behavior is easily restored by passing `--token-ttl 0` to `kubeadm init` or the `--ttl 0` flag to `kubeadm token create`.

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

**Special notes for your reviewer**:
This was discussed earlier today in SIG-cluster-lifecycle

**Release note**:
```release-note
Change the default kubeadm bootstrap token TTL from infinite to 24 hours. This is a breaking change. If you require the old behavior, use `kubeadm init --token-ttl 0` / `kubeadm token create --ttl 0`.
```

cc @jbeda
2017-07-14 10:53:51 -07:00
Kubernetes Submit Queue c08a62088c Merge pull request #48838 from mattmoyer/kubeadm-add-default-token-ttl-warning
Automatic merge from submit-queue (batch tested with PRs 48572, 48838, 48931, 48783, 47090)

kubeadm: add a warning about the default token TTL changing in 1.8

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

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

**Special notes for your reviewer**:
This change is blocked on https://github.com/kubernetes/kubeadm/issues/343. These warnings should probably be removed in the 1.9 cycle.

**Release note**:
```release-note
Add a runtime warning about the kubeadm default token TTL changes in 1.8.
```

/assign @luxas
2017-07-14 10:53:47 -07:00
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