Commit Graph

3433 Commits (aee2378c688528e8677c669afd8e909e474048dd)

Author SHA1 Message Date
Paulo Pires 6b5d803e8a
kubeadm: improve init token logging. 2017-01-17 12:42:06 +00:00
Dr. Stefan Schimanski 52f6831576 genericapiserver: cut off kube pkg/version dependency 2017-01-17 12:34:05 +01:00
Paulo Pires 2e8df3b569
kubeadm: init must validate or generate token before anything else.
Fixes kubernetes/kubeadm#112
2017-01-17 10:29:15 +00:00
Paulo Pires 262eeea0d3
kubeadm: upgrade kube-dns to 1.11.0.
Fixes kubernetes/kubeadm#121
2017-01-17 09:13:04 +00:00
Harry Zhang a88cbdc52d Update bazel 2017-01-17 16:55:06 +08:00
Dr. Stefan Schimanski 8fe0958ba0 Update bazel 2017-01-17 09:30:48 +01:00
Dr. Stefan Schimanski 5c88b7d05a Fix imports 2017-01-17 09:30:30 +01:00
bruceauyeung 2ba9347233 resetting cluster should check whether docker service is active
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2017-01-17 15:53:19 +08:00
Kubernetes Submit Queue 73c900b598 Merge pull request #38272 from xingzhou/kube-38143
Automatic merge from submit-queue

Added validation for API server's 'apiserver-count' flag.

Added validation for API server's 'apiserver-count' flag. The value of this flag should be a positive number, otherwise, will cause error while reconciling endpoints in MasterCountEndpointsReconciler. 

Fixed #38143
2017-01-16 19:14:40 -08:00
Harry Zhang b8678ad130 Use statefulset instead in controller
Rename e2e folder to statefulset
2017-01-17 10:36:37 +08:00
Kubernetes Submit Queue 52a6ad0acb Merge pull request #39890 from deads2k/generic-23-post-client-go-update
Automatic merge from submit-queue

move name generation to generic api server storage helpers

Move name generation to the genericapiserver since only the server needs to know about it.

@kubernetes/sig-api-machinery-misc @sttts
2017-01-16 14:54:14 -08:00
Kubernetes Submit Queue 451a24d6de Merge pull request #39677 from apprenda/kubeadm_104-lowercase_token
Automatic merge from submit-queue

kubeadm: must lower-case token portion used in DNS label.

**What this PR does / why we need it**: In Kubernetes, DNS labels must be lower-case. `kubeadm` doesn't care when creating certain objects through the API. This PR fixes that erroneous behavior.

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

**Special notes for your reviewer**: /cc @luxas @mikedanese @dgoodwin
2017-01-16 13:43:12 -08:00
deads2k a3e71b2cef move name generation to generic api server storage helpers 2017-01-16 16:04:04 -05:00
Paulo Pires a34eacc2af
kubeadm: token must be validated before creation, deletion or usage.
Refs kubernetes/kubeadm#104
2017-01-16 19:25:07 +00:00
Paulo Pires 44b044ab0a
kubeadm: token generation must respect Kubernetes DNS labeling rules.
Refs kubernetes/kubeadm#104
2017-01-16 19:14:20 +00:00
Paulo Pires 394f93b921
kubeadm: replaced period as token separator in favor of colon. 2017-01-16 18:57:23 +00:00
deads2k 7993e7c8aa move openapi types to pkg/openapi 2017-01-16 13:40:14 -05:00
Kubernetes Submit Queue 6defc30337 Merge pull request #39882 from deads2k/api-59-errors
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

move api/errors to apimachinery

`pkg/api/errors` is a set of helpers around `meta/v1.Status` that help to create and interpret various apiserver errors.  Things like `.NewNotFound` and `IsNotFound` pairings.  This pull moves it into apimachinery for use by the clients and servers.

@smarterclayton @lavalamp First commit is the move plus minor fitting.  Second commit is straight replace and generation.
2017-01-16 10:37:42 -08:00
Kubernetes Submit Queue ab5c44efd5 Merge pull request #39946 from sttts/sttts-BuildDefaultStorageFactory-to-kubeapiserver
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

genericapiserver: cut off pkg/apis/extensions and pkg/storage dependencies

Move BuildDefaultStorageFactory to kubeapiserver.
2017-01-16 10:37:41 -08:00
Paulo Pires c707cbf176
kubeadm: test should not proceed if script execution fails. 2017-01-16 18:23:30 +00:00
Paulo Pires 0fdc0fcfbb
kubeadm: test should escape regexp on output. 2017-01-16 18:23:24 +00:00
Kubernetes Submit Queue 639106540b Merge pull request #39902 from mikedanese/bad-log
Automatic merge from submit-queue (batch tested with PRs 39947, 39936, 39902, 39859, 39915)

don't lie about starting the controllers in the controller manager

We print started even if it didn't start.
2017-01-16 09:26:16 -08:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
Dr. Stefan Schimanski 1a7242a84c Move BuildDefaultStorageFactory to kubeapiserver 2017-01-16 14:25:58 +01:00
Kubernetes Submit Queue eb9f953496 Merge pull request #39876 from deads2k/generic-20-deps-03
Automatic merge from submit-queue

move more things to apiserver

```
pkg/genericapiserver/api/handlers/negotiation/ -> apiserver/pkg/handlers/negotiation
pkg/genericapiserver/api/metrics -> apiserver/pkg/metrics
pkg/genericapiserver/api/request -> apiserver/pkg/request
pkg/util/wsstream -> apiserver/pkg/util/wsstream
plugin/pkg/auth/authenticator/request/headerrequest -> apiserver/pkg/authentication/request/headerrequest
plugin/pkg/webhook -> apiserver/pkg/webhook
```

and mechanicals.

`k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger` needs to be sorted out.
2017-01-16 04:14:37 -08:00
NickrenREN 59fef371b1 log cfgzErr if err happened
We need to log err info when err info returned by initConfigz(),no matter what the result of utilconfig.DefaultFeatureGate.DynamicKubeletConfig() is and
whether s.RunOnce is true or not.
We should log the initKubeletConfigSync() err info too.
2017-01-14 17:08:37 +08:00
Kubernetes Submit Queue 29145ed95d Merge pull request #39817 from smarterclayton/proto_staging
Automatic merge from submit-queue

Generate protobuf into vendor for pseudo vendored models

Fixes #39764

@ncdc
2017-01-13 19:34:59 -08:00
Mike Danese c6da1bc2ef don't lie about starting the controller manager 2017-01-13 16:27:00 -08:00
deads2k 31b6ba4e94 mechanicals 2017-01-13 16:33:09 -05:00
Clayton Coleman e4b39b17d4
Protobuf generation for staged packages 2017-01-13 16:20:03 -05:00
Antoine Pelisse ec5965f2ea Update OWNERS approvers and reviewers: cmd/kube-controller-manager 2017-01-13 13:01:25 -08:00
Kubernetes Submit Queue a6fa5c2bfd Merge pull request #39814 from deads2k/api-58-multi-register
Automatic merge from submit-queue

replace global registry in apimachinery with global registry in k8s.io/kubernetes

We'd like to remove all globals, but our immediate problem is that a shared registry between k8s.io/kubernetes and k8s.io/client-go doesn't work.  Since client-go makes a copy, we can actually keep a global registry with other globals in pkg/api for now.

@kubernetes/sig-api-machinery-misc @lavalamp @smarterclayton @sttts
2017-01-13 12:37:02 -08:00
Kubernetes Submit Queue e9165d3d46 Merge pull request #36397 from apelisse/owners-cmd-kube-apiserver
Automatic merge from submit-queue

Curating Owners: cmd/kube-apiserver

cc @lavalamp @smarterclayton @krousey @nikhiljindal

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the future in
the **reviewers** section. You probably do NOT need to modify the **approvers**
section. Names asre sorted by relevance, using some secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2017-01-13 10:56:45 -08:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
Kubernetes Submit Queue 29d4778314 Merge pull request #39740 from deads2k/controller-16-add-flag
Automatic merge from submit-queue (batch tested with PRs 39661, 39740, 39801, 39468, 39743)

add --controllers to controller manager

Adds a `--controllers` flag to the `kube-controller-manager` to indicate which controllers are enabled and disabled.  From the help:

```
      --controllers stringSlice                                           A list of controllers to enable.  '*' enables all on-by-default controllers, 'foo' enables the controller named 'foo', '-foo' disables the controller named 'foo'.
All controllers: certificatesigningrequests, cronjob, daemonset, deployment, disruption, endpoint, garbagecollector, horizontalpodautoscaling, job, namespace, podgc, replicaset, replicationcontroller, resourcequota, serviceaccount, statefuleset
```
2017-01-12 13:58:26 -08:00
Kubernetes Submit Queue ee49906c45 Merge pull request #39661 from NickrenREN/clientset-redundant-modify
Automatic merge from submit-queue

fix redundant alias clientset

remove redundant alias clientset
2017-01-12 13:29:16 -08:00
deads2k 05eb75612f replace global registry in apimachinery with global registry in k8s.io/kubernetes 2017-01-12 15:14:07 -05:00
deads2k d9b75ed82b add --controllers to controller manager 2017-01-12 08:46:33 -05:00
deads2k 9a8bf348a6 move tunneler out of generic 2017-01-12 08:21:58 -05:00
NickrenREN a12dea14e0 fix redundant alias clientset 2017-01-12 10:21:05 +08:00
Dr. Stefan Schimanski 2741eb7fdb Update generated files 2017-01-11 21:54:07 +01:00
Kubernetes Submit Queue 931bccf907 Merge pull request #38666 from tanshanshan/empty-check
Automatic merge from submit-queue (batch tested with PRs 39475, 38666, 39327, 38396, 39613)

Add checking the nil value 

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

Add checking the nil value.

Thanks.

**Special notes for your reviewer**:
2017-01-11 09:14:52 -08:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
deads2k 70778cccfe k8s.io/apimachinery scripts 2017-01-11 08:15:34 -05:00
Kubernetes Submit Queue dccd073888 Merge pull request #39495 from apprenda/kubeadm_89-remove_preflight_stutter
Automatic merge from submit-queue (batch tested with PRs 39495, 39547)

kubeadm: updated preflight types to avoid stutter

Small change to kubeadm preflight pkg to remove stutter from preflight types PreFlightError and PreFlightCheck (now names Error and Checker). 

**Release note**:

`NONE`
2017-01-10 23:20:08 -08:00
Kubernetes Submit Queue f74a556f56 Merge pull request #39534 from apprenda/kubeadm_refactor_token_discovery
Automatic merge from submit-queue (batch tested with PRs 39684, 39577, 38989, 39534, 39702)

kubeadm: refactored token discovery.

**What this PR does / why we need it**: refactored `kubeadm` token discovery to follow the discovery interface and use new TLS bootstrap mechanism.

/cc @luxas @mikedanese
2017-01-10 22:24:15 -08:00
Kubernetes Submit Queue c425f77263 Merge pull request #39617 from apprenda/kubeadm_dns_upgrade
Automatic merge from submit-queue (batch tested with PRs 39673, 39536, 39617, 39540, 39686)

kubeadm: updated DNS deployment.

**What this PR does / why we need it**: Updates KubeDNS deployment to match upstream.

**Special notes for your reviewer**: It was tested manually by bootstrapping a new cluster, running a busybox container and making sure one could `nslookup` from within the container to find `kubernetes` and other services.
2017-01-10 20:38:17 -08:00
Kubernetes Submit Queue addc6cae4a Merge pull request #38212 from mikedanese/kubeletauth
Automatic merge from submit-queue (batch tested with PRs 38212, 38792, 39641, 36390, 39005)

Generate a kubelet CA and kube-apiserver cert-pair for kubelet auth.

cc @cjcullen
2017-01-10 19:48:09 -08:00
tanshanshan 7d4b594c64 check nil 2017-01-11 11:35:36 +08:00
Kubernetes Submit Queue 87b9f6fa24 Merge pull request #39627 from alejandroEsc/ae/kubelet/log
Automatic merge from submit-queue (batch tested with PRs 39695, 37054, 39627, 39546, 39615)

fixed error log that would cause two log lines to run into each other…

**What this PR does / why we need it**:
Fixed error log that would cause two log lines to run into each other. Logs running into each other can be reproduced by running local-up-cluster.sh on osx.


**Release note**:
```NONE
```
2017-01-10 18:57:24 -08:00
Kubernetes Submit Queue 5aa177a81f Merge pull request #37054 from tanshanshan/remove-repeat1
Automatic merge from submit-queue (batch tested with PRs 39695, 37054, 39627, 39546, 39615)

remove repeating const declaration

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

remove repeating const declaration  , and avoid const declaration in  loop

Thanks.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-10 18:57:22 -08:00
Paulo Pires 8a195b9a1b
kubeadm: refactored token discovery. 2017-01-11 01:09:34 +00:00
Paulo Pires d2e0913e68
kubeadm: fixed TLS bootstrap. 2017-01-11 01:08:31 +00:00
Derek McQuay 8f0f09c0fe kubeadm: updated preflight types to avoid stutter
PreFlightError and PreFlightCheck to Error and Checker to avoid
preflight.PreFlightError and preflight.PreFlightCheck stutter.
2017-01-10 16:20:38 -08:00
Kubernetes Submit Queue 609e3e3890 Merge pull request #39619 from deads2k/fed-20-rename
Automatic merge from submit-queue (batch tested with PRs 34488, 39511, 39619, 38342, 39491)

rename kubernetes-discovery to kube-aggregator

Rename `kubernetes-discovery` to `kube-aggregator`.  Move and bulk rename.

@kubernetes/sig-api-machinery-misc
2017-01-10 16:07:14 -08:00
Kubernetes Submit Queue 495ab24fb5 Merge pull request #39542 from apprenda/kubeadm_99-add_bridge-nf_check
Automatic merge from submit-queue (batch tested with PRs 39486, 37288, 39477, 39455, 39542)

kubeadm: updated preflight to check for bridge-nf

Added a preflight check to determine if /proc/sys/net/bridge/bridge-nf-call-iptables is set to 1 (see  http://kubernetes.io/docs/admin/network-plugins/#network-plugin-requirements). 

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

/cc @pires @luxas 

**Release note**:

`NONE`
2017-01-10 14:33:18 -08:00
Kubernetes Submit Queue 26ef9a9fc2 Merge pull request #39591 from NickrenREN/kubelet-app-RunKubelet
Automatic merge from submit-queue (batch tested with PRs 39648, 38167, 39591, 39415, 39612)

optimize RunKubelet variable style
2017-01-10 13:33:12 -08:00
Kubernetes Submit Queue 7c3fff1a95 Merge pull request #39551 from chrislovecnm/reconciler-time-increases
Automatic merge from submit-queue (batch tested with PRs 39628, 39551, 38746, 38352, 39607)

Increasing times on reconciling volumes fixing impact to AWS.

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

We are currently blocked by API timeouts with PV volumes.  See https://github.com/kubernetes/kubernetes/issues/39526.  This is a workaround, not a fix.

**Special notes for your reviewer**:

A second PR will be dropped with CLI cobra options in it, but we are starting with increasing the reconciliation periods.  I am dropping this without major testing and will test on our AWS account. Will be marked WIP until I run smoke tests.

**Release note**:

```release-note
Provide kubernetes-controller-manager flags to control volume attach/detach reconciler sync.  The duration of the syncs can be controlled, and the syncs can be shut off as well. 
```
2017-01-10 11:54:15 -08:00
Kubernetes Submit Queue 7d7ba8bafe Merge pull request #39442 from deads2k/generic-08-client-go-01
Automatic merge from submit-queue

switch webhook to clientgo

Switches the delegating authentication and authorization webhooks to use client-go.  The ripples go out aways, but I kept it as contained as I could.

@sttts
2017-01-10 09:53:41 -08:00
deads2k 453651cbfc rename kubernetes-discovery to kube-aggregator 2017-01-10 12:27:42 -05:00
chrislovecnm ac49139c9f updates from review 2017-01-09 17:20:19 -07:00
chrislovecnm a973c38c7d The capability to control duration via controller-manager flags,
and the option to shut off reconciliation.
2017-01-09 16:47:13 -07:00
deads2k 1df5b658f2 switch webhook to clientgo 2017-01-09 16:53:24 -05:00
Kubernetes Submit Queue 73727e3791 Merge pull request #39439 from smarterclayton/version_watch
Automatic merge from submit-queue (batch tested with PRs 37845, 39439, 39514, 39457, 38866)

Move watch/versioned to pkg/apis/meta/v1/watch.go

Watch is a part of the server API
2017-01-09 13:15:16 -08:00
Alejandro Escobar 6a4f8b54f7 fixed error log that would cause two log lines to run into each other. This can be reproduced by running local-up-cluster.sh on osx.
found source of log issue and it was further upstream at the hyperkube level.

removed extra \n items i added to make things clearer.
2017-01-09 12:13:45 -08:00
Kubernetes Submit Queue 73d36ce587 Merge pull request #39394 from wlan0/master
Automatic merge from submit-queue (batch tested with PRs 39394, 38270, 39473, 39516, 36243)

make private method private

@thockin
2017-01-09 12:05:17 -08:00
Derek McQuay fb4ee4deba kubeadm: add preflight check for bridge-nf 2017-01-09 09:56:02 -08:00
Paulo Pires 070f7d9d2d
kubeadm: updated DNS deployment. 2017-01-09 15:43:30 +00:00
NickrenREN e19af3205f optimize RunKubelet variable style
keep that variables use camel casing from the second words
2017-01-09 11:36:40 +08:00
Clayton Coleman e5019de260
refactor: Move versioned/watch to meta/v1 2017-01-06 23:45:03 -05:00
Clayton Coleman b7d03ed3d5
Move watch/versioned to pkg/apis/meta/v1/watch.go
Move the encoder and decoder to restclient since it is generic to that
package.
2017-01-06 23:45:00 -05:00
Kubernetes Submit Queue de59ede6b2 Merge pull request #37784 from bruceauyeung/k8s-branch-fix-glog-message-typo
Automatic merge from submit-queue

fix glog message typo about init deserialization cache and watch cache

**What this PR does / why we need it**:
fix typo  `Initalizing` to `Initializing` 

Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2017-01-06 17:43:32 -08:00
Bowei Du ba215e2bf2 Result of hack/update-all.sh 2017-01-06 13:08:56 -08:00
Bowei Du 0992e2bfc9 Remove DNS code from the main repo (code is now in http://github.com/kubernetes/dns) 2017-01-06 12:57:45 -08:00
Kubernetes Submit Queue 07ce35a325 Merge pull request #39490 from deads2k/generic-16-bump-gengo
Automatic merge from submit-queue (batch tested with PRs 39466, 39490, 39527)

bump gengo to latest

bumping gengo to limit surprises while working on https://github.com/kubernetes/kubernetes/pull/39475

@kubernetes/sig-api-machinery-misc
2017-01-06 11:30:13 -08:00
Kubernetes Submit Queue 181df90d2f Merge pull request #39466 from kubernetes/bugfix
Automatic merge from submit-queue (batch tested with PRs 39466, 39490, 39527)

Generate OpenAPI definition for inlined types

Currently OpenAPI definition generator ignores any type's member with an empty json name tag. However, most (if not all) of these types also have "inline" json tag. That means we should inline their members into parent type's OpenAPI definition instead of ignoring them. This resulted in many types missing common parameters such as "Name". It look something serious to me for OpenAPI spec and I suggest we merge and cherry-pick this into 1.5 release branch as soon as possible.
2017-01-06 11:30:11 -08:00
deads2k f86447c9a0 files regenerated after update 2017-01-06 11:45:40 -05:00
Kubernetes Submit Queue 41d7acc0f5 Merge pull request #39464 from apprenda/kubeadm_93-more_discovery
Automatic merge from submit-queue

Implemented file and HTTPS based discovery for kubeadm

**What this PR does / why we need it**:
This PR implements both file and HTTPS based discovery for `kubeadm`.

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

**Special notes for your reviewer**:
I'd like to add some tests but 'm sure `kubeconfig` loading is already covered by other tests in `clientcmd` package.

/cc @luxas @pipejakob
2017-01-06 05:42:02 -08:00
Paulo Pires c272bc56b1
kubeadm: flag token discovery pieces to be refactored. 2017-01-06 12:09:50 +00:00
Paulo Pires a519335303
kubeadm: added HTTPS discovery.
Fixes kubernetes/kubeadm#94
2017-01-06 12:08:34 +00:00
Paulo Pires 18370ba0c1
kubeadm: added file discovery.
Fixes kubernetes/kubeadm#93
2017-01-06 12:07:25 +00:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Jeff Grafton f8288ed1f3 Create BUILD files in top-level subdirectories 2017-01-05 14:14:12 -08:00
mbohlool c4291993b6 Generate inlined member's OpenAPI definitions 2017-01-05 09:45:35 -08:00
deads2k 4d7fcae85a mechanicals 2017-01-05 11:14:27 -05:00
Kubernetes Submit Queue f76fba0da0 Merge pull request #39435 from sttts/sttts-cloudprovider-to-master
Automatic merge from submit-queue

Move apiserver cloudprovider dep into kubeapiserver
2017-01-05 02:29:11 -08:00
Kubernetes Submit Queue ed5414d333 Merge pull request #39426 from apprenda/kubeadm_95-fix_token_discovery
Automatic merge from submit-queue

kubeadm token discovery URL may not have valid input for url.Parse

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

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

**Special notes for your reviewer**:
/cc @dgoodwin @luxas @mikedanese this is a WIP! Need a couple things:
* decide token separator, `.` or `:`
* define error handling in `token.go::37`
2017-01-05 01:47:14 -08:00
Dr. Stefan Schimanski f96fa748d8 Move apiserver cloudprovider dep into kubeapiserver 2017-01-05 09:40:03 +01:00
Kubernetes Submit Queue f605bfda61 Merge pull request #39429 from apprenda/kubeadm_80-change_etcd_datadir
Automatic merge from submit-queue

kubeadm: change etcd data dir to match host path.

**What this PR does / why we need it**: Trivial change that adopts a well-known path for etcd data, following the `hostPath` defined.

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

**Special notes for your reviewer**:
/cc @luxas @kad
2017-01-05 00:13:28 -08:00
Paulo Pires a6cdfdef4b
kubeadm: make sure URL is valid for token discovery. 2017-01-05 08:05:48 +00:00
Kubernetes Submit Queue 84df067967 Merge pull request #39450 from pipejakob/file-disc
Automatic merge from submit-queue (batch tested with PRs 36229, 39450)

Bugfix on kubeadm join with non-token discovery.

Without this change, using a non-token discovery mechanism during a join triggers a nil pointer panic (instead of an error message about not being implemented yet).

CC @mikedanese 

**Release note**:
```release-note
NONE
```
2017-01-04 17:36:08 -08:00
Jacob Beacham 5cc36c9f05 Bugfix on kubeadm join with non-token discovery.
Without this change, using a non-token discovery mechanism during a join
triggers a nil pointer panic (instead of an error message about not
being implemented yet).
2017-01-04 15:40:52 -08:00
Kubernetes Submit Queue 5ee52e8bce Merge pull request #39384 from deads2k/generic-01-start-staging
Automatic merge from submit-queue

Start moving genericapiserver to staging

This moves `pkg/auth/user` to `staging/k8s.io/genericapiserver/pkg/authentication/user`.  I'll open a separate pull into the upstream gengo to support using `import-boss` on vendored folders to support staging.

After we agree this is the correct approach and see everything build, I'll start moving other packages over which don't have k8s.io/kubernetes deps.

@kubernetes/sig-api-machinery-misc @lavalamp 
@sttts @caesarxuchao ptal
2017-01-04 12:06:34 -08:00
Mike Danese 3ab0e37cc6 implement upgrades 2017-01-04 11:45:57 -08:00
Jess Frazelle db75904b42
fix when os.Remove should be os.RemoveAll
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:34:06 -08:00
Kubernetes Submit Queue ee47db8c84 Merge pull request #39399 from zhouhaibing089/namespace-controller
Automatic merge from submit-queue

make discovery static when extensions/thirdpartyresources is not enabled

this should be a bug fix, if `extensions/thirdpartyresources` is enabled, the result of `Discovery().ServerPreferredNamespacedResources` will be dynamic then, so we are making the `discoverResourcesFn` static only when the `extensions/thirdpartyresources` is not enabled.
2017-01-04 10:04:00 -08:00
Paulo Pires 241c530648
kubeadm: change etcd data dir to match host path.
Fixes https://github.com/kubernetes/kubeadm/issues/80
2017-01-04 16:43:13 +00:00
deads2k ca58ec0237 mechanical changes for move 2017-01-04 10:27:05 -05:00
Kubernetes Submit Queue 38d57e5a71 Merge pull request #39355 from kargakis/update-rc-manager
Automatic merge from submit-queue

Share rc cache from the rc manager

@kubernetes/sig-apps-misc @hodovska
2017-01-04 05:18:29 -08:00
zhouhaibing089 a09fc73810 make discovery static when extensions/thirdpartyresources is not enabled 2017-01-04 10:27:15 +08:00
Kubernetes Submit Queue d0e160559d Merge pull request #39389 from mikedanese/kubeadm-fix
Automatic merge from submit-queue (batch tested with PRs 39280, 37350, 39389, 39390, 39313)

kubeadm: readd --api-port, accidentally removed during refactor.

this broke stuff
2017-01-03 18:25:12 -08:00
Kubernetes Submit Queue 27850a79d9 Merge pull request #39280 from luxas/kubeadm_api_proto
Automatic merge from submit-queue (batch tested with PRs 39280, 37350, 39389, 39390, 39313)

Refactor the certificate and kubeconfig code in the kubeadm binary into two phases

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

First stab at refactoring kubeadm code into logically independent phases.
This defines two phases in the kubeadm init process:
 - certs: Takes some API values as input (the API will be refactored in a later PR), and generates certificates in the pki directory
 - kubeconfig: Takes the pki directory and the endpoint where the master is located and produces two kubeconfig files: admin.conf and kubelet.conf

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:
Required long-term for graduating our API

**Special notes for your reviewer**:

### Old sample output
The earlier kubeconfig code had a bug in it; see this example:
_admin.conf:_
```yaml
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <data>
    server: https://192.168.200.x:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: admin
  name: admin@kubernetes
- context:
    cluster: kubernetes
    user: kubelet
  name: kubelet@kubernetes
current-context: admin@kubernetes
kind: Config
preferences: {}
users:
- name: admin
  user:
    client-certificate-data: <data>
    client-key-data: <data>
- name: kubelet
  user:
    client-certificate-data: <data>
    client-key-data: <data>
```
kubelet.conf:
```yaml
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <data>
    server: https://192.168.200.x:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: admin
  name: admin@kubernetes
- context:
    cluster: kubernetes
    user: kubelet
  name: kubelet@kubernetes
current-context: admin@kubernetes
kind: Config
preferences: {}
users:
- name: admin
  user:
    client-certificate-data: <data>
    client-key-data: <data>
- name: kubelet
  user:
    client-certificate-data: <data>
    client-key-data: <data>
```
```console
$ shasum /etc/kubernetes/*.conf
2b22b25cc4c97e5619ece6c43badf42b87c4970a  /etc/kubernetes/admin.conf
2b22b25cc4c97e5619ece6c43badf42b87c4970a  /etc/kubernetes/kubelet.conf
```

#### New output
admin.conf
```yaml
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <data>
    server: https://192.168.200.x:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: admin
  name: admin@kubernetes
current-context: admin@kubernetes
kind: Config
preferences: {}
users:
- name: admin
  user:
    client-certificate-data: <data>
    client-key-data: <data>
```
kubelet.conf
```yaml
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <data>
    server: https://192.168.200.x:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: kubelet
  name: kubelet@kubernetes
current-context: kubelet@kubernetes
kind: Config
preferences: {}
users:
- name: kubelet
  user:
    client-certificate-data: <data>
    client-key-data: <data>
```

**Release note**:

```release-note
Refactor the certificate and kubeconfig code in the kubeadm binary into two phases
```

PTAL @dgoodwin @jbeda @mikedanese @errordeveloper @pipejakob @lukemarsden
2017-01-03 18:25:08 -08:00
wlan0 3917342bbb make private method private 2017-01-03 15:33:01 -08:00
CJ Cullen d0997a3d1f Generate a kubelet CA and kube-apiserver cert-pair for kubelet auth.
Plumb through to kubelet/kube-apiserver on gci & cvm.
2017-01-03 14:30:45 -08:00
Lucas Käldström 720f3b45aa
Refactor the pki, cert, kubeconfig code in the kubeadm binary into two separate and logically independent phases 2017-01-03 23:40:07 +02:00
Mike Danese 0d6c029f7f kubeadm: readd --api-port, accidentally removed during refactor. 2017-01-03 13:38:21 -08:00
deads2k 2861509b6d refactored admission to avoid internal client references 2017-01-03 15:50:12 -05:00
Michail Kargakis e5b586b5b0 Share rc cache from the rc manager 2017-01-03 16:59:09 +01:00
Kubernetes Submit Queue 63eec9608d Merge pull request #39353 from sttts/sttts-requestcontextmapper-move
Automatic merge from submit-queue (batch tested with PRs 39075, 39350, 39353)

Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request

**Based on #39350**
2017-01-03 07:40:30 -08:00
Kubernetes Submit Queue 123026aa28 Merge pull request #39350 from sttts/sttts-pkg-apiserver-move
Automatic merge from submit-queue (batch tested with PRs 39075, 39350, 39353)

Move pkg/apiserver to pkg/genericapiserver/api
2017-01-03 07:40:28 -08:00
Dr. Stefan Schimanski 87dd990bb7 Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request 2017-01-03 14:57:33 +01:00
Dr. Stefan Schimanski 2d58ffc129 Move pkg/{apiserver -> genericapiserver/api} 2017-01-03 14:54:03 +01:00
Kubernetes Submit Queue ed5a236525 Merge pull request #39322 from luxas/remove_reconcile_cidr
Automatic merge from submit-queue (batch tested with PRs 39351, 39322)

Remove the deprecated --reconcile-cidr flag from kubelet

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

Removes the `--reconcile-cidr` flag that has been deprecated since v1.5

**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
The `--reconcile-cidr` kubelet flag was removed since it had been deprecated since v1.5
```
@thockin
2017-01-03 00:22:20 -08:00
Kubernetes Submit Queue 76dfee04f5 Merge pull request #38615 from jsafrane/worker-thread
Automatic merge from submit-queue (batch tested with PRs 39150, 38615)

Add work queues to PV controller

PV controller should not use Controller.Requeue, as as it is not available in
shared informers. We need to implement our own work queues instead, where we
can enqueue volumes/claims as we want.
2017-01-02 08:04:29 -08:00
Jan Safranek 0fd5f2028d Add work queues to PV controller
PV controller should not use Controller.Requeue, as as it is not available in
shared informers. We need to implement our own work queues instead where we
can enqueue volumes/claims as we want.
2017-01-02 15:17:24 +01:00
Kubernetes Submit Queue 3fe288d74e Merge pull request #36221 from pospispa/86-5-add-checks-and-documentation-about-template-pods-for-recycling
Automatic merge from submit-queue (batch tested with PRs 37959, 36221)

Recycle Pod Template Check

The kube-controller-manager has two command line arguments (--pv-recycler-pod-template-filepath-hostpath and --pv-recycler-pod-template-filepath-nfs) that specify a recycle pod template. The recycle pod template may not contain the volume that shall be recycled.

A check is added to make sure that the recycle pod template contains at least a volume.

cc: @jsafrane
2017-01-02 05:08:30 -08:00
Jeff Grafton fae627dd65 Update generated for 2017 2017-01-01 23:11:09 -08:00
Lucas Käldström d54cdc3eab
Remove the deprecated --reconcile-cidr flag from kubelet 2016-12-30 18:26:53 +02:00
Kubernetes Submit Queue 274a9f0f70 Merge pull request #38927 from luxas/remove_maintainer
Automatic merge from submit-queue

Remove all MAINTAINER statements in the codebase as they are deprecated

**What this PR does / why we need it**:
ref: https://github.com/docker/docker/pull/25466

**Release note**:

```release-note
Remove all MAINTAINER statements in Dockerfiles in the codebase as they are deprecated by docker
```
@ixdy @thockin (who else should be notified?)
2016-12-29 16:41:24 -08:00
Mike Danese eb8be5a093 fix mungedocs unit tests 2016-12-29 13:04:10 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
bruceauyeung 8537aa4a99 fix nil check and typos 2016-12-29 18:00:28 +08:00
Kubernetes Submit Queue 41956a682d Merge pull request #39254 from freehan/cleanup-exec-networkplugin
Automatic merge from submit-queue

Remove 'exec' network plugin - use CNI instead

fixes: #38639
2016-12-28 14:00:48 -08:00
Kubernetes Submit Queue 64c21133f0 Merge pull request #39142 from k82cn/k8s_39136
Automatic merge from submit-queue (batch tested with PRs 39152, 39142, 39055)

Update NodeRef to v1.ObjectReference.

fixes #39136
2016-12-27 17:10:13 -08:00
Minhan Xia 5e39b3d9c3 clean up exec network plugin 2016-12-27 14:04:57 -08:00
Kubernetes Submit Queue 1ee7163308 Merge pull request #36802 from brendandburns/i18n
Automatic merge from submit-queue

Begin paths for internationalization in kubectl

This is just the first step, purposely simple so we can get the interface correct.

@kubernetes/sig-cli @deads2k
2016-12-24 13:09:12 -08:00
Brendan Burns 277306449b Add initial translation support. 2016-12-23 20:45:52 -08:00
Kubernetes Submit Queue 67a3cd3a58 Merge pull request #39029 from kad/issue75
Automatic merge from submit-queue

Fix cloud-config name in test case

**What this PR does / why we need it**: fixes default cloud-config name in test cases for reset.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2016-12-23 06:21:27 -08:00
Kubernetes Submit Queue 9d38145cfb Merge pull request #37887 from bruceauyeung/k8s-branch-use-bytes-buffer-instead-of-append-for-error-string-concat
Automatic merge from submit-queue

use bytes.Buffer instead of append for error string concat

**What this PR does / why we need it**:
1. in my benchmark test, `bytes.Buffer` takes much less time ( about 1:1000 ) than string append( `+=` ). 
>BenchmarkAppendConcat-4           100000            151438 ns/op          578181 B/op          2 allocs/op
BenchmarkBufferSprintf-4         3000000               487 ns/op              65 B/op          3 allocs/op
BenchmarkBufferConcat-4          5000000               271 ns/op              47 B/op          1 allocs/op

the benchmark codes is here  https://play.golang.org/p/LS52zGuwZN

2. in our `RunInitMasterChecks`, `RunJoinNodeChecks` there are lots of preflight checks. they may result in a huge error message. so `bytes.Buffer` can bring considerable performance enhancement in the worst of conditions.

beyond that, this PR 
1. fix an exported struct comment,
1. and use `found = append( found, errs...)` instead of for loop for simplicity.


Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-12-23 03:56:32 -08:00
Kubernetes Submit Queue 48793a48d4 Merge pull request #34273 from wlan0/master
Automatic merge from submit-queue (batch tested with PRs 39093, 34273)

start breaking up controller manager into two pieces

This PR addresses: https://github.com/kubernetes/features/issues/88

This commit starts breaking the controller manager into two pieces, namely,
1. cloudprovider dependent piece
2. coudprovider agnostic piece

the controller manager has the following control loops -
- nodeController
- volumeController
- routeController
- serviceController
- replicationController
- endpointController
- resourceQuotaController
- namespaceController
- deploymentController 
  etc..

among the above controller loops,
- nodeController
- volumeController
- routeController
- serviceController

are cloud provider dependent. As kubernetes has evolved tremendously, it has become difficult
for different cloudproviders (currently 8), to make changes and iterate quickly. Moreover, the
cloudproviders are constrained by the kubernetes build/release lifecycle. This commit is the first
step in moving towards a kubernetes code base where cloud providers specific code will move out of
the core repository, and will be maintained by the cloud providers themselves.

I have added a new cloud provider called "external", which signals the controller-manager that
cloud provider specific loops are being run by another controller. I have added these changes in such
a way that the existing cloud providers are not affected. This change is completely backwards compatible, and does not require any changes to the way kubernetes is run today.

Finally, along with the controller-manager, the kubelet also has cloud-provider specific code, and that will be addressed in a different commit/issue.

@alena1108 @ibuildthecloud @thockin @dchen1107 

**Special notes for your reviewer**:

@thockin - Im making this **WIP** PR to ensure that I don't stray too far from everyone's view of how we should make this change. As you can see, only one controller, namely `nodecontroller` can be disabled with the `--cloudprovider=external` flag at the moment. I'm working on cleaning up the `rancher-controller-manger` that I wrote to test this.

Secondly, I'd like to use this PR to address cloudprovider specific code in kubelet and api-server.

**Kubelet**
Kubelet uses provider specific code for node registration and for checking node-status. I thought of two ways to divide the kubelet: 
- We could start a cloud provider specific kubelet on each host as a part of kubernetes, and this cloud-specific-kubelet does node registration and node-status checks. 
- Create a kubelet plugin for each provider, which will be started by kubelet as a long running service. This plugin can be packaged as a binary.

I'm leaning towards the first option. That way, kubelet does not have to manage another process, and we can offload the process management of the cloud-provider-specific-kubelet to something like systemd. 

@dchen1107 @thockin what do you think?

**Kube-apiserver**

Kube-apiserver uses provider specific code for distributing ssh keys to all the nodes of a cluster. Do you have any suggestions about how to address this? 

**Release note**:

``` release-note
```
2016-12-23 01:25:28 -08:00
Kubernetes Submit Queue 58d319e589 Merge pull request #39093 from dgoodwin/token-default
Automatic merge from submit-queue

kubeadm: Default to using token discovery.

Recent changes to support multiple methods for discovery meant that
"kubeadm init" no longer was sufficient and users would need to add
"--discovery token://" to achieve the same results.

Instead lets assume discovery if the user does not specify anything else
to maintain parity and the brevity of our original instructions.


**Release note**:

```release-note
NONE
```

CC @mikedanese @luxas
2016-12-23 01:20:00 -08:00
Kubernetes Submit Queue ff8e8c6778 Merge pull request #38920 from k82cn/k8s_37979
Automatic merge from submit-queue

Add event when failed to open local port.

fixes #37979 .
2016-12-22 21:32:27 -08:00
Kubernetes Submit Queue 9541c38f39 Merge pull request #37296 from ncdc/skip-dash-in-protobuf-tags
Automatic merge from submit-queue

Fix skipping - protobuf fields

**What this PR does / why we need it**: fixes the protobuf generator to skip fields with a protobuf tag of `"-"`

Match changes in https://github.com/kubernetes/gengo/pull/19

I couldn't get godeps to work to vendor this change in from gengo, so I made the same edits manually in cmd/libs/go2idl. A task for another day...

@smarterclayton
2016-12-22 19:36:25 -08:00
Kubernetes Submit Queue ae4db79d1c Merge pull request #39118 from bowei/cleanup-dns
Automatic merge from submit-queue (batch tested with PRs 39006, 39078, 37188, 39118)

Cleanup dns

* Remove hostname endpoints annotation (was beta feature)
* Remove references to non-client-go API
* Replaces references to internal kubernetes API with client-go.
2016-12-22 17:47:31 -08:00
Andy Goldstein f0247ea595 Fix skipping - protobuf fields
Match changes in https://github.com/kubernetes/gengo/pull/19
2016-12-22 20:45:05 -05:00
wlan0 75da310757 sanitize names and add more comments, and other essential boilerplate changes 2016-12-22 14:37:15 -08:00
wlan0 1e48fd18cb add cloud-controller-manager as the first step in breaking controller-manager 2016-12-22 14:37:15 -08:00
Klaus Ma b0dfa4ad47 Add event when failed to open local port. 2016-12-23 04:51:12 +08:00
Bowei Du 820062897e Remove references to non-client-go API
Replaces references to internal kubernetes API with client-go.
2016-12-22 11:06:23 -08:00
Devan Goodwin bf69fb1747 kubeadm: Default to using token discovery.
Recent changes to support multiple methods for discovery meant that
"kubeadm init" no longer was sufficient and users would need to add
"--discovery token://" to achieve the same results.

Instead lets assume discovery if the user does not specify anything else
to maintain parity and the brevity of our original instructions.
2016-12-22 12:54:34 -04:00
pospispa ef43f82de8 Recycle Pod Template Check
The kube-controller-manager has two command line arguments (--pv-recycler-pod-template-filepath-hostpath and --pv-recycler-pod-template-filepath-nfs) that specify a recycle pod template. The recycle pod template may not contain the volume that shall be recycled.

A check is added to make sure that the recycle pod template contains at least a volume.
2016-12-22 17:44:32 +01:00
Kubernetes Submit Queue fc41bc6ec6 Merge pull request #39091 from deads2k/api-54-move-authn
Automatic merge from submit-queue

remove unneeded authenticator dependencies from genericapiserver

Refactors the authenticator options to remove unneeded dependencies.

@sttts
2016-12-22 06:48:24 -08:00
deads2k ab1b77673f decouple genericapiserver from non-generic authenticator 2016-12-22 07:48:08 -05:00
deads2k a3564c0aa8 start kubeapiserver package for sharing between kubeapiserver and federation 2016-12-22 07:43:42 -05:00
Klaus Ma e901800687 Update NodeRef to v1.ObjectReference. 2016-12-22 16:28:20 +08:00
Kubernetes Submit Queue 4ee51fcc2d Merge pull request #39107 from spxtr/fix-kubeadmtest
Automatic merge from submit-queue

Fix kubeadm test in bazel.
2016-12-21 21:53:32 -08:00
Joe Finney 8ce98ba3d4 Make one of the go2idl unit tests pass in a sandbox. 2016-12-21 16:01:11 -08:00
Joe Finney ecaeab60e3 Fix kubeadm test in bazel. 2016-12-21 15:15:00 -08:00
Alexander Kanevskiy 2ac85d762f Fix cloud-config name in reset tests
Default name is /etc/kubernetes/cloud-config, thus tests
should cover "cloud-config" and not "cloud-config.json"
2016-12-21 14:42:11 +02:00
Kubernetes Submit Queue 52df372f9b Merge pull request #35805 from dgoodwin/token-mgmt
Automatic merge from submit-queue

Implement kubeadm bootstrap token management

Creates bootstrap tokens as secrets per the specification in #30707 

_WARNING_: These are not currently hooked up to the discovery service or the token it creates.

Still TODO:
- [x] delete tokens
- [x] merge with #35144 and adopt it's testing approach
- [x] determine if we want wholesale json output & templating like kubectl (we do not have an API object with the data we want here) may require a bit of plumbing.
- [x] allow specifying a token duration on the CLI
- [x] allow configuring the default token duration
- [x] hook up the initial token created during init

Sample output:

```
(root@centos1 ~) $ kubeadm token create
Running pre-flight checks
<cmd/token> Token secret created: f6dc69.c43e491752c4a0fd
(root@centos1 ~) $ kubeadm token create
Running pre-flight checks
<cmd/token> Token secret created: 8fad2f.e7b78c8a5f7c7b9a
(root@centos1 ~) $ kubeadm token list  
Running pre-flight checks
ID        TOKEN                     EXPIRATION
44d805    44d805.a4e78b6cf6435e33   23h
4f65bb    4f65bb.d006a3c7a0e428c9   23h
6a086e    6a086e.2ff99f0823236b5b   23h
8fad2f    8fad2f.e7b78c8a5f7c7b9a   23h
f6dc69    f6dc69.c43e491752c4a0fd   23h
f81653    f81653.9ab82a2926c7e985   23h
```
2016-12-20 14:44:40 -08:00
Devan Goodwin bfe345dd86 Implement kubeadm bootstrap token management.
Adds kubeadm subcommands to create, list, and delete bootstrap tokens.
Tokens can be created with a TTL duration, or 0 for tokens that will not
expire. The create command can also be used to specify your own token
(for use when bootstrapping masters and nodes in parallel), or update an
existing token's secret or ttl.

Marked "ex" for experimental for now as the boostrap controllers are not
yet hooked up in core.
2016-12-20 11:43:55 -04:00
Dr. Stefan Schimanski d582c2d46d Update bazel and linted files 2016-12-19 23:13:14 +01:00
Dr. Stefan Schimanski 90216ce721 pkg/apiserver: split code out of pkg/apiserver
- move rest handler into handlers package
- move errors into handlers/errors package
- move negotation code into handlers/negotation package
- move http response writer helpers into handlers/responsewriter package
- split up pkg/apiserver/apiserver.go

Note: this is only an intermediate step towards a proper genericapiserver
package hierarchy.
2016-12-19 23:13:11 +01:00
deads2k 8f1677b7c8 add service status detection to kubernetes-discovery 2016-12-19 14:56:20 -05:00
Xing Zhou 2ae4ab4b7d Added validation for API server's 'apiserver-count' flag.
--apiserver-count should be a positive number, otherwise will cause
errors when reconciling endpoints in MasterCountEndpointsReconciler.
2016-12-19 02:04:38 +00:00
Kubernetes Submit Queue 7e1cacaa91 Merge pull request #38440 from justinsb/conversion_gen_safe_at_some_speeds
Automatic merge from submit-queue

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-18 09:16:16 -08:00
Kubernetes Submit Queue 01b9d49673 Merge pull request #38677 from bruceauyeung/k8s-branch-fix-typos-and-comments
Automatic merge from submit-queue

path.Clean paths in GlobalEnvParams and remove unnecessary path.Join

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

1. clean all paths in `GlobalEnvParams`
1. remove unnecessary path.Join call in `pki.go`
2. fix some typos and comment errors

Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-12-17 12:16:47 -08:00
Lucas Käldström 3c5b5f5963 Remove all MAINTAINER statements in the codebase as they aren't very useful and now deprecated 2016-12-17 20:34:10 +02:00
Kubernetes Submit Queue 5b2823adb9 Merge pull request #38191 from sttts/sttts-move-master-options
Automatic merge from submit-queue

Move non-generic apiserver code out of the generic packages
2016-12-17 01:25:45 -08:00
bruceauyeung 02c1814113 remove unnecessary path.Join
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-12-17 11:57:00 +08:00
Maciej Szulik cdec94523e Remove extensions/v1beta1 Job - generated changes 2016-12-17 00:07:25 +01:00
Maciej Szulik 9f064c57ce Remove extensions/v1beta1 Job 2016-12-17 00:07:24 +01:00
Maciej Szulik e0ecb09fda Fix variable name conflict in clientset generation 2016-12-17 00:07:24 +01:00
Kubernetes Submit Queue faf959b522 Merge pull request #38869 from deads2k/api-52-in-cluster
Automatic merge from submit-queue

use in-cluster kubeconfig for genericapiserver

Allow the use of the in-cluster config to communicate with the core API server for delegated authn/authz for an addon API server.

@kubernetes/sig-api-machinery @sttts
2016-12-16 11:30:27 -08:00
deads2k bbcbdaffd1 use in-cluster kubeconfig for genericapiserver 2016-12-16 12:40:33 -05:00
Dr. Stefan Schimanski 7adaac79ca Update bazel 2016-12-16 17:49:23 +01:00
Dr. Stefan Schimanski aa81e1d51d pkg/apiserver: move validation.go into pkg/registry 2016-12-16 17:49:22 +01:00
Dr. Stefan Schimanski 3be6b3c045 pkg/apiserver: remove unused code 2016-12-16 17:47:47 +01:00
Dr. Stefan Schimanski 5e8ca29a76 Clean up apiserver and federation defaulting and validation 2016-12-16 17:23:43 +01:00
Dr. Stefan Schimanski 7267299c3c genericapiserver: move MasterCount and service options into master 2016-12-16 17:23:43 +01:00
Kubernetes Submit Queue de3b73bd43 Merge pull request #38826 from sttts/sttts-secret-routes-real-mux
Automatic merge from submit-queue

genericapiserver: turn APIContainer.SecretRoutes into a real ServeMux

The secret routes `Mux` is actually a `http.ServeMux` and we are type-casting to it. For downstream we want to wrap it into a restful container which also needs a real `http.ServeMux`.
2016-12-16 05:51:45 -08:00
Dr. Stefan Schimanski e49fb2f1f4 genericapiserver: rename SecretRoutes -> UnlistedRoutes 2016-12-16 11:04:29 +01:00
Kubernetes Submit Queue e2a9fc1022 Merge pull request #38841 from mikedanese/fix-tests
Automatic merge from submit-queue

bazel: fix some unit tests
2016-12-15 20:19:46 -08:00
Mike Danese 8fdec87d19 bazel: fix some unit tests 2016-12-15 18:36:22 -08:00
Mike Danese 7945c437e5 kubeadm: support --discovery token:// 2016-12-15 13:54:49 -08:00
Mike Danese 690c7e578b kubeadm: refactor discovery behind an interface 2016-12-15 13:54:49 -08:00
Kubernetes Submit Queue d8efc779ed Merge pull request #38154 from caesarxuchao/rename-release_1_5
Automatic merge from submit-queue (batch tested with PRs 38154, 38502)

Rename "release_1_5" clientset to just "clientset"

We used to keep multiple releases in the main repo. Now that [client-go](https://github.com/kubernetes/client-go) does the versioning, there is no need to keep releases in the main repo. This PR renames the "release_1_5" clientset to just "clientset", clientset development will be done in this directory.

@kubernetes/sig-api-machinery @deads2k 

```release-note
The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go
```
2016-12-14 14:21:51 -08:00
Chao Xu 6709b7ada2 run hack/update-codegen.sh
run hack/verify-gofmt.sh
update bazel
2016-12-14 12:39:49 -08:00
Chao Xu b2ab99a4f4 rename cmd/kubernetes-discovery/.../release_1_5 to clientset 2016-12-14 12:39:49 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Chao Xu f6f71c32b6 change release_1_5 to clientset in staging/copy.sh
modify update-codegen.sh
2016-12-14 12:39:36 -08:00
Kubernetes Submit Queue 6fa4042211 Merge pull request #38690 from sttts/sttts-swagger-postbuildhandler
Automatic merge from submit-queue

genericapiserver: unify swagger and openapi in config

- make swagger config customizable
- remove superfluous `Config.Enable*` flags for OpenAPI and Swagger.

This is necessary for downstream projects to tweak the swagger spec.
2016-12-14 11:11:02 -08:00
Dr. Stefan Schimanski cab89a67df genericapiserver: unify swagger and openapi in config 2016-12-14 18:41:04 +01:00
Kubernetes Submit Queue bf7daae954 Merge pull request #38724 from deads2k/fed-12-fix-exec
Automatic merge from submit-queue

fix connection upgrades through kuberentes-discovery

The initial upgrade through the proxy doesn't use the passed transport to handle the communication to the remote side.  Since we need auth proxy headers, this broke the upgrade for exec.

This sets those headers once if its an upgrade request (the transport stomps them if called anyway, so it won't shadow.).

@sttts I think this is the last required piece.  Then we start wiring in for e2e.
2016-12-14 07:45:04 -08:00
Kubernetes Submit Queue 7d235e147c Merge pull request #38175 from sttts/sttts-server-fatal
Automatic merge from submit-queue

apiserver(s): Replace glog.Fatals with fmt.Errorfs
2016-12-14 02:00:39 -08:00
Dr. Stefan Schimanski e57ef4327f Document broken behaviour with KUBE_API_VERSIONS 2016-12-14 09:35:47 +01:00
Dr. Stefan Schimanski 543417dbf0 Replace apiserver glog.Fatals with fmt.Errorfs 2016-12-14 09:35:47 +01:00
deads2k cd5f8a85f0 support exec through discovery 2016-12-13 15:55:54 -05:00
deads2k 6d081e4566 wire goflags (including glog) to kubernetes-discovery 2016-12-13 11:06:51 -05:00
Lucas Käldström 96850dc600 Set --anonymous-auth to false on v1.5 clusters to preserve the locked-down v1.4 behaviour 2016-12-13 17:51:15 +02:00
Kubernetes Submit Queue f8cab39f1d Merge pull request #38624 from deads2k/fed-10-proxy
Automatic merge from submit-queue (batch tested with PRs 38315, 38624, 38572, 38544)

kubernetes-discovery proxy

The last commit adds an authenticating (but not authorizing) proxy to `kubernetes-discovery`.  The other commits are in the submit queue already.

@sttts @cjcullen This is it.  After this we can start e2e wiring.
2016-12-12 19:42:33 -08:00
Kubernetes Submit Queue 8abbedae54 Merge pull request #38315 from mikedanese/pin-gazel
Automatic merge from submit-queue

Pin gazel to a version and support cgo

This fixes the bazel build.

@krousey who is buildcop
2016-12-12 19:32:29 -08:00
Kubernetes Submit Queue 3dcbafa861 Merge pull request #36393 from apelisse/owners-cmd-kubeadm
Automatic merge from submit-queue

Curating Owners: cmd/kubeadm

cc @jbeda @mikedanese @luxas @errordeveloper

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the future in
the **reviewers** section. You probably do NOT need to modify the **approvers**
section. Names asre sorted by relevance, using some secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2016-12-12 17:30:24 -08:00
bruceauyeung 12e97da0c1 use bytes.Buffer instead of append for error string concat
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-12-13 09:10:13 +08:00
Antoine Pelisse db0f04fa20 Update OWNERS approvers and reviewers: cmd/kube-apiserver 2016-12-12 16:02:39 -08:00
Antoine Pelisse 2084e0e665 Update OWNERS approvers and reviewers: cmd/kubeadm 2016-12-12 15:48:47 -08:00
Lucas Käldström 5222bd3e34 Bump default kubernetes version when no internet is present to v1.5 2016-12-12 23:59:14 +02:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
deads2k b81645e382 add proxying capability to kubernetes-discovery 2016-12-12 16:26:33 -05:00
deads2k 6421405d0e create hack/local-up-discovery.sh 2016-12-12 08:40:00 -05:00