Commit Graph

2993 Commits (45a436ac24a83137d509cb0e717b9595d5977556)

Author SHA1 Message Date
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
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