Commit Graph

3120 Commits (0c669fe6cc48208ebcdd43fa2ff425fce3c359a0)

Author SHA1 Message Date
Kubernetes Submit Queue 5b5b1e7533 Merge pull request #38371 from wojtek-t/get_options_in_client
Automatic merge from submit-queue (batch tested with PRs 38354, 38371)

Add GetOptions parameter to Get() calls in client library

Ref #37473 

This PR is super mechanical - the non trivial commits are:
- Update client generator
- Register GetOptions in batch/v2alpha1 group
2016-12-09 04:12:09 -08:00
Kubernetes Submit Queue 3a85ad9514 Merge pull request #38354 from bruceauyeung/k8s-branch-blank-validate-on-env-params
Automatic merge from submit-queue

trimspace on user specified env params

**What this PR does / why we need it**:
before this PR, for example, if user `export KUBE_REPO_PREFIX=" "`, kubeadm will get an absolutely invalid repo_prefix.
this PR trims all leading and trailing white spaces from user specified env params.

Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-12-09 03:43:16 -08:00
Lucas Käldström 810e9e107f Refactor the whole binary, a lot of changes in one commit I know, but I just hacked on this and modified everything I thought was messy or could be done better.
Fix boilerplates, comments in the code and make the output of kubeadm more user-friendly
Start using HostPKIPath and KubernetesDir everywhere in the code, so they can be changed for real
More robust kubeadm reset code now.
Removed old glog-things from app.Run()
Renamed /etc/kubernetes/cloud-config.json to /etc/kubernetes/cloud-config since it shouldn't be a json file
Simplification of the code
Less verbose output from master/pki.go
Cleaned up dead code

Start a small logging/output framework:
 - fmt.Println("[the-stage-here] Capital first letter of this message. Tell the user what the current state is")
 - fmt.Printf("[the-stage-here] Capital first letter. Maybe a [%v] in the end if an error should be displayed. Always ends with \n")
 - fmt.Errorf("Never starts with []. Includes a short error message plus the underlying error in [%v]. Never ends with \n")
2016-12-09 12:48:12 +02:00
Lucas Käldström e46d8fef60 Run the root check before the other checks in order to fail fast if non-root to avoid strange errors. Also auto-start the kubelet if inactive 2016-12-09 12:48:11 +02:00
Lucas Käldström 95d97a0e8e Mark socat, ethtool and ebtables as soft deps, since kubelet can be run in a container. Also refactor preflight.go a little bit and improve logging 2016-12-09 12:48:11 +02:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Wojciech Tyczynski cff55e5894 Autogenerate clients 2016-12-09 09:42:01 +01:00
Wojciech Tyczynski 31a5333548 Update client generator 2016-12-09 09:42:00 +01:00
Kubernetes Submit Queue 98c4c73c71 Merge pull request #37770 from enj/enj/r/storage_decorator
Automatic merge from submit-queue (batch tested with PRs 38278, 37770)

Refactor REST storage to use generic defaults

This removes the repetition in the REST storage builders by moving the logic to `restoptions.ApplyOptions`.  `registry.StorageWithCacher`/`generic.StorageDecorator` no longer assume that they can build the `keyFunc` for arbitrary objects.  `restoptions.ApplyOptions` uses the `registry.Store`'s `KeyFunc` for its call to `generic.StorageDecorator`.

```release-note
Cluster federation servers have changed the location in etcd where federated services are stored, so existing federated services must be deleted and recreated. Before upgrading, export all federated services from the federation server and delete the services. After upgrading the cluster, recreate the federated services from the exported data.
```
2016-12-09 00:25:35 -08:00
Justin Santa Barbara dd351db799 conversion-gen: add --skip-unsafe flag
We should expose the SkipUnsafe option, for legacy compatability, so
that conversion-go can be used in other projects, and for platforms
where unsafe is not available.

Make unsafe code generation the default though, and have the help text
hint that the resulting code is sub-optimal.
2016-12-09 02:33:22 -05:00
Brendan Burns 91f19e3dfc Add an azure container registry credential provider. 2016-12-08 21:38:11 -08:00
Kubernetes Submit Queue bb792b17e4 Merge pull request #38415 from liggitt/client-status
Automatic merge from submit-queue (batch tested with PRs 38432, 36887, 38415)

Update client status generator to not use json tags

fixes dependence on json tags in internal versions and drives the generation of UpdateStatus based on type comments

caught a type we were missing an UpdateStatus for
2016-12-08 20:37:58 -08:00
Kubernetes Submit Queue e0c6b99e25 Merge pull request #36887 from hex108/pullImage
Automatic merge from submit-queue (batch tested with PRs 38432, 36887, 38415)

Add --image-pull-stuck-timeout option  to kubelet

In this PR, add --image-pull-stuck-time option to specify the stuck timeout for pulling image.

When docker extracts image layer, there is no progress. The progress will exceed 1m if the layer is big or system is busy. It happend in our cluster, so I add above option to specify the timeout. 

Related error log:
<pre>
[... kube_docker_client.go:29] Cancel pulling image "our_registry/demo/test" because of no progress for 1m0s, latest progress "c914ad57d670": Extracting [==================>] 513.5 MB/513.5MB"
[... docker_manager.go:2254] container start failed: ErrImagePull: net/http: request canceled
</pre>
2016-12-08 20:37:55 -08:00
Kubernetes Submit Queue 8f607f8906 Merge pull request #35655 from pwittrock/yaml
Automatic merge from submit-queue (batch tested with PRs 36736, 35956, 35655, 37713, 38316)

Tool to generate yaml representation of the kubectl help text

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

It generates a yaml representation of the kubectl help so we can generate higher fidelity docs.
2016-12-08 19:51:56 -08:00
Jordan Liggitt da15bd9260
Update client status generator to not use json tags 2016-12-08 21:58:01 -05:00
Jun Gong 036899ec98 Add --image-pull-progress-deadline option to kubelet 2016-12-09 09:28:57 +08:00
Monis Khan a6bafbacbf
Refactor REST storage to use generic defaults
Signed-off-by: Monis Khan <mkhan@redhat.com>
2016-12-08 17:24:21 -05:00
Kubernetes Submit Queue cc794dda1e Merge pull request #38319 from deads2k/fed-08-host-discovery
Automatic merge from submit-queue (batch tested with PRs 36310, 37349, 38319, 38402, 38338)

add summarizing discovery controller and handlers

Requires https://github.com/kubernetes/kubernetes/pull/38304 .

This adds discovery support to the new `kubernetes-discovery` that runs based on a controller wired up to the `APIService.apiregistration.k8s.io`.  It also adds in plumbing for `local-up-cluster.sh` to register the "normal" kube resources.

@kubernetes/sig-api-machinery 
@sttts
2016-12-08 13:44:55 -08:00
Kubernetes Submit Queue 53d41d036d Merge pull request #37349 from tanshanshan/httpcode
Automatic merge from submit-queue

replace HTTP status code with  HTTP status code const

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

replace HTTP status code with  HTTP status code const

Thanks!

**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-12-08 13:44:00 -08:00
Kubernetes Submit Queue 8820922997 Merge pull request #35449 from MrHohn/kubedns-readysignal
Automatic merge from submit-queue

kubedns: use initial resource listing as ready signal

Fix #35140.

Set up the ready signal after the first resource listing finished for both endpoints and services instead of listen on kubernetes service.

@bprashanth @bowei @thockin

**Release note**:
```
```
2016-12-08 11:35:44 -08:00
deads2k fb9c109953 add summarizing discovery controller and handlers 2016-12-08 13:54:18 -05:00
Kubernetes Submit Queue a5a4d4f681 Merge pull request #38110 from deads2k/controller-15-split
Automatic merge from submit-queue (batch tested with PRs 35939, 38381, 37825, 38306, 38110)

split easy controllers from giant start func

continues work from https://github.com/kubernetes/kubernetes/pull/37976 to separate controller initialization.
2016-12-08 07:52:53 -08:00
Kubernetes Submit Queue 47181133c1 Merge pull request #35884 from foxyriver/exchange
Automatic merge from submit-queue

print log error

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

when failed to load CA,will print both "Loaded CA:" and "Error loading root CA certificate date:" ,but only need to print "Error loading root CA certificate date:" in fact.

**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-12-08 03:29:41 -08:00
bruceauyeung 511350a369 trimspace on user specified env params
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-12-08 10:31:23 +08:00
Kubernetes Submit Queue 72e7adb658 Merge pull request #36735 from YuPengZTE/devHTTP
Automatic merge from submit-queue

type HttpProxyCheck should be HTTPProxyCheck

**What this PR does / why we need it**:
Change HttpProxyCheck to HTTPProxyCheck
**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**:
golint
**Release note**:

```release-note
```

Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-12-07 16:21:21 -08:00
Kubernetes Submit Queue ca049360e2 Merge pull request #38258 from derekwaynecarr/kernel-memcg-flag
Automatic merge from submit-queue (batch tested with PRs 38318, 38258)

kernel memcg notification enabled via experimental flag

Kubelet integrates with kernel memcg notification API if and only if enabled via experimental flag.
2016-12-07 15:00:10 -08:00
Kubernetes Submit Queue 8d518d36b5 Merge pull request #38289 from deads2k/fed-07-wire-auth
Automatic merge from submit-queue (batch tested with PRs 36543, 38189, 38289, 38291, 36724)

add authentication/authorization to kubernetes-discovery

Wires authentication and authorization into `kubernetes-discovery` and re-enables the `local-up-cluster.sh` along with proper permission granting for RBAC cases.

@sttts @liggitt
2016-12-07 11:40:17 -08:00
Kubernetes Submit Queue aa08702d23 Merge pull request #37835 from luxas/kubeadm_cloudprovider_and_dns
Automatic merge from submit-queue (batch tested with PRs 38294, 37009, 36778, 38130, 37835)

Add a cloudprovider validator flag to kubeadm and update the DNS spec

Broken out from: https://github.com/kubernetes/kubernetes/pull/37568

This PR creates a flag for `cloud-provider` that validates the value before `RunInit()` is run, which makes it now act as a "real" flag
Then it removes the `k8s.io/kubernetes/pkg/cloudprovider` dependency, which makes the binary ~40MB smaller! That's _really_ worth it!

In the second commit, the DNS addon is updated to the latest version: https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/skydns-rc.yaml.base

@kubernetes/sig-cluster-lifecycle
2016-12-07 10:45:22 -08:00
Derek Carr 5b2d1c2c25 Enable kernel memcg notification via additional flag 2016-12-07 10:09:41 -05:00
deads2k 798d3edabf add authentication/authorization to kubernetes-discovery 2016-12-07 09:33:43 -05:00
Lucas Käldström f4cb405164 Update the built-in DNS addon of kubeadm to the v1.5 version 2016-12-07 16:24:21 +02:00
Lucas Käldström 342f98d516 Create a new cloud-provider flag in order to catch wrong args directly and don't import the cloudprovider package and save ~50% in binary size 2016-12-07 16:24:02 +02:00
deads2k f36a5ae9a1 separate controller initialization for easy controllers 2016-12-07 09:00:53 -05:00
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