Commit Graph

3086 Commits (bca5aea5ba021f2b968bd90dc688e634b1866a1f)

Author SHA1 Message Date
deads2k 8ae8bf02a4 regenerate informers 2016-12-07 07:54:04 -05:00
deads2k 97854b8de5 update informer generator 2016-12-07 07:48:24 -05:00
deads2k 0579e86663 host apiservices resource 2016-12-07 07:47:09 -05:00
Zihong Zheng 19cf831086 kubedns: use initial resource listing as ready signal 2016-12-06 20:53:59 -08:00
Kubernetes Submit Queue 97ae7ccb56 Merge pull request #31647 from mikedanese/register-tainted
Automatic merge from submit-queue

add a configuration for kubelet to register as a node with taints

and deprecate --register-schedulable

ref #28687 #29178

cc @dchen1107 @davidopp @roberthbailey
2016-12-06 19:07:54 -08:00
Kubernetes Submit Queue cbf497b749 Merge pull request #38119 from liggitt/long-running
Automatic merge from submit-queue (batch tested with PRs 37032, 38119, 38186, 38200, 38139)

Detect long-running requests from parsed request info

Follow up to https://github.com/kubernetes/kubernetes/pull/36064

Uses parsed request info to more tightly match verbs and subresources

Removes regex-based long-running request path matching (which is easily fooled)

```release-note
The --long-running-request-regexp flag to kube-apiserver is deprecated and will be removed in a future release. Long-running requests are now detected based on specific verbs (watch, proxy) or subresources (proxy, portforward, log, exec, attach).
```
2016-12-06 18:29:35 -08:00
Kubernetes Submit Queue 87d907cafe Merge pull request #37084 from kenan435/fail-fast-on-duplicate-node
Automatic merge from submit-queue (batch tested with PRs 38194, 37594, 38123, 37831, 37084)

[kubeadm] Fail fast if there already is a node in the cluster with that name

kubeadm Fail fast if there is another node with the same name already in the cluster. 

Fixes #36255

cc @kubernetes/sig-cluster-federation
2016-12-06 17:41:37 -08:00
Kubernetes Submit Queue 4eb4777df1 Merge pull request #37831 from luxas/improve_reset
Automatic merge from submit-queue (batch tested with PRs 38194, 37594, 38123, 37831, 37084)

Improve kubeadm reset

Depends on: https://github.com/kubernetes/kubernetes/pull/36474
Broken out from: https://github.com/kubernetes/kubernetes/pull/37568
Carries: https://github.com/kubernetes/kubernetes/pull/35709, @camilocot

This makes the `kubeadm reset` command more robust and user-friendly.
I'll rebase after #36474 merges...

cc-ing reviewers: @mikedanese @errordeveloper @dgoodwin @jbeda
2016-12-06 17:41:35 -08:00
Kubernetes Submit Queue d4d6a32e9b Merge pull request #38123 from deads2k/api-48-remove-fields
Automatic merge from submit-queue (batch tested with PRs 38194, 37594, 38123, 37831, 37084)

remove unnecessary fields from genericapiserver config

Cleans up some unnecessary fields in the genericapiserver config.
2016-12-06 17:41:33 -08:00
Kubernetes Submit Queue d40710988f Merge pull request #38136 from deads2k/auth-11-join-certs
Automatic merge from submit-queue (batch tested with PRs 36990, 37494, 38152, 37561, 38136)

join client CA bundles

Last commit grabs client CA bundles from disparate parts of the auth config and makes a pool that contains all of them.

I suspect a rebase broke this because of ordering.  I'll keep these separate to make it easier for me to debug.
2016-12-06 14:13:37 -08:00
Kubernetes Submit Queue f600c94eab Merge pull request #37561 from deads2k/fed-01-types
Automatic merge from submit-queue (batch tested with PRs 36990, 37494, 38152, 37561, 38136)

api federation types

First commit adds types that can back the kubernetes-discovery server with an `kubectl` compatible way of adding federated servers.  Second commit is just generated code.

After we have types, I'd like to start splitting `kubernetes-discovery` into a "legacy" mode which will support what we have today and a "normal" mode which will provide an API federation server like this: https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/federated-api-servers.md that includes both discovery and proxy in a single server.  Something like this: https://github.com/openshift/kube-aggregator .

@kubernetes/sig-api-machinery @nikhiljindal
2016-12-06 14:13:35 -08:00
deads2k 0a6193fbe4 add apiregistration types 2016-12-06 13:45:10 -05:00
Mike Danese e225625a80 add a configuration for kubelet to register as a node with taints
and deprecate register-schedulable
2016-12-06 10:32:54 -08:00
deads2k 583dfbb0b1 generated 2016-12-06 13:10:38 -05:00
deads2k b723333be3 move APIResourceConfigSource to master 2016-12-06 10:19:25 -05:00
deads2k 6ea1d5d53d join client CA bundles into the accept path for genericapiserver 2016-12-06 09:56:13 -05:00
Kenan Karamehmedovic 16453a3334 Fail fast if there is already a node with same name as the one being joined. 2016-12-06 15:46:15 +01:00
deads2k fbb35b72ed update delegating auth to include front-proxy 2016-12-06 09:40:07 -05:00
deads2k 4f625db133 move client-ca to authentication args 2016-12-06 09:34:49 -05:00
Lucas Käldström 7a463eff08 Drain node on kubeadm reset and make it possible to specify if the node should be removed from the cluster as well 2016-12-06 15:43:59 +02:00
deads2k 985d502ed3 add basic wiring for kubernetes-discovery to become a kube-like api server 2016-12-06 08:19:39 -05:00
deads2k f255e46ee4 refactor kubernetes-discovery to use cobra and prep for genericapiserver 2016-12-06 08:08:50 -05:00
Lucas Käldström 67d4ddaf59 Improve the kubeadm reset command. Reorder the functions and log more user-friendly output 2016-12-06 14:45:29 +02:00
Lucas Käldström 51d733f418 Remove the cni directory when resetting; otherwise kubelet can pick up the wrong config on the next kubeadm init run 2016-12-06 14:45:19 +02:00
Alexander Kanevskiy 1eeb3f155f Pass proxy environment variables to static pods
To access outside world or cloud provider APIs it might be
required to use proxy.

Fixes: kubernetes/kubernetes#36573, kubernetes/kubeadm#5
2016-12-06 14:38:48 +02:00
NickrenREN 34d13c996a eventclient create error info print
Need to print error info when creating eventClient error , just as create kubeClient does 8 lines above
2016-12-06 17:55:46 +08:00
NickrenREN 48026ce655 modify startKubelet return
Since startKubelet() will always return nil, we donot need to judge its return err
2016-12-06 12:08:45 +08:00
Kubernetes Submit Queue 2c61d2f80c Merge pull request #38121 from deads2k/auth-09-remove-rbac-super
Automatic merge from submit-queue (batch tested with PRs 38111, 38121)

remove rbac super user

Cleaning up cruft and duplicated capabilities as we transition from RBAC alpha to beta.  In 1.5, we added a secured loopback connection based on the `system:masters` group name.  `system:masters` have full power in the API, so the RBAC super user is superfluous.

The flag will stay in place so that the process can still launch, but it will be disconnected.

@kubernetes/sig-auth
2016-12-05 14:14:41 -08:00
Jordan Liggitt 4359054616
Detect long-running requests from parsed request info 2016-12-05 16:46:28 -05:00
Kubernetes Submit Queue b1366bf55d Merge pull request #37976 from deads2k/controller-01-sa
Automatic merge from submit-queue (batch tested with PRs 36352, 36538, 37976, 36374)

demonstrate separation of controller intializers

Currently, controllers are all initialized in a monster method that make it difficult to individually pick out whether there are side-effects, difficult to group related controllers for selective enablement, and impossible to determine if there are hidden dependencies.

This pull demonstrates how we can break apart the monolith and start start the process of grouping and naming controllers for selective enablement.  In addition, the use of a map will help expose dependency ordering amongst these controllers and the separate methods will make it a lot harder to have side effects.

This also moves us closer to being able to author reflective unit tests that help ensure that basic RBAC bootstrap roles are at least present, even if they aren't correct.

@nikhiljindal since you were looking at the federation controller manager
@sttts since we're looking at trying out RBAC on these.
2016-12-05 11:08:47 -08:00
deads2k 2923d09091 remove rbac super user 2016-12-05 13:49:54 -05:00
Kubernetes Submit Queue 5e41d0904f Merge pull request #37830 from sttts/sttts-stratify-cert-generation
Automatic merge from submit-queue

Stratify apiserver cert generation

- move self-signed cert generation to `SecureServingOptions.MaybeDefaultWithSelfSignedCerts`
- make cert generation only depend on `ServerRunOptions`, not on an unfinished `Config` (this breaks the chicken-egg problem of a finished config in https://github.com/kubernetes/kubernetes/pull/35387#pullrequestreview-5368176)
- move loopback client config code into `config_selfclient.go`

Replaces https://github.com/kubernetes/kubernetes/pull/35387#event-833649341 by getting rid of duplicated `Complete`.
2016-12-05 10:15:47 -08:00
Kubernetes Submit Queue 0701737698 Merge pull request #36373 from vwfs/kubeadm_fix_centos_ssl
Automatic merge from submit-queue (batch tested with PRs 37366, 36373)

kubeadm: Let apiserver and controller-manager host-mount /etc/pki when required

#<!--  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 PR checks if /etc/pki is present on the host machine and adds a host-mount to the apiserver and controller-manager manifest if required.

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

**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
Fix incompatible host mounts for SSL certificates when deploying on CentOS with kubeadm
```
2016-12-05 08:13:42 -08:00
deads2k 5788317953 demonstrate separation of controller intializers 2016-12-05 10:24:45 -05:00
Dr. Stefan Schimanski 3f01c37b9d Update generated files 2016-12-05 16:05:52 +01:00
Dr. Stefan Schimanski a4cf364dbd Replace glog.Fatals with "return fmt.Errorf" in apiservers 2016-12-05 16:05:52 +01:00
Dr. Stefan Schimanski 5b1d45bc15 Stratify certificate loading and self-sign cert generation
This removes all dependencies on Config during cert generation, only operating
on ServerRunOptions. This way we get rid of the repeated call of Config.Complete
and cleanly stratify the GenericApiServer bootstrapping.
2016-12-05 14:58:15 +01:00
Dr. Stefan Schimanski 2dff13f332 Update generated files 2016-12-05 12:42:31 +01:00
Dr. Stefan Schimanski 24e24fc7bb Add verb support to gc and namespace controllers 2016-12-05 12:36:05 +01:00
Dr. Stefan Schimanski 458d2b2fe4 Add verb support for discovery client 2016-12-05 12:36:05 +01:00
Alexander Block fd8e6d03e6 Fix test failures in manifests_test.go 2016-12-05 10:28:23 +01:00
Alexander Block 8373ab5890 kubeadm: Let apiserver and controller-manager host-mount /etc/pki when required
fixes: #36150
2016-12-05 10:11:15 +01:00
Kubernetes Submit Queue 0bea8ca301 Merge pull request #37793 from caiyixiang/proxy
Automatic merge from submit-queue (batch tested with PRs 37066, 37793)

correct a few spelling mistakes
2016-12-04 23:01:43 -08:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Clayton Coleman 138267c876
Switch generator logic to use pkg/apis/meta/v1 2016-12-03 18:57:30 -05:00
Dr. Stefan Schimanski eeb582e53f Move DefaultServiceIPRange into pkg/master 2016-12-03 18:34:22 +01:00
Kubernetes Submit Queue 00e369b14f Merge pull request #37813 from kubernetes/revert-36625-branch-eliminate-recursive-call-attemptToUpdateMasterRoleLabelsAndTaints
Automatic merge from submit-queue (batch tested with PRs 35300, 36709, 37643, 37813, 37697)

Revert "[kubeadm] use iteration instead of recursion in function"

Reverts kubernetes/kubernetes#36625

Removing the recursive call means that `n` is never updated, so you never succeed in the update, and you've creating an infinite loop.

Also, this entire bit of functionality should be a patch and you won't have to worry about conflicts.  

@luxas
2016-12-03 08:55:59 -08:00
Kubernetes Submit Queue f3d463f114 Merge pull request #37643 from ncdc/informer-gen
Automatic merge from submit-queue (batch tested with PRs 35300, 36709, 37643, 37813, 37697)

Add generated informers

Add informer-gen and the informers it generates. We'll do follow-up PRs to convert everything currently using the hand-written informers to the generated ones.

TODO:

- [x] switch to `GroupVersionResource`
- [x] finish godoc

@deads2k @caesarxuchao @sttts @liggitt
2016-12-03 08:55:57 -08:00
Kubernetes Submit Queue caa935df45 Merge pull request #37442 from NickrenREN/kubelet-run
Automatic merge from submit-queue (batch tested with PRs 37094, 37663, 37442, 37808, 37826)

fix if condition question in kubelet run() function

Here variable err returned by function NewForConfig(&eventClientConfig) if CreateAPIServerClientConfig() function runs correctly .  And we should not print "invalid kubeconfig" info.
Should we use else instead of if.
2016-12-03 04:27:50 -08:00
Kubernetes Submit Queue efa42b95a6 Merge pull request #37532 from smarterclayton/remove_export
Automatic merge from submit-queue

Remove ExportOptions from api/internal and use unversioned

Should only have one internal object in use

Part of #37530
2016-12-02 21:11:56 -08:00
Kubernetes Submit Queue 6b05a519a3 Merge pull request #37169 from smarterclayton/approver
Automatic merge from submit-queue (batch tested with PRs 37945, 37498, 37391, 37209, 37169)

Refactor certificate controller to make approval an interface

@mikedanese
2016-12-02 20:32:49 -08:00
Kubernetes Submit Queue c868b870e6 Merge pull request #37498 from dgoodwin/firewalld-check
Automatic merge from submit-queue (batch tested with PRs 37945, 37498, 37391, 37209, 37169)

Warn if firewalld service is enabled.

Fixes https://github.com/kubernetes/kubeadm/issues/21

Output will be:

```
(root@centos1 ~) $ kubeadm init             
Running pre-flight checks
WARNING: firewalld is active, please ensure ports [6443 9898 10250] are open
```

I went with the port list from @errordeveloper 's ansible playbook here but it's possible there should be others listed.
2016-12-02 20:32:44 -08:00
Kubernetes Submit Queue 51458a0ef0 Merge pull request #37524 from vwfs/skip_etcd_checks_reset
Automatic merge from submit-queue (batch tested with PRs 36263, 36755, 37357, 37222, 37524)

kubeadm: Skip etcd related preflight checks and reset actions for external etcd

**What this PR does / why we need it**:
Skip etcd related preflight checks and reset actions for external etcd

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # https://github.com/kubernetes/kubeadm/issues/69#issuecomment-262988388

**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
kubeadm: Skip etcd related preflight checks and reset actions for external etcd
```
2016-12-02 16:26:51 -08:00
Kubernetes Submit Queue 1132d1645b Merge pull request #37222 from kad/dyn-version
Automatic merge from submit-queue (batch tested with PRs 36263, 36755, 37357, 37222, 37524)

kubeadm: Implement support for symbolic labels in --use-kubernetes-version

**What this PR does / why we need it**: This patch adds "stable", "latest" and other labels as valid versions in "kubeadm init --use-kubernetes-version" flag.

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"

**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
- kubeadm init --use-kubernetes-version now understands "stable","latest", "stable-1.4" and other labels as valid version. It will fetch actual build number from release servers. 
```
2016-12-02 16:26:49 -08:00
Derek McQuay b3a56abed0 kubeadm: updated pkg node tests to correct type
updated ""k8s.io/kubernetes/pkg/api" to apiv1 "k8s.io/kubernetes/pkg/api/v1" to fix broken types in tests.
2016-12-02 08:42:46 -08:00
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
Kubernetes Submit Queue 35808b39aa Merge pull request #36472 from xilabao/cert-key-coexist
Automatic merge from submit-queue

fix apiserver start failed if lost one of cert and key
2016-12-01 07:52:15 -08:00
Clayton Coleman bdd880a1b4
Refactor certificate controller to make approval an interface 2016-12-01 09:55:28 -05: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
caiyixiang da46d1cf51 correct a few spelling mistakes 2016-12-01 16:34:25 +08:00
Kubernetes Submit Queue b0fd700f61 Merge pull request #36604 from deads2k/api-42-add-generic-loopback
Automatic merge from submit-queue

move parts of the mega generic run struct out

This splits the main `ServerRunOptions` into composeable pieces that are bindable separately and adds easy paths for composing servers to run delegating authentication and authorization.

@sttts @ncdc alright, I think this is as far as I need to go to make the composing servers reasonable to write.  I'll try leaving it here
2016-11-30 21:11:05 -08:00
Kubernetes Submit Queue 66fe55f5ad Merge pull request #37238 from deads2k/controller-02-minor-fixes
Automatic merge from submit-queue

controller manager refactors

The controller manager needs some significant cleanup.  This starts us down the patch by respecting parameters like `stopCh`, simplifying discovery checks, removing unnecessary parameters, preventing unncessary fatals, and using our client builder.

@sttts @ncdc
2016-11-30 20:08:19 -08:00
NickrenREN 19c9860bb3 fix if condition question in kubelet run() function
here variable err returned by function NewForConfig(&eventClientConfig) if CreateAPIServerClientConfig() function is executed correctly. We should use else instead of if.
Or put block (if err != nil)  to block (if err == nil) above
2016-12-01 12:00:25 +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
Andy Goldstein 3bc87f9338 Add generated informers 2016-11-30 09:17:12 -05:00
xilabao 7016057ff7 fix apiserver start failed if lost one of cert and key, add a error message 2016-11-30 17:25:52 +08:00
Pengfei Ni f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
deads2k ab9a842f3c add loopback auth defaulting to generic apiserver 2016-11-29 11:02:35 -05:00
deads2k 6846855929 add delegating authorization flags and options 2016-11-29 10:59:43 -05:00
deads2k ca2b5f136e split authorization from main options struct 2016-11-29 10:59:43 -05:00
deads2k 5cea15ac9f add delegating auth options 2016-11-29 10:59:43 -05:00
deads2k 7c0e48f544 split out authentication options 2016-11-29 10:59:43 -05:00
deads2k 56b7a8b02b remove some options from mega-struct 2016-11-29 10:59:43 -05:00
deads2k 18074d7606 split insecure serving options 2016-11-29 10:59:42 -05:00
deads2k a08f3ba521 split secure serving options 2016-11-29 10:59:42 -05:00
deads2k a9af8206cb split generic etcdoption out of main struct 2016-11-29 10:59:42 -05: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
deads2k 585daa2069 use the client builder to support using SAs 2016-11-28 15:02:22 -05:00
deads2k 21c304333a return errors instead of fataling 2016-11-28 15:02:21 -05:00
deads2k 49ebc2c2ae remove unnecessary startcontroller options 2016-11-28 15:02:21 -05:00
deads2k 6080620553 simplify enabled resource checks 2016-11-28 15:02:21 -05:00