Commit Graph

2421 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
Derek McQuay 644a0ceec9 kubeadm: adding test owner and bazel update 2016-12-02 08:42:46 -08:00
Derek McQuay 49b53b8644 kubeadm: unit tests for app/master/apiclient.go 2016-12-02 08:42:46 -08:00
Derek McQuay ada63282ed kubeadm: unit tests for app/master/addons.go 2016-12-02 08:42:45 -08:00
Derek McQuay a54515d281 kubeadm: unit tests for app/master/discovery.go 2016-12-02 08:42:45 -08:00
Derek McQuay fe73a8a8ff kubeadm: unit tests for app/master/pki.go 2016-12-02 08:42:45 -08:00
Derek McQuay bd4d98fabe kubeadm: unit tests for app/master/manifests.go 2016-12-02 08:42:45 -08:00
Derek McQuay 124dab6c5a kubeadm: unit tests for app/master/kubeconfig.go 2016-12-02 08:42:45 -08:00
Derek McQuay cb3b08a8d4 kubeadm: unit tests for app/master/tokens.go 2016-12-02 08:42:45 -08:00
Kubernetes Submit Queue 53b27ef14e Merge pull request #36474 from bruceauyeung/branch-failure-check-on-umount-when-kubeadm-reset
Automatic merge from submit-queue

add failure check on umount when kubeadm reset, and on service stop

**What this PR does / why we need it**:
before this PR, `umount` will exit with code `123` if `grep` does not match anything
`xargs` has an option:

>-r, --no-run-if-empty
              If the standard input does not contain any nonblanks, do not run the command.  Normally, the command is run  once  even  if
              there is no input.  This option is a GNU extension.


1. this PR add `-r` option to `xargs` , so `umount` will not execute and exit with code `0` correctly while `grep` does not match anything.
2. this PR add failure check on umount. for example, if the directory to be umount is busy, a error message will be printed:
>failed to unmount directories in /var/lib/kubelet, umount: /var/lib/kubelet/foo/bar: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)

3. add failure check on kubelet service stop.


Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-12-02 05:45:03 -08:00
Kubernetes Submit Queue edefe66c78 Merge pull request #36106 from apprenda/kubeadm-unit-tests-pkg-node
Automatic merge from submit-queue

Kubeadm unit tests pkg node

Added unit tests for the kubeadm/app/node package testing functionality of bootstrap.go, csr.go, and discovery.go. 

This PR is part of the ongoing effort to add tests (#35025)

/cc @pires @jbeda
2016-12-02 05:45:01 -08:00
Kubernetes Submit Queue 9a67c20b3d Merge pull request #37327 from jasonbrooks/pr-kubeadm-selinux
Automatic merge from submit-queue

change unconfined_t to spc_t

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

When installing kube via kubeadm on a system w/ selinux enabled, it's necessary to disable selinux in order for the etcd and kube-discovery containers to run. 

The kube etcd and discovery pods are currently set to unconfined_t in order to avoid disabling selinux, but the correct type for an unconfined container is spc_t. For more information, see http://danwalsh.livejournal.com/2016/10/03/.
2016-12-02 01:00:42 -08:00
Derek McQuay d87d3ff9ca
kubeadm: updated pkg node tests to correct types
updated pkg "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" to "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5" because the type that bootstrap.go:126 checkAPIEndpoint requires changed as well as *internalversion.CertificatesClient in csr_test.go:69
2016-12-01 10:32:41 -08:00
Derek McQuay 4ab42db17e kubeadm: unit tests for app/node/ pkg 2016-12-01 09:30:19 -08:00
David Eads ce7b08af92 Revert "[kubeadm] use iteration instead of recursion in function" 2016-12-01 08:48:45 -05:00
Kubernetes Submit Queue 2fab199390 Merge pull request #36334 from luxas/add_preflight
Automatic merge from submit-queue

Add the system verification test to the kubeadm preflight checks

And refactor the system verification test to accept to write to a specific writer in order to customize the output

This PR is targeting v1.5, PTAL
cc @Random-Liu @dchen1107 @kubernetes/sig-cluster-lifecycle
2016-12-01 04:52:07 -08:00
Kubernetes Submit Queue aef15aa875 Merge pull request #36625 from bruceauyeung/branch-eliminate-recursive-call-attemptToUpdateMasterRoleLabelsAndTaints
Automatic merge from submit-queue

[kubeadm] use iteration instead of recursion in function

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

before this PR, function `attemptToUpdateMasterRoleLabelsAndTaints` recursively call itself. there are some defeats in it:
1. potential stack overflow.
2. unnecessary extra  `json.Marshal` calls.
3. unnecessary extra `client.Nodes().List` calls.

this PR rewrite `attemptToUpdateMasterRoleLabelsAndTaints` function, use iterate instead of recursion.
so these 3 defeats the metioned above are gone.
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-12-01 00:39:14 -08:00
Kubernetes Submit Queue c74fae7b14 Merge pull request #36172 from apprenda/kubeadm-tests-table-driven
Automatic merge from submit-queue

kubeadm: changed tests to be table driven

Small change to migrate tests in kubeadm/app/util/tokens_test.go to be table driven which should make adding more tests in the future easier and also have them match how other tests are being written. 

This PR is part of the ongoing effort to add tests (#35025)
2016-12-01 00:39:07 -08:00
Kubernetes Submit Queue 39e64fde8c Merge pull request #35948 from spacexnice/master
Automatic merge from submit-queue

support customize repository prefix of image through environment KUBE…

## Problem
kubeadm does not support customize repository prefix of image. this prevent us from using our own image repository to deploy k8s.

## Fix
make ```gcr.io/google_containers/ ``` be configurable.
ADD environment variable KUBE_REPO_PREFIX

Signed-off-by: yaoyao.xyy <yaoyao.xyy@alibaba-inc.com>
2016-11-30 18:39:25 -08:00
Alexander Kanevskiy 6338b7fda0 Fallback to known good stable version in case of network errors.
Hardcoded known stable version will be returned if user
didn't request specific version and kubeadm for some reason
not able to fetch latest stable information from release servers.

For now, fallback version is v1.4.6
2016-11-30 18:00:29 +02:00
Alexander Kanevskiy 39f55cb4df Added test case for KubernetesReleaseVersion 2016-11-30 18:00:29 +02:00
Alexander Kanevskiy 78e28923ba Implement support for symbolic labels in --use-kubernetes-version
Now, defaults can be pointing to "stable" and users will always get
latest available stable build of Kubernetes via kubeadm.
There is no need anymore to hardcode version string inside kubeadm
binary.

It is also possible to use labels like "latest" or point to exact
branch: "stable-1.4"
2016-11-30 18:00:29 +02:00
Kubernetes Submit Queue 40d5dca16a Merge pull request #35921 from luxas/bump_kubeadm_etcd3
Automatic merge from submit-queue

Update kubeadm etcd to 3.0.13 in order to switch to the etcd3 storage format

ref: https://github.com/kubernetes/kubernetes/issues/35723

I think we should switch as soon as possible, but run it in etcd2 mode until the full etcd3 mode is stable

@kubernetes/sig-cluster-lifecycle @wojtek-t @xiang90 @lavalamp
2016-11-28 16:52:59 -08:00
Clayton Coleman 3dde81f8d0
Remove references to v1/internal ExportOptions 2016-11-27 23:21:06 -05:00
Alexander Block de0e92b4fd Skip etcd related preflight checks and reset actions for external etcd
We should not assume ownership of etcd when external etcd endpoints were
set.

Fixes: https://github.com/kubernetes/kubeadm/issues/69
2016-11-27 12:53:07 +01:00
Devan Goodwin 16e01c65c4 Warn if firewalld service is enabled.
In future we might try to verify ports are actually exposed in firewalld
policy, but this can be quite complex. Instead lets just warn the user
if we see firewalld is running.
2016-11-25 15:37:28 -04:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu e3cf383181 cmd/kubeadm 2016-11-23 15:53:09 -08:00
Jason Brooks bf153fc1d3 change unconfined_t to spc_t
The kube etcd and discovery pods are set to unconfined_t in
order to avoid disabling selinux, but the correct type for
an unconfined container is spc_t. For more information, see
http://danwalsh.livejournal.com/2016/10/03/.
2016-11-22 16:25:31 -08:00
Lucas Käldström aecb0994fb Update the default etcd version for kubeadm to 3.0.14-kubeadm 2016-11-21 16:41:56 +02:00
Derek McQuay bff1af69e9 kubeadm: fixed typo in kubeadm/app/master/pki.go 2016-11-15 09:55:27 -08:00
Derek McQuay 4f035181cb kubeadm: changed tests to be table driven
This change was to make tests found in tokens_test.go be table driven to
match other testing development that has been going on in kubeadm.
2016-11-15 09:55:27 -08:00
yupeng 62681dbe73 type HttpProxyCheck should be HTTPProxyCheck
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-14 15:04:58 +08:00
Lucas Käldström a26cbbf3d0 Add the system verification check to the kubeadm preflight checks 2016-11-12 16:37:12 +02:00
bruceauyeung f3c5a6ef8f eliminate recursive call attemptToUpdateMasterRoleLabelsAndTaints
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-11-11 12:25:36 +08:00
bruceauyeung 06a6ec2181 add failure check on umount when kubeadm reset, and on service stop
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-11-09 10:55:34 +08:00
Kubernetes Submit Queue 9761442b19 Merge pull request #36040 from bruceauyeung/add-master-address-desc-into-kubeadm-join-and-some-validations
Automatic merge from submit-queue

add master address into kubeadm join help message and some validations

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

1, add master address into kubeadm join help message. looks like :

>Usage:
>  kubeadm join <master address> [flags]

2, when user provides more than one master address, return an error.

3, since `kubeadm join` not only support ip addresses but also host names or domain names, so i delete the word `ip` from error message `must specify master ip address (see --help)`


Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-11-08 14:52:09 -08:00
Kubernetes Submit Queue 15fa0df93e Merge pull request #35975 from justinsb/role_labels_2
Automatic merge from submit-queue

Add constants for node role labels
2016-11-07 15:02:58 -08:00
Kubernetes Submit Queue afa99c68b8 Merge pull request #35144 from pipejakob/generate-token
Automatic merge from submit-queue

New command: "kubeadm token generate"

As part of #33930, this PR adds a new top-level command to kubeadm to just generate a token for use with the init/join commands. Otherwise, users are left to either figure out how to generate a token on their own, or let `kubeadm init` generate a token, capture and parse the output, and then use that token for `kubeadm join`.

At this point, I was hoping for feedback on the CLI experience, and then I can add tests. I spoke with @mikedanese and he didn't like the original propose of `kubeadm util generate-token`, so here are the runners up:

```
$ kubeadm generate-token          # <--- current implementation
$ kubeadm generate token          # in case kubeadm might generate other things in the future?
$ kubeadm init --generate-token   # possibly as a subcommand of an existing one
```

Currently, the output is simply the token on one line without any padding/formatting:

```
$ kubeadm generate-token
1087fd.722b60cdd39b1a5f
```

CC: @kubernetes/sig-cluster-lifecycle 

**Release note**:

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->

``` release-note
New kubeadm command: generate-token
```
2016-11-05 16:12:52 -07:00
Justin Santa Barbara cef8315ae8 Add constants for node role labels
Rather than sharing well-known strings, we should be declaring these in
the API.
2016-11-04 18:00:35 -04:00
yaoyao.xyy 73244f078c support customize repository prefix of image through environment KUBE_REPO_PREFIX=gcr.io/google_containers/.
Signed-off-by: yaoyao.xyy <yaoyao.xyy@alibaba-inc.com>
2016-11-04 16:17:01 +08:00
bruceauyeung 3616a04177 add master address desc into kubeadm join and some validations
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-11-03 10:07:39 +08:00
Devan Goodwin fe03e1319f Fix preflight check failure on node join.
We recently improved this to tolerate existence of things like
/etc/kubernetes/manifests/ as an empty dir, but forgot to do so for the
join pre-flight checks where it is also failing.

Instead ensure only the sub-directories and files we need are available.
2016-11-02 16:09:09 -03:00
Kubernetes Submit Queue 7d14b568c3 Merge pull request #36001 from smarterclayton/change_double_decode
Automatic merge from submit-queue

Avoid double decoding all client responses

Fixes #35982 

The linked issue uncovered that we were always double decoding the response in restclient for get, list, update, create, and patch.  That's fairly expensive, most especially for list.  This PR refines the behavior of the rest client to avoid double decoding, and does so while minimizing the changes to rest client consumers.

restclient must be able to deal with multiple types of servers. Alter the behavior of restclient.Result#Raw() to not process the body on error, but instead to return the generic error (which still matches the error checking cases in api/error like IsBadRequest). If the caller uses
.Error(), .Into(), or .Get(), try decoding the body as a Status.

For older servers, continue to default apiVersion "v1" when calling restclient.Result#Error(). This was only for 1.1 servers and the extensions group, which we have since fixed.

This removes a double decode of very large objects (like LIST) - we were trying to DecodeInto status, but that ends up decoding the entire result and then throwing it away.  This makes the decode behavior specific to the type of action the user wants.

```release-note
The error handling behavior of `pkg/client/restclient.Result` has changed.  Calls to `Result.Raw()` will no longer parse the body, although they will still return errors that react to `pkg/api/errors.Is*()` as in previous releases.  Callers of `Get()` and `Into()` will continue to receive errors that are parsed from the body if the kind and apiVersion of the body match the `Status` object.

This more closely aligns rest client as a generic RESTful client, while preserving the special Kube API extended error handling for the `Get` and `Into` methods (which most Kube clients use).
```
2016-11-02 11:36:41 -07:00
Kubernetes Submit Queue c6c06f5492 Merge pull request #36025 from mikedanese/kubeadm_config_defaults
Automatic merge from submit-queue

kubeadm: move defaulting to the api group

ref #35796

@pires @kubernetes/sig-cluster-lifecycle
2016-11-02 03:51:00 -07:00
Kubernetes Submit Queue a8502d14c0 Merge pull request #35965 from YuPengZTE/devCmdDot
Automatic merge from submit-queue

Align with other cli descriptions

**What this PR does / why we need it**:
Align with other cli descriptions

**Special notes for your reviewer**:
![image](https://cloud.githubusercontent.com/assets/20062886/19887803/adbeee16-a065-11e6-9933-98bfff784086.png)



Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-02 03:07:50 -07:00
Clayton Coleman f0fa26bcf6
ExportOptions should be registered to all public schemas 2016-11-01 22:55:58 -04:00
Mike Danese a00db0a32f kubeadm: move kubeadm over to apigroup defaulting 2016-11-01 16:48:39 -07:00
Paulo Pires c7e9ac6f94 autogenerated 2016-11-01 16:48:25 -07:00
Paulo Pires a01b943a7f kubeadm: add defaulting for kubeadm config api group 2016-11-01 16:48:24 -07:00
Kubernetes Submit Queue 1fe9fb2d69 Merge pull request #35972 from kad/proxy-warning
Automatic merge from submit-queue

kubeadm preflight checks: Warn user if connections to API or Discovery are going to be over proxy

**What this PR does / why we need it**: Continuing discussion from PR #35044, new version will provide warning if kubeadm run in environment where http connections would go over proxy.
Most of the time, it is not expected behaviour and leads to situations like in #34695

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```

kubeadm during initialization of master and slave nodes need to make
several API calls directly to the node where it is running or master.
In environments with http/https proxies, user might accidentally
have configuration where connections to API would go over proxy instead
of directly.

User can re-run kubeadm with corrected NO_PROXY variable. Example:

  $ NO_PROXY=* kubeadm join ...
2016-11-01 15:56:51 -07:00
Alexander Kanevskiy ce9a13ef13 Warn user if connections to API or Discovery are going to be over proxy
kubeadm during initialization of master and slave nodes need to make
several API calls directly to the node where it is running or master.
In environments with http/https proxies, user might accidentally
have configuration where connections to API would go over proxy instead
of directly.

User can re-run kubeadm with corrected NO_PROXY variable. Example:

  $ NO_PROXY=* kubeadm join ...
2016-11-01 16:23:10 +02:00
yupeng 7d1219fb06 Align with other cli descriptions
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-01 18:59:45 +08:00
Mike Danese 58479268e8 kubeadm: lower default component logging level 2016-10-31 15:29:10 -07:00
Jacob Beacham cf6b6778dc Adding CLI tests for kubeadm. 2016-10-31 11:12:51 -07:00
Jacob Beacham f65c58124d New command: "kubeadm token generate"
This surfaces the token generation logic so that users can first
generate and store a token, then pass it to kubeadm init/join.
Otherwise, users have to capture and parse the output of "kubeadm init"
to feed the token to "kubeadm join."
2016-10-31 11:12:51 -07:00
Kubernetes Submit Queue e4b41dd292 Merge pull request #35777 from redhatlinux10/fix-inconsistent-util-package-import
Automatic merge from submit-queue

make kubeadm version use kubeadmutil

What this PR does / why we need it:

this PR makes sure `kubeadmutil.CheckErr()` other than `cmdutil.CheckErr()` is called in `kubeadm version` subcommand. 
in `version.go`, `RunVersion()` function only returns `nil`, `kubeadmutil.CheckErr()` is enough for this

Signed-off-by: redhatlinux10 <ouyang.qinhua@zte.com.cn>
2016-10-30 18:08:27 -07:00
Kubernetes Submit Queue 9e71a65335 Merge pull request #35326 from apprenda/kubeadm-unit-tests-pkg-preflight
Automatic merge from submit-queue

kubeadm: added unit test for app/preflight pkg

Added unit test for kubeadm/app/preflight package testing functionality of checks.go.

This PR is part of the ongoing effort to add tests (#35025)

/cc @pires @jbeda
2016-10-30 10:31:56 -07:00
Kubernetes Submit Queue b4f8d88d51 Merge pull request #35843 from bulletRush/feature/pre-hostname-check
Automatic merge from submit-queue

[kubeadm] pre-flight check hostname to ensure kubelet can launch static pods li…

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: pre-flight check hostname to ensure kubelet can launch static pods like kube-apiserver/kube-controller-manager

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

**Special notes for your reviewer**:

# what is the influence of this issue?

kubelet will not create api server and kcm pod if your hostname is uncorrect. It complain the config files in "/etc/kubernetes/manifests" are invlid.

# how to reproduce this issue?

change your hostname by `hostnamectl set-hostname vm_81_12_centos`. then run `kubeadm init`. you will get this error log from kubelet:

```log
Oct 27 11:12:57 vm_81_12_centos kubelet: I1027 11:12:57.279458    2695 file.go:123] Can't process config file "/etc/kubernetes/manifests/kube-controller-manager.json": invalid pod: [metadata.name: Invalid value: "kube-controller-manager-vm_81_12_centos": must match the regex [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* (e.g. 'example.com') spec.nodeName: Invalid value: "vm_81_12_centos": must match the regex [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* (e.g. 'example.com')]
```

# where the error comes from in the code?

`pkg/kubelet/config/file.go:144 sourceFile:extractFromDir`

```go
func (s *sourceFile) extractFromDir(name string) ([]*api.Pod, error) {
	dirents, err := filepath.Glob(filepath.Join(name, "[^.]*"))
	if err != nil {
		return nil, fmt.Errorf("glob failed: %v", err)
	}

	pods := make([]*api.Pod, 0)
	if len(dirents) == 0 {
		return pods, nil
	}

	sort.Strings(dirents)
	for _, path := range dirents {
		statInfo, err := os.Stat(path)
		if err != nil {
			glog.V(1).Infof("Can't get metadata for %q: %v", path, err)
			continue
		}

		switch {
		case statInfo.Mode().IsDir():
			glog.V(1).Infof("Not recursing into config path %q", path)
		case statInfo.Mode().IsRegular():
			pod, err := s.extractFromFile(path)
			if err != nil {
-->				glog.V(1).Infof("Can't process config file %q: %v", path, err)
			} else {
				pods = append(pods, pod)
			}
		default:
			glog.V(1).Infof("Config path %q is not a directory or file: %v", path, statInfo.Mode())
		}
	}
	return pods, nil
}
```

# how to fix it?

1. change hostname by `hostnamectl set-hostname <right host name>` or
2. add `hostnameOverride` config. If hostnameOverride is set, then kubelet will use this value instead of system hostname.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```

…ke kube-apiserver/kube-controller-manager and so on.
2016-10-30 09:56:25 -07:00
Kubernetes Submit Queue defb44a4d6 Merge pull request #35231 from apprenda/kubeadm-unit-tests-pkg-util
Automatic merge from submit-queue

Kubeadm added unit tests for pkg app/util

Added unit tests for kubeadm/app/util package testing functionality of tokens.go, error.go, and kubeconfig.go.

This PR is part of the ongoing effort to add tests (#35025)

/cc @pires @jbeda
2016-10-30 09:21:31 -07:00
bulletRush 590ef489c8 [kubeadm] pre-flight check hostname to ensure kubelet can launch static pods 2016-10-30 09:40:33 -04:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Paulo Pires f6bac22d69
kubeadm: updated cmd/kubeadm/app/node package related BUILD file. 2016-10-29 11:39:02 -04:00
Paulo Pires eb6eeb704a
kubeadm: gofmt'ed cmd/kubeadm. 2016-10-29 11:38:53 -04:00
Derek McQuay b7c685d421
kubeadm: EnvParam struct and GlobalEnvParam
Previously, GetEnvParams (now called SetEnvParams) had no way of being altered unless
it was through enviroment variables. These changes allow for a global
EnvParam to be set and also altered while still initally getting their value from
set enviroment variables. This change is especially helpful for testing
(see kubeadm/app/util/kubeconfig_test.go).
2016-10-29 09:41:51 -04:00
Derek McQuay a018564975
kubeadm: added tests for util/{error,kubeconfig} 2016-10-29 09:41:51 -04:00
Derek McQuay 1bfa867088
kubeadm: added unit tests for util/tokens 2016-10-29 09:41:50 -04:00
Paulo Pires b054117c24
kubeadm: updated cmd/kubeadm/app/preflight package related BUILD file. 2016-10-29 09:40:13 -04:00
Derek McQuay a5919a9340
kubeadm: added unit test for app/preflight pkg 2016-10-29 09:40:06 -04:00
redhatlinux10 67f379e510 fix inconsistent util package import
Signed-off-by: redhatlinux10 <ouyang.qinhua@zte.com.cn>

fix inconsistent util package import

Signed-off-by: redhatlinux10 <ouyang.qinhua@zte.com.cn>
2016-10-29 04:11:01 +08:00
Kubernetes Submit Queue 0563b45772 Merge pull request #35556 from apprenda/kubeadm-alphawarning-typo
Automatic merge from submit-queue

kubeadm: fixed small typo in alpha warning

Small typo in the alpha warning that I noticed and fixed.
2016-10-27 13:49:53 -07:00
Kubernetes Submit Queue a8e9a1bce6 Merge pull request #35632 from dgoodwin/preflight-conf-fixes
Automatic merge from submit-queue

kubeadm: Stop assuming full ownership of /etc/kubernetes.

Packages may auto-create directories in /etc/kubernetes, and users also
need files such as cloud-config.json to be present and preserved at
their default locations in /etc/kubernetes. As such this modifies
pre-flight checks to only require the absence of the files and
directories we explicitly create in kubeadm.

Reset is similarly modified to not wipe out /etc/kubernetes entirely.
When resetting directories we also now preserve the directory itself,
but delete it's contents.

Also adds tests for reset command logic specifically for /etc/kubernetes
cleanup, to ensure user files are not inadvertently wiped out.
2016-10-27 11:55:27 -07:00
Devan Goodwin 2ee787c583 kubeadm: Empty directories during reset, but do not delete them.
This will allow packages to maintain ownership of config and data
directories, which may carry selinux or other attributes that should be
preserved, but we do not wish to manage within kubeadm itself.
2016-10-27 10:26:41 -03:00
Devan Goodwin 37b1ae42c0 kubeadm: Stop assuming full ownership of /etc/kubernetes.
Packages may auto-create directories in /etc/kubernetes, and users also
need files such as cloud-config.json to be present and preserved at
their default locations in /etc/kubernetes. As such this modifies
pre-flight checks to only require the absence of the files and
directories we explicitly create in kubeadm.

Reset is similarly modified to not wipe out /etc/kubernetes entirely.
When resetting directories we also now preserve the directory itself,
but delete it's contents.

Also adds tests for reset command logic specifically for /etc/kubernetes
cleanup, to ensure user files are not inadvertently wiped out.
2016-10-27 09:14:20 -03:00
Derek McQuay 89b1c950bc
kubeadm: fixed small typo in alpha warning 2016-10-25 17:30:56 -04:00
Ilya Dmitrichenko fe32eddca9
Change default service IP range to 10.96/12 2016-10-25 09:45:32 +01:00
Kubernetes Submit Queue 377967935b Merge pull request #35453 from mikedanese/build-rename
Automatic merge from submit-queue

rename build/ dirs to other things.

#35359
2016-10-24 17:03:25 -07:00
Kubernetes Submit Queue 03c69e114f Merge pull request #35270 from errordeveloper/bump-default-version-in-kubeadm
Automatic merge from submit-queue

Bump kubeadm to use v1.4.4 by default

**Release note**:

```release-note
NONE
```
2016-10-24 16:17:53 -07:00
Mike Danese 763c4987f2 autogenerated 2016-10-24 14:47:27 -07:00
Kubernetes Submit Queue ffdfe9fa9b Merge pull request #35119 from errordeveloper/tidy-up-kubeadm
Automatic merge from submit-queue

Start tidying kubeadm up

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

This PR addresses https://github.com/kubernetes/kubernetes/pull/33262#discussion_r80337511.

**Release note**:
```release-note
NONE
```
2016-10-24 02:26:36 -07:00
Kubernetes Submit Queue a7db9bccb5 Merge pull request #35332 from apprenda/kubeadm-unit-tests-pkg-images
Automatic merge from submit-queue

kubeadm: added unit tests for app/images pkg

Added unit tests for kubeadm/app/images package testing functionality of images.go.

This PR is part of the ongoing effort to add tests (#35025)

/cc @pires @jbeda
2016-10-23 16:21:37 -07:00
Kubernetes Submit Queue 1bd46e5a4e Merge pull request #35265 from redhatlinux10/master-patch-optimise-kubeadm-join-args-generation
Automatic merge from submit-queue

enhance join arguments generation logic using template

**What this PR does / why we need it**:
this PR enhances kubeadm join arguments generation logic using template, this makes code more readable and adding arguments more  easier.

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

**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```

Signed-off-by: 欧阳钦华10079130 <ouyang.qinhua@zte.com.cn>
2016-10-22 17:15:59 -07:00
欧阳钦华10079130 8bbeae02d3 enhance join arguments generation logic using template
Signed-off-by: 欧阳钦华10079130 <ouyang.qinhua@zte.com.cn>

change JoinArgsData to joinArgsData, improve template readability

Signed-off-by: redhatlinux10 <ouyang.qinhua@zte.com.cn>

fix extra = type

Signed-off-by: redhatlinux10 <ouyang.qinhua@zte.com.cn>
2016-10-23 06:38:14 +08:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Derek McQuay 3765c846a4
kubeadm: added unit tests for app/images pkg 2016-10-21 14:47:46 -07:00
Ilya Dmitrichenko 9703df391f
Eliminate half-baked multi-architecture support, but keep node affinity architecture-agnostic (fix #33916) 2016-10-21 14:56:02 +01:00
Ilya Dmitrichenko f09c4833bd
Bump kubeadm to use v1.4.4 by default 2016-10-21 09:25:49 +01:00
Kubernetes Submit Queue 60be3c5f57 Merge pull request #35111 from apprenda/kubeadm_normalize_reset
Automatic merge from submit-queue

kubeadm: Normalized reset command to match init and join commands.

**What this PR does / why we need it**: Overall, improves code structure. Opening single PR in order avoid big PRs in the future, when adding tests and new functionality, i.e. #34404.

```release-note
NONE
```
2016-10-20 20:02:58 -07:00
Jacob Beacham ec7561fdef If token validation fails, give the user the expected format.
Part of #33930.
2016-10-19 14:28:17 -07:00
Ilya Dmitrichenko b7b0822654
Refactor `getComponentCommand()` for readability 2016-10-19 14:56:55 +01:00
Paulo Pires 0699457f2b
kubeadm: Normalized reset command to match init and join commands. 2016-10-19 13:08:27 +01:00
Ilya Dmitrichenko 6f57775669
Ensure `MasterConfiguration` is refered to as `cfg` throughout 2016-10-17 12:08:11 +01:00
Ilya Dmitrichenko 327dec43fb
Add flags for alternative API and discovery ports (close #34311 #34307 #33638) 2016-10-17 12:08:11 +01:00
Lucas Käldström 4ac49a74aa Remove duplicate --etcd-servers arguments in kubeadm 2016-10-16 21:48:16 +03:00
Lucas Käldström d46490c21e Register the kubeadm api group in cmd/kubeadm 2016-10-15 22:18:23 +03:00
Kubernetes Submit Queue ab14c31b84 Merge pull request #34885 from apprenda/kubeadm_join_configuration
Automatic merge from submit-queue

kubeadm join: Added support for config file.

As more behavior (#34719, #34807, fix for #33641) is added to `kubeadm join`, this will be eventually very much needed. Makes sense to go in sooner rather than later.

Also references #34501 and #34884.

/cc @luxas @mikedanese
2016-10-15 10:11:49 -07:00
Kubernetes Submit Queue 88d6d7a677 Merge pull request #34807 from luxas/kubeadm_reset
Automatic merge from submit-queue

Implement kubeadm reset

@kubernetes/sig-cluster-lifecycle
2016-10-15 06:10:36 -07:00
Kubernetes Submit Queue 7e6fda2eb2 Merge pull request #34718 from taimir/kubeadm-disco-wait
Automatic merge from submit-queue

kubeadm join: polling discovery service API

**What this PR does / why we need it**: Enhance kubeadm to allow for parallel provisioning of API endpoints and slave nodes, in addition to https://github.com/kubernetes/kubernetes/pull/33543. This PR let's `kubeadm join` poll the discovery service API and retry connecting to it every couple of seconds. That way `kubeadm init` and `kubeadm join` can be executed in parallel.

**Fixes**: https://github.com/kubernetes/kubernetes/issues/33542

**Special notes for your reviewer**:

@pires @errordeveloper last part of the discussed changes, in addition to https://github.com/kubernetes/kubernetes/pull/33543 and https://github.com/kubernetes/kubernetes/pull/34703
2016-10-15 04:12:45 -07:00
Paulo Pires 0cc50d37e1
kubeadm join: Added support for config file. 2016-10-15 11:44:21 +01:00
Lucas Käldström ecdaa7195a Implement kubeadm reset 2016-10-15 11:58:06 +03:00
Kubernetes Submit Queue 3e9e507a9b Merge pull request #34703 from taimir/kubeadm
Automatic merge from submit-queue

kubeadm join: wait for API endpoints

**What this PR does / why we need it**: enhance kubeadm to allow for parallel provisioning of API endpoints and slave nodes, continued from https://github.com/kubernetes/kubernetes/pull/33543

**Fixes**: https://github.com/kubernetes/kubernetes/issues/33542

**Special notes for your reviewer**:

* Introduces a concurrent retry mechanism for bootstrapping with a single API endpoint during `kubeadm join` (this was left out in https://github.com/kubernetes/kubernetes/pull/33543 so that it can be implemented in a separate PR). The polling of the discovery service API itself is yet to come.

@errordeveloper @pires
2016-10-14 20:00:27 -07:00
Paulo Pires cf000bff95
kubeadm: fix preflight checks. 2016-10-14 20:16:56 +01:00
Kubernetes Submit Queue b189f5446e Merge pull request #34744 from pipejakob/typos
Automatic merge from submit-queue

Fix simple typos.
2016-10-14 03:08:46 -07:00
Kubernetes Submit Queue a944748ccb Merge pull request #34341 from apprenda/kubeadm-require-root
Automatic merge from submit-queue

kubeadm implement preflight checks

Checks that user running kubeamd init and join is root and will only execute
command if user is root. Moved away from using kubectl error handling to
having kubeadm handle its own errors. This should allow kubeadm to have
more meaningful errors, exit codes, and logging for specific kubeadm use
cases.

fixes #33908
2016-10-13 15:02:53 -07:00
Atanas Mirchev 072259f80f kubeadm join: wait for API endpoints
* Introduce a concurrent retry mechanism for bootstrapping
   with a single API endpoint
2016-10-13 22:16:11 +02:00
Jacob Beacham 2230714d32 Fix simple typos. 2016-10-13 11:29:26 -07:00
Kubernetes Submit Queue 33a8e5cf67 Merge pull request #34097 from mayflower/kubeadm-typo
Automatic merge from submit-queue

kubeadm: fix typo
2016-10-13 10:08:03 -07:00
Devan Goodwin 4231c046dd Fix errors and improve output in kubeadm pre-flight checks.
Add skip-preflight-checks to known flags.
Fix bug with preflight checks not returning system is-active as errors.
Fix error handling to use correct function.
2016-10-13 11:10:19 -03:00
Derek McQuay 16b159c12b kubeadm implement preflight checks
Includes checks for verifying services exist and are enabled, ports are
open, directories do not exist or are empty, and required binaries are
in the path.

Checks that user running kubeamd init and join is root and will only execute
command if user is root. Moved away from using kubectl error handling to
having kubeadm handle its own errors. This should allow kubeadm to have
more meaningful errors, exit codes, and logging for specific kubeadm use
cases.
2016-10-13 10:09:36 -03:00
Devan Goodwin b673e2d0a0 Add kubeadm preflight check framework.
Includes checks for verifying services exist and are enabled, ports are
open, directories do not exist or are empty, and required binaries are
in the path.
2016-10-13 10:06:52 -03:00
AdoHe b2280a646a update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
Atanas Mirchev 32edc87e4b kubeadm join: polling discovery service API
* `kubeadm join` will now retry to connect to the discovery service
API instead of exit on first failure. Allows for parallel install.
of master and slave nodes.
2016-10-13 14:51:04 +02:00
Kubernetes Submit Queue c1986f0fc7 Merge pull request #34501 from mikedanese/kubeadm-init-cfg
Automatic merge from submit-queue

kubeadm: allow kubeadm init to read config from file

@kubernetes/sig-cluster-lifecycle
2016-10-13 04:19:05 -07:00
Kubernetes Submit Queue 4a223efd27 Merge pull request #34573 from errordeveloper/fix-early-deployment-issue
Automatic merge from submit-queue

Test API more extensivelly before declaring readiness 

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

It's possible that first deployment kubeadm creates will hit `deployments.extensions "kube-discovery" is forbidden: not yet ready to handle request`, which comes from NamespaceLifecycle admission controller and has something to do with cache. According to @derekwaynecarr, we need to create a namespace-scoped resource to really check for this. I didn't want to make a check with deployment of whatever comes first right now, and decided to have explicit step for this in `apiclient.go`.

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

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

**Release note**:
```release-note
NONE
```
2016-10-13 01:44:24 -07:00
Kubernetes Submit Queue d236b84b4f Merge pull request #34555 from mikedanese/conversion
Automatic merge from submit-queue

kubeadm: fix conversion macros and add kubeadm to round trip testing

Tests are probably broken but I'll fix. @jbeda this probably fixes your change unless we decide we need generated deep copies or conversions.

@kubernetes/sig-cluster-lifecycle
2016-10-12 19:47:58 -07:00
Kubernetes Submit Queue 0357341fd5 Merge pull request #34596 from xiaopeng163/master
Automatic merge from submit-queue

fixed grammatical errors

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

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

**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
2016-10-12 13:46:07 -07:00
Mike Danese 25e4dccefe kubeadm: fix conversion macros and add kubeadm to round trip testing 2016-10-12 13:26:23 -07:00
Kubernetes Submit Queue 346f3b3e76 Merge pull request #33543 from taimir/kubeadm
Automatic merge from submit-queue

Decouple master bootstrap from CSR in kubeadm

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: enhance `kubeadm` to allow for parallel provisioning of API endpoints and slave nodes

**Fixes**: https://github.com/kubernetes/kubernetes/issues/33542

**Special notes for your reviewer**:
This is work in progress, trying to 

 * Introduce a concurrent retry mechanism for bootstrapping
   with a single API endpoint
 * Refactor API client creation, decouple from CSR
2016-10-12 08:53:43 -07:00
Ilya Dmitrichenko 0cb54e7eb2
Append first address from `--api-advertise-addresses` to `kube-apiserver` flags 2016-10-12 12:59:24 +01:00
Peng Xiao c5b96e48ea fixed grammatical errors 2016-10-12 16:29:04 +08:00
Atanas Mirchev 8c8da393e0 Decouple master bootstrap from CSR
* Refactor API client creation, decouple from CSR
2016-10-12 09:16:38 +02:00
Ilya Dmitrichenko 53e393ad42
Test API more extensivelly before declaring readiness (close #34411) 2016-10-11 22:33:39 +01:00
Mike Danese dc616dde7c kubeadm: register all cloudproviders 2016-10-11 11:19:46 -07:00
Mike Danese 58d25e378c kubeadm: allow kubeadm init to read config from file 2016-10-11 10:25:28 -07:00
Lucas Käldström 99aaa3d8f4 Bump kubeadm to use kubernetes v1.4.1 2016-10-10 22:25:26 +03:00
Kubernetes Submit Queue 851705ea59 Merge pull request #34147 from mikedanese/kubeadm-api
Automatic merge from submit-queue

kubeadm: turn api into a real apigroup

@kubernetes/sig-cluster-lifecycle
2016-10-10 09:59:54 -07:00
Kubernetes Submit Queue 7746cb9182 Merge pull request #34352 from mikedanese/fix-cm
Automatic merge from submit-queue

kubeadm: still run cm if not pod cidr is specified

@kubernetes/sig-cluster-lifecycle
2016-10-08 18:25:43 -07:00
Mike Danese 45b92085c4 kubeadm: still run cm if not pod cidr is specified 2016-10-07 12:31:10 -07:00
Mike Danese b3dae78c62 kubeadm: turn api into a real apigroup 2016-10-07 11:14:53 -07:00
Mike Danese db963fc16d kubeadm: mark etcd flags as deprecated 2016-10-05 14:36:03 -07:00
Robin Gloster f2ae2cad0b
kubeadm: fix typo 2016-10-05 18:39:24 +02:00
Mike Danese 56ea178e7c kubeadm: refactor config
1) break object into substructures
2) seperate a config object for master and node
2016-10-03 14:44:18 -07:00
Kubernetes Submit Queue 64d2b12d21 Merge pull request #33859 from luxas/not_so_aggressve_probes
Automatic merge from submit-queue

Do not probe so aggressively which may lead to unnecessary restarts

@errordeveloper @mikedanese PTAL

I came across a case where etcd restarted about 5-10 times because the load was very high on the machine. 
The load seems to have lead to that the `etcd` container occasionally didn't respond to the probe, which caused many restart and made the whole thing even worse.

Maybe we should remove the etcd probe totally? I don't know, what do you think?
This is at least a try to loosen the limits here...
2016-10-03 05:55:42 -07:00
Kubernetes Submit Queue 347d448180 Merge pull request #33831 from rustyrobot/print-cert-info
Automatic merge from submit-queue

Kubeadm: print information about certificates

Prints basic information about certificates to the user.

Example of `kubeadm init` output:
```
<master/pki> generated Certificate Authority key and certificate:
Issuer: CN=kubernetes | Subject: CN=kubernetes | CA: true
Not before: 2016-09-30 11:19:19 +0000 UTC Not After: 2026-09-28 11:19:19 +0000 UTC
Public: /etc/kubernetes/pki/ca-pub.pem
Private: /etc/kubernetes/pki/ca-key.pem
Cert: /etc/kubernetes/pki/ca.pem
<master/pki> generated API Server key and certificate:
Issuer: CN=kubernetes | Subject: CN=kube-apiserver | CA: false
Not before: 2016-09-30 11:19:19 +0000 UTC Not After: 2017-09-30 11:19:19 +0000 UTC
Alternate Names: [172.18.76.239 10.0.0.1 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local]
Public: /etc/kubernetes/pki/apiserver-pub.pem
Private: /etc/kubernetes/pki/apiserver-key.pem
Cert: /etc/kubernetes/pki/apiserver.pem
<master/pki> generated Service Account Signing keys:
Public: /etc/kubernetes/pki/sa-pub.pem
Private: /etc/kubernetes/pki/sa-key.pem
```

Example of `kubeadm join` command:
```
<node/csr> received signed certificate from the API server:
Issuer: CN=kubernetes | Subject: CN=system:node:minion | CA: false
Not before: 2016-09-30 11:28:00 +0000 UTC Not After: 2017-09-30 11:28:00 +0000 UTC
```

Fixes #33642
cc @kubernetes/sig-cluster-lifecycle
2016-10-01 11:31:25 -07:00
Lucas Käldström 60274778bc Set FailureTreshold to 8 for kubeadm components in order to not restart unless really necessary 2016-10-01 16:25:27 +03:00
Kubernetes Submit Queue 5a9acd9113 Merge pull request #33681 from zachaller/master
Automatic merge from submit-queue

fix kubeadm on AWS so that kube-controller has access to certs for am…

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: This fixes an issue with kubeadm not mounting ssl certs for kube-controller

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

**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Fixes Kubeadm so kube-controller has certs for using amazon api
```
2016-09-30 23:24:56 -07:00
Evgeny L 12f8c979ba kubeadm: user-friendly certificates formatting 2016-10-01 04:57:30 +00:00
Kubernetes Submit Queue 239630ce9a Merge pull request #33644 from errordeveloper/kubeadm-remove-glog
Automatic merge from submit-queue

Remove glog added by mistake, start converting phase1+ TODOs to issues

**What this PR does / why we need it**:
Minor cleanup in `cmd/kubeadm/app/node/csr.go`.

**Release note**:
```release-note
NONE
```
2016-09-29 08:44:28 -07:00
Kubernetes Submit Queue df0ae9f67d Merge pull request #33668 from mikedanese/private-ip
Automatic merge from submit-queue

kubeadm: default to using a private range for service subnet

We are currently using a subnet that is reserved for ISPs. Private network administrators don't control this space. Default to a subnet that private network administrators do control.

@errordeveloper @kubernetes/sig-cluster-lifecycle
2016-09-28 18:49:46 -07:00
Zach Aller bd1d93e2e0 fix kubeadm on AWS so that kube-controller has access to certs for amazon api 2016-09-28 18:47:23 +00:00
Mike Danese 3c8c71e80e default to using a private range for service subnet 2016-09-28 10:01:55 -07:00
Ilya Dmitrichenko 037ef3e50c
Remove glog added by mistake, start converting phase1+ TODOs to issues 2016-09-28 10:27:53 +01:00
Kubernetes Submit Queue 1854bdcb0c Merge pull request #29048 from justinsb/volumes_nodename_not_hostname
Automatic merge from submit-queue

Use strongly-typed types.NodeName for a node name

We had another bug where we confused the hostname with the NodeName.

Also, if we want to use different values for the Node.Name (which is
an important step for making installation easier), we need to keep
better control over this.

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName
2016-09-27 17:58:41 -07:00
Kubernetes Submit Queue cf7301f16c Merge pull request #33564 from oz123/fix_typo
Automatic merge from submit-queue

Fix typo fialed->failed

Just a tiny fix .
2016-09-27 10:06:54 -07:00
Justin Santa Barbara 54195d590f Use strongly-typed types.NodeName for a node name
We had another bug where we confused the hostname with the NodeName.

To avoid this happening again, and to make the code more
self-documenting, we use types.NodeName (a typedef alias for string)
whenever we are referring to the Node.Name.

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName

Also clean up some of the (many) places where the NodeName is referred
to as a hostname (not true on AWS), or an instanceID (not true on GCE),
etc.
2016-09-27 10:47:31 -04:00
Oz N Tiram ae5d5867ab Fix typo fialed->failed 2016-09-27 16:38:01 +02:00
Evgeny L 8f586d916e Kubeadm: fix SELinux rules for kubernetes discovery service 2016-09-27 13:24:29 +00:00
Luke Marsden 3a4613d3b2 fix https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/33262/kubernetes-pull-verify-all/15586/ 2016-09-26 09:13:09 +01:00
Lucas Käldström 51573860fa Update CHANGELOG and gofmt 2016-09-26 09:13:09 +01:00
Lucas Käldström b17e107def Various improvements plus added a version command 2016-09-25 22:38:39 +03:00
Ilya Dmitrichenko a023085a5f
Address comments in review 2016-09-24 17:28:34 +01:00
Ilya Dmitrichenko d0e29789b0
Fix sorting of linted packages and gofmt 2016-09-24 14:46:43 +01:00
Lucas Käldström 37dab80173
Make the Kubernetes control plane version configurable 2016-09-24 14:46:42 +01:00
Atanas Mirchev 5862ea6f38
Fix boostrap token encoding bug during master init
Currently the boostrap fails when a token is provided by the user
on `master init` and works when the token is generated. This is
because of a mismatch of how the token string in the kube-discovery
secret is encoded.
2016-09-24 14:46:42 +01:00
Evgeny L 0a68bb05ea
Rename flag `--schedule-workload` to `--schedule-pods-here` for kubeadm init 2016-09-24 14:46:41 +01:00
Atanas Mirchev ab3b2d579f
Fix package / struct naming after core refactoring. 2016-09-24 14:46:41 +01:00
Devan Goodwin 832d83efaa
Allow etcd container to work with selinux. 2016-09-24 14:46:40 +01:00
Ilya Dmitrichenko 0f05ccb019
Cleanup some low-hanging fruits and review TODOs 2016-09-24 14:46:40 +01:00
Atanas Mirchev 9eeae34581
Add node CIDR allocation as an option to kubeadm.
This is useful for users who are used to deploying with a flannel
overlay network.
2016-09-24 14:46:40 +01:00
Luke Marsden 38b53e31f3
Before declaring success, require that the discovery deployment has at least one active pod. 2016-09-24 14:46:39 +01:00
Paulo Pires 389cb2c7cd
Add support for external and optionally secured etcd cluster. 2016-09-24 14:46:39 +01:00
Paulo Pires 26aa32d32b
Reviewed help text, fix typos, go {fmt,vet,lint}. 2016-09-24 14:46:38 +01:00
Ilya Dmitrichenko a42ad6a913
Move `pkg/kubadm` to `cmd/kubeadm/app`, remove `cmd/manual.go` 2016-09-24 14:46:38 +01:00
Lucas Käldström cab23e202e
Various improvements for kubeadm. Removed the user command, as it's too little time for implementing that. Now it's possible to use multiple arches. 2016-09-24 14:46:37 +01:00
Evgeny L a2a807b50d
Mount etcd data directory to host 2016-09-24 14:46:36 +01:00
Ilya Dmitrichenko b9fd31ff7e
Refactoring improtant parts and start on docs 2016-09-24 14:46:35 +01:00
Lucas Käldström 26c4f593aa
Cleanup/refactor some things, make it possible to use individual images, hide unused flags 2016-09-24 14:46:34 +01:00
Ilya Dmitrichenko b48df06aba
Refactor kube-dns addon constructors, more labels
- also add another IP to SANs
- fix mkdir calls
- add TODO for ComponentConfig
- start tagging TODOs by phases
2016-09-24 14:46:34 +01:00
Paulo Pires 9e4fc59d39
Added DNS add-on. 2016-09-24 14:46:34 +01:00
Ilya Dmitrichenko 1c132fe974
Address comments in review
- start cleaning up `cmd/manual.go`
- refine progress and error messages
- add missing blank lines after the license headers
- run `gofmt -s -w`
- do not set fake cloud provider
- add a note on why we cannot remove `HostNetwork: true` from `kube-discovery` pod just yet
- taint master and use `role=master`, set tolerations and affinity for `kube-discovery`
- parametrise log-level flag for all components
2016-09-24 14:46:33 +01:00
Ilya Dmitrichenko f223d814da
Initial version of kubeadm 2016-09-24 14:46:24 +01:00