Commit Graph

2993 Commits (45a436ac24a83137d509cb0e717b9595d5977556)

Author SHA1 Message Date
Antoine Pelisse 91393b5123 Move pkg/kubectl reviewers into an alias 2016-10-28 14:54:17 -07:00
redhatlinux10 67f379e510 fix inconsistent util package import
Signed-off-by: redhatlinux10 <ouyang.qinhua@zte.com.cn>

fix inconsistent util package import

Signed-off-by: redhatlinux10 <ouyang.qinhua@zte.com.cn>
2016-10-29 04:11:01 +08:00
Clayton Coleman ca2f1b87ad
Replace negotiation with a new method that can extract info
Alter how runtime.SerializeInfo is represented to simplify negotiation
and reduce the need to allocate during negotiation. Simplify the dynamic
client's logic around negotiating type. Add more tests for media type
handling where necessary.
2016-10-28 11:30:11 -04:00
Andy Goldstein e7068751ed Update bazel 2016-10-28 11:08:27 -04:00
Andy Goldstein 72cec547cd Convert - to _ for protobuf package names
Convert - to _ for protobuf package names to allow protobuf code generation
support for go packages that have - in their names.
2016-10-28 11:08:13 -04:00
Huamin Chen 1d52719465 azure disk volume: support storage class and dynamic provisioning
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-10-28 13:31:47 +00:00
deads2k 3f9a4d51d5 wire up authenticating front proxy: 2016-10-28 08:36:46 -04:00
Janet Kuo e9927664cf Remove unnecessary dependency in client-gen 2016-10-27 17:25:10 -07:00
Janet Kuo 10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
Mike Danese 5dc7554ab2 bazel: implement set-gen as a bazel genrule 2016-10-27 15:16:30 -07:00
Kubernetes Submit Queue 0563b45772 Merge pull request #35556 from apprenda/kubeadm-alphawarning-typo
Automatic merge from submit-queue

kubeadm: fixed small typo in alpha warning

Small typo in the alpha warning that I noticed and fixed.
2016-10-27 13:49:53 -07:00
deads2k df4ed892c4 convert SA controller to shared informers 2016-10-27 15:44:46 -04:00
Kubernetes Submit Queue a8e9a1bce6 Merge pull request #35632 from dgoodwin/preflight-conf-fixes
Automatic merge from submit-queue

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

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

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

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

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

Also adds tests for reset command logic specifically for /etc/kubernetes
cleanup, to ensure user files are not inadvertently wiped out.
2016-10-27 09:14:20 -03:00
Vishnu kannan e861a5761d Adding a root filesystem override for kubelet mounter
This is useful for supporting hostPath volumes via containerized
mounters in kubelet.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 21:42:59 -07:00
Kubernetes Submit Queue 10061ac358 Merge pull request #35523 from luxas/remove_reconcile
Automatic merge from submit-queue

Deprecate the --reconcile-cidr flag

<!--  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**: Follows up https://github.com/kubernetes/kubernetes/pull/34906

**Special notes for your reviewer**: I'm not sure why coreos had set `--reconcile-cidr` to `false` and what the implications are now.

**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
Deprecate the --reconcile-cidr kubelet flag because it has no function anymore
```

PTAL @thockin @freehan @justinsb @yujuhong 
@kubernetes/sig-node @kubernetes/sig-network 

**I will add `hack/update-all.sh` contents soon to fix builds**
2016-10-26 20:18:37 -07:00
Kubernetes Submit Queue f300d7ed69 Merge pull request #35646 from vishh/klet-relative-mount
Automatic merge from submit-queue

rename kubelet flag mounter-path to experimental-mounter-path

```release-note
* Kubelet flag '--mounter-path' renamed to '--experimental-mounter-path'
```

The feature the flag controls is an experimental feature and this renaming ensures that users do not depend on this feature just yet.
2016-10-26 16:57:33 -07:00
Brian Grant 2ae2339d6a Merge pull request #35546 from thockin/kill-head-scary-warning-on-master
Remove obsolete munger on docs
2016-10-26 16:44:53 -07:00
Vishnu kannan adef4675a0 rename kubelet flag mounter-path to experimental-mounter-path
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 14:50:33 -07:00
Lucas Käldström 1cf00d1ff1 Remove the function of --reconcile-cidr and deprecate it 2016-10-26 20:25:35 +03:00
Clayton Coleman 168f5e0dca
Default to safe conversions 2016-10-26 12:21:27 -04:00
Clayton Coleman d089eda524
Generate unsafe conversions
This reverts commit 50bcdb9677.
2016-10-26 12:21:27 -04:00
Wojciech Tyczynski 50bcdb9677 Revert "Generate unsafe conversions"
This reverts commit 2b1790cc5f.
2016-10-26 10:21:45 +02:00
Kubernetes Submit Queue 7ccbb03265 Merge pull request #34784 from smarterclayton/unsafe_converter
Automatic merge from submit-queue

Use unsafe operations to get fast memory copy

We can avoid doing allocations by using legal unsafe.Pointer allocations to
assign pointers to equivalent memory locations (for memory identical types).

@wojtek-t

```
benchcmp /tmp/old /tmp/new
benchmark                                      old ns/op     new ns/op     delta
BenchmarkPodConversion-8                       3590          2438          -32.09%
BenchmarkNodeConversion-8                      4774          1773          -62.86%
BenchmarkReplicationControllerConversion-8     3711          2919          -21.34%
BenchmarkEncodeCodecFromInternalProtobuf-8     5692          4816          -15.39%
BenchmarkDecodeCodecToInternalProtobuf-8       7762          6540          -15.74%
BenchmarkEncodeCodecFromInternal-8             32668         31158         -4.62%
BenchmarkDecodeCodec-8                         67260         63348         -5.82%
BenchmarkDecodeIntoInternalCodec-8             62903         64510         +2.55%

benchmark                                      old allocs     new allocs     delta
BenchmarkPodConversion-8                       26             13             -50.00%
BenchmarkNodeConversion-8                      21             9              -57.14%
BenchmarkReplicationControllerConversion-8     23             17             -26.09%
BenchmarkEncodeCodecFromInternalProtobuf-8     16             8              -50.00%
BenchmarkDecodeCodecToInternalProtobuf-8       72             64             -11.11%
BenchmarkEncodeCodecFromInternal-8             68             60             -11.76%
BenchmarkDecodeCodec-8                         268            260            -2.99%
BenchmarkDecodeIntoInternalCodec-8             268            260            -2.99%

benchmark                                      old bytes     new bytes     delta
BenchmarkPodConversion-8                       3324          2377          -28.49%
BenchmarkNodeConversion-8                      4800          1696          -64.67%
BenchmarkReplicationControllerConversion-8     3456          3072          -11.11%
BenchmarkEncodeCodecFromInternalProtobuf-8     3992          3392          -15.03%
BenchmarkDecodeCodecToInternalProtobuf-8       5560          4960          -10.79%
BenchmarkEncodeCodecFromInternal-8             7180          6576          -8.41%
BenchmarkDecodeCodec-8                         13920         13320         -4.31%
BenchmarkDecodeIntoInternalCodec-8             13920         13320         -4.31%
```
2016-10-25 18:37:42 -07:00
Kubernetes Submit Queue a898f3d996 Merge pull request #34381 from liggitt/kubelet-auth
Automatic merge from submit-queue

kubelet authn/authz

Implements https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/kubelet-auth.md

Part of [Authenticated/Authorized access to kubelet API](https://github.com/kubernetes/features/issues/89) feature
2016-10-25 17:40:27 -07:00
Clayton Coleman 2b1790cc5f
Generate unsafe conversions 2016-10-25 19:28:41 -04:00
Kubernetes Submit Queue 67d947996c Merge pull request #33988 from Random-Liu/add-remote-docker-shim
Automatic merge from submit-queue

CRI: Add dockershim grpc server.

This PR adds a in-process grpc server for dockershim.

Flags change:
1. `container-runtime` will not be automatically set to remote when `container-runtime-endpoint` is set. @feiskyer 
2. set kubelet flag `--experimental-runtime-integration-type=remote --container-runtime-endpoint=UNIX_SOCKET_FILE_PATH` to enable the in-process dockershim grpc server.
3. set node e2e test flag `--runtime-integration-type=remote -container-runtime-endpoint=UNIX_SOCKET_FILE_PATH` to run node e2e test against in-process dockershim grpc server.

I've run node e2e test against the remote cri integration, tests which don't rely on stream and log functions can pass.

This unblocks the following work:
1) CRI conformance test.
2) Performance comparison between in-process integration and in-process grpc integration.

@yujuhong @feiskyer 
/cc @kubernetes/sig-node
2016-10-25 15:36:29 -07:00
Tim Hockin b0fa2056a6 Remove 'this is HEAD' warning on docs 2016-10-26 00:06:59 +02:00
Derek McQuay 89b1c950bc
kubeadm: fixed small typo in alpha warning 2016-10-25 17:30:56 -04:00
Kubernetes Submit Queue ff57f58611 Merge pull request #35476 from foxish/always-run-pod-gc
Automatic merge from submit-queue

Always run the podGC controller.

**What this PR does / why we need it**: The podGC controller has evolved to do more than just GC of terminated pods beyond a threshold number. It no longer makes sense to gate running it with the  `terminated-pod-gc-threshold` flag. [We still ensure that it only runs the terminatedPodsGC if the threshold specified in the argument to the controller manager is > 0](6079053407/pkg/controller/podgc/gc_controller.go (L124)).

Related discussion: https://github.com/kubernetes/kubernetes/pull/34160#issuecomment-255900898

**Release note**:

```release-note
The podGC controller will now always run, irrespective of the value supplied to the "terminated-pod-gc-threshold" flag supplied to the controller manager. 
The specific behavior of the podGC controller to clean up terminated pods is still governed by the flag, but the podGC's responsibilities have evolved beyond just cleaning up terminated pods.
```
2016-10-25 11:01:27 -07:00
Random-Liu 3d549b9e25 Add dockershim grpc server. 2016-10-25 10:31:16 -07:00
Ilya Dmitrichenko fe32eddca9
Change default service IP range to 10.96/12 2016-10-25 09:45:32 +01:00
Jordan Liggitt c83f5804d2
Wire kubelet authn/authz 2016-10-25 03:40:09 -04:00
Jordan Liggitt 426caf5bd1
Kubelet auth flags 2016-10-25 03:40:08 -04:00
Anirudh b5d9f2f336 Always run the podGC controller. 2016-10-24 17:15:39 -07:00
Kubernetes Submit Queue 377967935b Merge pull request #35453 from mikedanese/build-rename
Automatic merge from submit-queue

rename build/ dirs to other things.

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

Bump kubeadm to use v1.4.4 by default

**Release note**:

```release-note
NONE
```
2016-10-24 16:17:53 -07:00
Mike Danese 763c4987f2 autogenerated 2016-10-24 14:47:27 -07:00
Kubernetes Submit Queue 33ebe1f18b Merge pull request #34905 from ingvagabund/client-to-clientset
Automatic merge from submit-queue

Replace client with clientset

Replace client with clientset in some places

Fixes: #34637
2016-10-24 05:38:43 -07:00
Kubernetes Submit Queue ffdfe9fa9b Merge pull request #35119 from errordeveloper/tidy-up-kubeadm
Automatic merge from submit-queue

Start tidying kubeadm up

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

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

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

kubeadm: added unit tests for app/images pkg

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

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

/cc @pires @jbeda
2016-10-23 16:21:37 -07:00
Jan Chaloupka 4fde09d308 Replace client with clientset in code 2016-10-23 22:00:35 +02:00
Kubernetes Submit Queue 1bd46e5a4e Merge pull request #35265 from redhatlinux10/master-patch-optimise-kubeadm-join-args-generation
Automatic merge from submit-queue

enhance join arguments generation logic using template

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

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

**Special notes for your reviewer**:

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

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

change JoinArgsData to joinArgsData, improve template readability

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

fix extra = type

Signed-off-by: redhatlinux10 <ouyang.qinhua@zte.com.cn>
2016-10-23 06:38:14 +08:00
Dr. Stefan Schimanski 05fcc6b56a Update bazel 2016-10-22 14:31:56 +02:00
Dr. Stefan Schimanski cca05af615 Move swagger+openapi setup to routes and decouple from run 2016-10-22 13:42:22 +02:00
mbohlool 3e67cf8b9b Add authentication to openapi Spec 2016-10-22 02:43:42 -07:00
Mike Danese df713b478c fix tests by declaring testdata 2016-10-21 17:32:32 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Kubernetes Submit Queue a7807eb5a4 Merge pull request #34138 from ingvagabund/create-restclient-interface
Automatic merge from submit-queue

Create restclient interface

Refactoring of code to allow replace *restclient.RESTClient with any RESTClient implementation that implements restclient.RESTClientInterface interface.
2016-10-21 16:02:04 -07:00
Derek McQuay 3765c846a4
kubeadm: added unit tests for app/images pkg 2016-10-21 14:47:46 -07:00
Ilya Dmitrichenko 9703df391f
Eliminate half-baked multi-architecture support, but keep node affinity architecture-agnostic (fix #33916) 2016-10-21 14:56:02 +01:00
Ilya Dmitrichenko f09c4833bd
Bump kubeadm to use v1.4.4 by default 2016-10-21 09:25:49 +01:00
Jan Chaloupka 6079053407 Update clientset generator to use RESTClient interface instead of the RESTClient data type 2016-10-21 10:13:51 +02:00
Kubernetes Submit Queue c07c73efbb Merge pull request #34385 from m1093782566/m109-kube-proxy-sys
Automatic merge from submit-queue

Generify kube-proxy conntracker setmax() and refactor util/sysctl

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

Fix Kube-proxy `conntrack.go` **TODO** [here](https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-proxy/app/conntrack.go#L56). This PR consists of two parts:

* Generify kube-proxy `realConntracker.SetMax(int)` 

That is, change

`ioutil.WriteFile("/sys/module/nf_conntrack/parameters/hashsize", []byte(strconv.Itoa(max/4)), 0640)` 

to

`sysctl.New().WriteValue("/sys/module/nf_conntrack/parameters/hashsize", max/4)`

* Refactor `sysctl.SetSysctl()` and `sysctl.GetSysctl()` to `WriteValue(path string, value string) error` and `GetValue(path value) (error, string)`
2016-10-21 00:18:53 -07:00
Kubernetes Submit Queue 60be3c5f57 Merge pull request #35111 from apprenda/kubeadm_normalize_reset
Automatic merge from submit-queue

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

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

```release-note
NONE
```
2016-10-20 20:02:58 -07:00
Jing Xu 34ef93aa0c Add mounterPath to mounter interface
In order to be able to use new mounter library, this PR adds the
mounterPath flag to kubelet which passes the flag to the mount
interface. If flag is empty, mount uses default mount path.
2016-10-20 14:15:27 -07:00
deads2k 9578523180 move proxytransport config out of the genericapiserver 2016-10-20 11:23:53 -04:00
Kubernetes Submit Queue f0044ea0d7 Merge pull request #35075 from pipejakob/token_validation_fix
Automatic merge from submit-queue

If token validation fails, give the user the expected format.

If a user specifies their own token to kubeadm, and it fails validation, the error they currently receive isn't the friendliest. This first change adds messaging for the expected token format, with more improvements to follow as part of #33930. It also adds some unit tests to document the behavior we have currently.

CC: @mikedanese, @krousey, @kubernetes/sig-cluster-lifecycle

Part of #33930.
2016-10-20 04:01:49 -07:00
m1093782566 ad89825065 build util function for write sys file
Change-Id: I8f122b4314c1d983e7ba1ce1d66ce876bef0dca9
2016-10-20 14:18:24 +08:00
Jacob Beacham ec7561fdef If token validation fails, give the user the expected format.
Part of #33930.
2016-10-19 14:28:17 -07:00
Ilya Dmitrichenko b7b0822654
Refactor `getComponentCommand()` for readability 2016-10-19 14:56:55 +01:00
Paulo Pires 0699457f2b
kubeadm: Normalized reset command to match init and join commands. 2016-10-19 13:08:27 +01:00
Kubernetes Submit Queue 61e0113019 Merge pull request #34906 from luxas/remove_old_networking
Automatic merge from submit-queue

WIP: Remove the legacy networking mode

<!--  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**:
Removes the deprecated configure-cbr0 flag and networking mode to avoid having untested and maybe unstable code in kubelet, see: #33789

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

**Special notes for your reviewer**: There are a lot of deployments who rely on this networking mode. Not sure how we deal with that: force switch to kubenet or just delete the old deployment?

But please review the code changes first (the first commit)

**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
Removed the deprecated kubelet --configure-cbr0 flag, and with that the "classic" networking mode as well
```

PTAL @kubernetes/sig-network @kubernetes/sig-node @mikedanese
2016-10-19 01:03:39 -07:00
YuPengZTE 927d7a07d2 In error, the first letter should be lowcase
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2016-10-19 14:25:47 +08:00
Clayton Coleman 957c0955aa
Run defaulting on the scheduler startup 2016-10-18 21:07:35 -04:00
Clayton Coleman f294175d60
Make defaulting optional during conversion generation
Set the Kubernetes default to "no defaulting"
2016-10-18 21:07:34 -04:00
Clayton Coleman 1c49fc57ed
Create a generator for defaulters
Given an object that wishes to have a top level defaulter, traverse the
object looking for nested fields that have defaulters and generate a
single function for that type that invokes all defaulters. The function
will have the name `SetObjectDefaults_NAME`.

Types use `// +k8s:defaulter-gen=true` to indicate they wish a defaulter
generated. If a function already exists with the desired name
`SetObjectDefaults_NAME` then no generation will occur. At a package
level, authors can bulk select the types to generate by setting the
value of the comment to the name of a field - all objects with that
field name without `// +k8s:defaulter-gen=false` defined on the type
will get a defaulter.

Because the defaulting behavior from conversions happens recursively,
all defaulters are expected to be invoked. We call these defaulters
"non-covering" (other defaulters may be invoked beneath them). The
defaulters we generate, by comparison, are "covering" - no nested
defaulters should be invoked. To distinguish between these two types, we
introduce the `// +k8s:defaulter-gen=covers` comment on a defaulter
function which will instruct the generator that the function should
terminate recursion.

This sets the stage for future defaulter generation from comments by
subsuming our existing generators
2016-10-18 21:07:32 -04:00
Kubernetes Submit Queue f39e86c0a5 Merge pull request #34474 from liggitt/connection-info-refactor
Automatic merge from submit-queue

Remove static kubelet client, refactor ConnectionInfoGetter

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

* Collapses the multi-valued return to a `ConnectionInfo` struct
* Removes the "raw" connection info method and interface, since it was only used in a single non-test location (by the "real" connection info method)
* Disentangles the node REST object from being a ConnectionInfoProvider itself by extracting an implementation of ConnectionInfoProvider that takes a node (using a provided NodeGetter) and determines ConnectionInfo
* Plumbs the KubeletClientConfig to the point where we construct the helper object that combines the config and the node lookup. I anticipate adding a preference order for choosing an address type in https://github.com/kubernetes/kubernetes/pull/34259
2016-10-18 13:20:25 -07:00
Kubernetes Submit Queue e62a8b9167 Merge pull request #34962 from deads2k/cotnroller-08-rs-controller
Automatic merge from submit-queue

convert replica set controller to shared informer

Switches the replicaset to a shared informer.

@kargakis fyi
2016-10-18 07:20:37 -07:00
deads2k b471398f1f convert replica set controller to shared informer 2016-10-18 08:13:37 -04:00
Kubernetes Submit Queue 67732d7383 Merge pull request #34967 from deads2k/api-27-fix-version
Automatic merge from submit-queue

make version an explicit choice so zero config and customized work

Makes `/version` key off of setting the version.  This allows composers to add a version that is correct.
2016-10-18 05:07:02 -07:00
Kubernetes Submit Queue c19569f03f Merge pull request #34502 from fabianofranz/cli_usability_improvements
Automatic merge from submit-queue

Improvements to CLI usability and maintainability

Improves `kubectl` from an usability perspective by

1. Fixing how we handle terminal width in help. Some sections like the flags use the entire available width, while others like long descriptions breaks lines but don't follow a well established max width (screenshot below). This PR adds a new responsive writer that will adjust to terminal width and set 80, 100, or 120 columns as the max width, but not more than that given POSIX best practices and recommendations for better readability.
![terminal_width](https://cloud.githubusercontent.com/assets/158611/19253184/b23a983e-8f1f-11e6-9bae-667dd5981485.png)
2. Adds our own normalizers for long descriptions and cmd examples which allows us better control about how things like lists, paragraphs, line breaks, etc are printed. Features markdown support. Looks like `templates.LongDesc` and `templates.Examples` instead of `dedent.Dedend`.
3. Allows simple reordering and reuse of help and usage sections.
3. Adds `verify-cli-conventions.sh` which intends to run tests to make sure cmd developers are using what we propose as [kubectl conventions](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md). Just a couple simple tests for now but the framework is there and it's easy to extend.
4. Update [kubectl conventions](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md) to use our own normalizers instead of `dedent.Dedent`.

**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
Improves how 'kubectl' uses the terminal size when printing help and usage.
```

@kubernetes/kubectl
2016-10-17 23:41:23 -07:00
Kubernetes Submit Queue 7414cafbeb Merge pull request #34860 from mbohlool/optional
Automatic merge from submit-queue

+optional tag for OpenAPI spec

OpenAPI rely on "omitempty" json tag to determine if a field is optional or not. This change will add "+optional" tag to all fields with "omitempty" json tag and support the tag in OpenAPI spec generator.
2016-10-17 22:07:00 -07:00
deads2k 5a9b16d40a make version an explicit choice so zero config and customized work 2016-10-17 16:10:07 -04:00
Kubernetes Submit Queue f90deb2bdd Merge pull request #34829 from deads2k/api-25-gc-admission
Automatic merge from submit-queue

add ownerref permission checks

Adds an admission plugin that ensures that anyone adding an `ownerReference` to a resource has delete rights on the resource they're setting up a delete for.

@caesarxuchao example admission plugin that tests for ownerReference diffs and uses an authorizer to drive the decision.

@liggitt @ncdc we've talked about this before
2016-10-17 09:34:31 -07:00
mbohlool c1096211d0 Support optional tag in OpenAPI generator 2016-10-17 08:52:13 -07:00
mbohlool 25afcc5522 Add +optional tag to all fields with omitempty json tag 2016-10-17 08:52:13 -07:00
Fabiano Franz 3f7579cacb Tools for checking CLI conventions 2016-10-17 11:50:02 -02:00
deads2k 14c164a328 add ownerref permission checks 2016-10-17 09:38:05 -04:00
Kubernetes Submit Queue 714f816a34 Merge pull request #34719 from errordeveloper/api-and-disco-ports
Automatic merge from submit-queue

Add flags for alternative API and discovery ports

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

We had many issues reported due to the fact that we are using port 443 by default, and we should allow users to override whatever defaults we pick. This doesn't touch on `localhost:8080` yet, which should just generally get rid of.

**Which issue this PR fixes**: fixes #34311 #34307 #33638

**Special notes for your reviewer**: cc @pires 

**Release note**:
```release-note
Add `kubeadm` flags `--api-port` and `--discovery-port`, change default API port to 6443
```
2016-10-17 05:54:38 -07:00
Kubernetes Submit Queue c4f509e65d Merge pull request #32769 from mfojtik/customize-api-path-clientgen
Automatic merge from submit-queue

clientgen: allow to pass custom apiPath when generating client sets

This PR allow to pass the `--clientset-api-path` parameter to clientgen that allows to customize the default API path set in clients. This allows projects like OpenShift to re-use the client with different API path (`/oapi` in our case).
2016-10-17 04:52:04 -07:00
Ilya Dmitrichenko 6f57775669
Ensure `MasterConfiguration` is refered to as `cfg` throughout 2016-10-17 12:08:11 +01:00
Ilya Dmitrichenko 327dec43fb
Add flags for alternative API and discovery ports (close #34311 #34307 #33638) 2016-10-17 12:08:11 +01:00
Lucas Käldström 4ac49a74aa Remove duplicate --etcd-servers arguments in kubeadm 2016-10-16 21:48:16 +03:00
Lucas Käldström 0800df74ab Remove the legacy networking mode --configure-cbr0 2016-10-16 21:26:41 +03:00
Jordan Liggitt a082a2e749
Remove static kubelet client, refactor ConnectionInfoGetter 2016-10-15 22:15:04 -04:00
Lucas Käldström d46490c21e Register the kubeadm api group in cmd/kubeadm 2016-10-15 22:18:23 +03:00
Kubernetes Submit Queue ab14c31b84 Merge pull request #34885 from apprenda/kubeadm_join_configuration
Automatic merge from submit-queue

kubeadm join: Added support for config file.

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

Also references #34501 and #34884.

/cc @luxas @mikedanese
2016-10-15 10:11:49 -07:00
Kubernetes Submit Queue 864a7bacaa Merge pull request #34828 from deads2k/api-26-apiserver-annoyance
Automatic merge from submit-queue

default serializer

Everyone uses the same serializer.  Set it as the default, but still allow someone to take control if they want.

Found while trying to use genericapiserver for composition.
2016-10-15 07:29:59 -07:00
Kubernetes Submit Queue 88d6d7a677 Merge pull request #34807 from luxas/kubeadm_reset
Automatic merge from submit-queue

Implement kubeadm reset

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

kubeadm join: polling discovery service API

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

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

**Special notes for your reviewer**:

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

kubeadm join: wait for API endpoints

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

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

**Special notes for your reviewer**:

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

@errordeveloper @pires
2016-10-14 20:00:27 -07:00
Kubernetes Submit Queue 19848dddfd Merge pull request #24980 from aveshagarwal/master-project-node-selector
Automatic merge from submit-queue

Add support for admission controller based on namespace node selectors.

This work is to upstream openshift's project node selectors based admission controller.

Fixes https://github.com/kubernetes/kubernetes/issues/17151
2016-10-14 18:37:33 -07:00
Paulo Pires cf000bff95
kubeadm: fix preflight checks. 2016-10-14 20:16:56 +01:00
deads2k 7412be4465 default serializer 2016-10-14 11:27:32 -04:00
Kubernetes Submit Queue c3742a8fbe Merge pull request #34047 from deads2k/rbac-11-informer-cache
Automatic merge from submit-queue

Run rbac authorizer from cache

RBAC authorization can be run very effectively out of a cache.  The cache is a normal reflector backed cache (shared informer).

I've split this into three parts:
 1. slim down the authorizer interfaces
 1. boilerplate for adding rbac shared informers and associated listers which conform to the new interfaces
 1. wiring

@liggitt @ericchiang @kubernetes/sig-auth
2016-10-14 08:12:28 -07:00
Kubernetes Submit Queue 9adbbf2324 Merge pull request #34587 from resouer/stringflag
Automatic merge from submit-queue

Merge string flag into util flag

Continuing my work on https://github.com/kubernetes/kubernetes/issues/15634

This refactoring is expected to be completely finished and then I will add a verify scripts in `hack`
2016-10-14 04:22:11 -07:00
Kubernetes Submit Queue b189f5446e Merge pull request #34744 from pipejakob/typos
Automatic merge from submit-queue

Fix simple typos.
2016-10-14 03:08:46 -07:00
Kubernetes Submit Queue ca9688218d Merge pull request #34556 from deads2k/api-24-initialization
Automatic merge from submit-queue

split genericapiserver configuration apart so that you can run withou…

…t flag options

@dims Take a look at this re-slicing of the `genericapiserver.Config` creation.   I think this helps composers overall and resolves the chicken/egg problem you were having.
2016-10-14 01:09:05 -07:00
Kubernetes Submit Queue a944748ccb Merge pull request #34341 from apprenda/kubeadm-require-root
Automatic merge from submit-queue

kubeadm implement preflight checks

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

fixes #33908
2016-10-13 15:02:53 -07:00
Atanas Mirchev 072259f80f kubeadm join: wait for API endpoints
* Introduce a concurrent retry mechanism for bootstrapping
   with a single API endpoint
2016-10-13 22:16:11 +02:00
Jacob Beacham 2230714d32 Fix simple typos. 2016-10-13 11:29:26 -07:00
Avesh Agarwal b902f857c6 Add support for admission controller based on namespace node selectors.
This work is to upstream openshift's project node selectors based admission controller.

Addresses #17151.
2016-10-13 13:14:19 -04:00
deads2k fbd5032da2 split genericapiserver configuration apart so that you can run without flag options 2016-10-13 13:09:53 -04:00
Kubernetes Submit Queue 33a8e5cf67 Merge pull request #34097 from mayflower/kubeadm-typo
Automatic merge from submit-queue

kubeadm: fix typo
2016-10-13 10:08:03 -07:00
Kubernetes Submit Queue 9b3ca2fb0d Merge pull request #33180 from AdoHe/refactory_interface
Automatic merge from submit-queue

refact kubectl Factory make it interface

refactor kubectl to make Factory interface. @kubernetes/kubectl
2016-10-13 07:44:05 -07:00
Devan Goodwin 4231c046dd Fix errors and improve output in kubeadm pre-flight checks.
Add skip-preflight-checks to known flags.
Fix bug with preflight checks not returning system is-active as errors.
Fix error handling to use correct function.
2016-10-13 11:10:19 -03:00
Kubernetes Submit Queue 6a2f0932e4 Merge pull request #33379 from grosskur/kube-dns-bind-address
Automatic merge from submit-queue

kube-dns: Add --dns-bind-address flag

Currently, `kube-dns` always binds to `0.0.0.0` when starting the SkyDNS server. Sometimes it's useful to have it bind to a different address for testing. So add a new `--dns-bind-address` flag that can be used to configure this (default is `0.0.0.0`).
2016-10-13 06:26:27 -07:00
Derek McQuay 16b159c12b kubeadm implement preflight checks
Includes checks for verifying services exist and are enabled, ports are
open, directories do not exist or are empty, and required binaries are
in the path.

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

kubeadm: allow kubeadm init to read config from file

@kubernetes/sig-cluster-lifecycle
2016-10-13 04:19:05 -07:00
Kubernetes Submit Queue ca75b47657 Merge pull request #32555 from pweil-/admission-authorizer
Automatic merge from submit-queue

WantsAuthorizer admission plugin support

The next step of PSP admission is to be able to limit the PSPs used based on user information.  To do this the admission plugin would need to make authz checks for the `user.Info` in the request.  This code allows a plugin to request the injection of an authorizer to allow it to make the authz checks.

Note:  this could be done with a SAR, however since admission is running in the api server using the SAR would incur an extra hop vs using the authorizer directly.

@deads2k @derekwaynecarr
2016-10-13 03:40:11 -07:00
Kubernetes Submit Queue 4a223efd27 Merge pull request #34573 from errordeveloper/fix-early-deployment-issue
Automatic merge from submit-queue

Test API more extensivelly before declaring readiness 

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

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

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

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

**Release note**:
```release-note
NONE
```
2016-10-13 01:44:24 -07:00
Kubernetes Submit Queue adfbe8d952 Merge pull request #33629 from mbohlool/o2
Automatic merge from submit-queue

Generate unique Operation IDs for root OpenAPI spec

This PR adds a customization method GetOperationID to OpenAPI spec generation and then use it to make sure root spec has unique operation IDs by mostly adding GroupVersion to the start of operation ID.
2016-10-12 21:06:24 -07:00
Kubernetes Submit Queue d236b84b4f Merge pull request #34555 from mikedanese/conversion
Automatic merge from submit-queue

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

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

@kubernetes/sig-cluster-lifecycle
2016-10-12 19:47:58 -07:00
mbohlool 5ba06cf2bc Make Kubernetes OpenAPI operation IDs unique 2016-10-12 14:54:12 -07:00
Kubernetes Submit Queue 0357341fd5 Merge pull request #34596 from xiaopeng163/master
Automatic merge from submit-queue

fixed grammatical errors

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

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

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

**Special notes for your reviewer**:

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

Decouple master bootstrap from CSR in kubeadm

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

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

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

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

 * Introduce a concurrent retry mechanism for bootstrapping
   with a single API endpoint
 * Refactor API client creation, decouple from CSR
2016-10-12 08:53:43 -07:00
Ilya Dmitrichenko 0cb54e7eb2
Append first address from `--api-advertise-addresses` to `kube-apiserver` flags 2016-10-12 12:59:24 +01:00
Peng Xiao c5b96e48ea fixed grammatical errors 2016-10-12 16:29:04 +08:00
Atanas Mirchev 8c8da393e0 Decouple master bootstrap from CSR
* Refactor API client creation, decouple from CSR
2016-10-12 09:16:38 +02:00
Harry Zhang eb81ef6023 Merge string flag into util flag 2016-10-11 23:28:59 -04:00
Kubernetes Submit Queue 8a72f11596 Merge pull request #33842 from deads2k/api-19-clean-structs
Automatic merge from submit-queue

clean api server cruft

Some cruft has developed over refactors.  Remove that cruft.

@liggitt probably last in the chain so far
2016-10-11 18:56:15 -07:00
Kubernetes Submit Queue 14fb315e5b Merge pull request #34558 from mikedanese/cloudprovider
Automatic merge from submit-queue

kubeadm: register all cloudproviders

Fixes https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/kubernetes-sig-cluster-lifecycle/fXjS-DL5aq8/7VM5pt-_FAAJ
2016-10-11 16:46:41 -07:00
Ilya Dmitrichenko 53e393ad42
Test API more extensivelly before declaring readiness (close #34411) 2016-10-11 22:33:39 +01:00
Mike Danese dc616dde7c kubeadm: register all cloudproviders 2016-10-11 11:19:46 -07:00
Mike Danese 58d25e378c kubeadm: allow kubeadm init to read config from file 2016-10-11 10:25:28 -07:00
deads2k 406c0a36ae cleanup cruft from API server structs 2016-10-11 10:56:05 -04:00
Kubernetes Submit Queue db0529fc7c Merge pull request #34349 from deads2k/controller-07-d-contorller
Automatic merge from submit-queue

convert deployment controller to shared informers

Converts the deployment controller to shared informers.

@kargakis I think you've been in here.  Pretty straight forward swap.

Fixes #27687
2016-10-11 05:46:38 -07:00
Kubernetes Submit Queue 254c10f08a Merge pull request #32137 from mtaufen/spellcheck
Automatic merge from submit-queue

Fixup in kubelet.go: Package short names should be [a-z0-9]
2016-10-11 00:33:34 -07:00
Kubernetes Submit Queue 1837914d8e Merge pull request #34029 from liggitt/service-account-rotation
Automatic merge from submit-queue

Enable service account signing key rotation

fixes #21007

```release-note
The kube-apiserver --service-account-key-file option can be specified multiple times, or can point to a file containing multiple keys, to enable rotation of signing keys.
```

This PR enables the apiserver authenticator to verify service account tokens signed by different private keys. This can be done two different ways:
* including multiple keys in the specified keyfile (e.g. `--service-account-key-file=keys.pem`)
* specifying multiple key files (e.g. `--service-account-key-file current-key.pem --service-account-key-file=old-key.pem`)

This is part of enabling signing key rotation:

1. update apiserver(s) to verify tokens signed with a new public key while still allowing tokens signed with the current public key (which is what this PR enables)
2. give controllermanager the new private key to sign new tokens with
3. remove old service account tokens (determined by verifying signature or by checking creationTimestamp) once they are no longer in use (determined using garbage collection or magic) or some other algorithm (24 hours after rotation, etc). For the deletion to immediately revoke the token, `--service-account-lookup` must be enabled on the apiserver.
4. once all old tokens are gone, update apiservers again, removing the old public key.
2016-10-10 21:54:03 -07:00
Lucas Käldström 99aaa3d8f4 Bump kubeadm to use kubernetes v1.4.1 2016-10-10 22:25:26 +03:00
Kubernetes Submit Queue 851705ea59 Merge pull request #34147 from mikedanese/kubeadm-api
Automatic merge from submit-queue

kubeadm: turn api into a real apigroup

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

kubeadm: still run cm if not pod cidr is specified

@kubernetes/sig-cluster-lifecycle
2016-10-08 18:25:43 -07:00
Kubernetes Submit Queue b48189835d Merge pull request #34142 from mikedanese/kubeadm-dep
Automatic merge from submit-queue

kubeadm: mark etcd flags as deprecated

Lets mark flags that we don't plan on exposing through the command line permanently as deprecated from now on.

@kubernetes/sig-cluster-lifecycle
2016-10-07 21:51:52 -07:00
Kubernetes Submit Queue 2ecd96100e Merge pull request #33783 from derekwaynecarr/phase-1-pod-cgroups
Automatic merge from submit-queue

Add cgroup-driver and cgroups-per-qos flags to kubelet

Add the flags needed to support pod-level cgroups to kubelet.

/cc @vishh @dchen1107 @dubstack
2016-10-07 17:56:01 -07:00
Mike Danese 45b92085c4 kubeadm: still run cm if not pod cidr is specified 2016-10-07 12:31:10 -07:00
deads2k aa5cbb704f convert deployment controller to shared informers 2016-10-07 15:06:57 -04:00
Mike Danese b3dae78c62 kubeadm: turn api into a real apigroup 2016-10-07 11:14:53 -07:00
Michal Fojtik aea9b486a0 clientgen: allow to pass custom apiPath when generating client sets 2016-10-06 11:27:29 +02:00
Kubernetes Submit Queue 45e5719c2c Merge pull request #33792 from caesarxuchao/decouple-workqueue-prometheus
Automatic merge from submit-queue

decouple workqueue metrics from prometheus

<!--  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**:
We want to include the workqueue in client-go, but do not want to having to import Prometheus. This PR decouples the workqueue from prometheus.

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

Partially address https://github.com/kubernetes/kubernetes/issues/33497
User requested for `workqueue` in client-go: https://github.com/kubernetes/client-go/issues/4#issuecomment-249444848

**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
The implicit registration of Prometheus metrics for workqueue has been removed, and a plug-able interface was added. If you were using workqueue in your own binaries and want these metrics, add the following to your imports in the main package: "k8s.io/pkg/util/workqueue/prometheus".
```
2016-10-05 22:10:11 -07:00
Kubernetes Submit Queue 63139f937c Merge pull request #30787 from jbeda/rsync
Automatic merge from submit-queue

Speed up dockerized builds

This PR speeds up dockerized builds.  First, we make sure that we are as incremental as possible.  The bigger change is that now we use rsync to move sources into the container and get data back out.

To do yet:
* [x] Add a random password to rsync.  This is 128bit MD4, but it is better than nothing.
* [x] Lock down rsync to only come from the host.
* [x] Deal with remote docker engines -- this should be necessary for docker-machine on the mac.
* [x] Allow users to specify the port for the rsync daemon.  Perhaps randomize this or let docker pick an ephemeral port and detect the port?
* [x] Copy back generated files so that users can check them in.  This is done for `zz_generated.*` files generated by `make generated_files` 
  * [x] This should include generated proto files so that we can remove the hack-o-rama that is `hack/hack/update-*-dockerized.sh` 
* [x] Start "versioning" the build container and the data container so that the CI system doesn't have to be manually kicked.
* [x] Get some benchmarks to qualify how much faster.

This replaces #28518 and is related to #30600.

cc @thockin @spxtr @david-mcmahon @MHBauer 

Benchmarks by running `make clean ; sync ; time bash -xc 'time build/make-build-image.sh ; time sync ; time build/run.sh make ; time sync; time build/run.sh make'` on a GCE n1-standard-8 with PD-SSD.

| setup | build image | sync | first build | sync | second build | total |
|-------|-------------|----- |----------|------|--------------|------|
| baseline | 0m11.420s | 0m0.812s | 7m2.353s | 0m42.380s | 7m8.381s | 15m5.348s |
| this pr | 0m10.977s | 0m15.168s | 7m31.096s | 1m55.692s | 0m16.514s | 10m9.449s |
2016-10-05 19:51:09 -07:00
Mike Danese db963fc16d kubeadm: mark etcd flags as deprecated 2016-10-05 14:36:03 -07:00
Kubernetes Submit Queue bd3664cbef Merge pull request #34000 from wojtek-t/set_cache_size
Automatic merge from submit-queue

Set deserialization cache size based on target memory usage

**Special notes for your reviewer**:

This is the PR we talked about yesterday.

**Release note**:

```release-note
To reduce memory usage to reasonable levels in smaller clusters, kube-apiserver now sets the deserialization cache size based on the target memory usage.
```
2016-10-05 14:23:39 -07:00
derekwaynecarr 36eb79b42b Add cgroup driver and cgroups-per-qos flags to kubelet 2016-10-05 13:48:37 -04:00
deads2k 8ea2acc6a3 use service accounts as clients for controllers 2016-10-05 13:15:16 -04:00
Robin Gloster f2ae2cad0b
kubeadm: fix typo 2016-10-05 18:39:24 +02:00
Wojciech Tyczynski 2bfcb1a850 Set deserialization cache size based on target memory usage 2016-10-05 10:00:02 +02:00
Kubernetes Submit Queue 092b2cc081 Merge pull request #31994 from caesarxuchao/client-gen-versioned-options
Automatic merge from submit-queue

[Client-gen] Let versioned client use versioned options

i.e., use v1.ListOptions, v1.DeleteOptions when possible.

Remove the extension/v1beta1.ListOptions, because it's exactly the same as v1.ListOptions, and is not referred throughout the code base. After its removal, I register v1.ListOptions during extensions/v1beta1 scheme registration.

First three commits are manual changes.

Fix #27753

cc @lavalamp
2016-10-04 22:16:40 -07:00
Kubernetes Submit Queue 457d3785de Merge pull request #33862 from luxas/remove_experimental_flannel
Automatic merge from submit-queue

Remove the flannel experimental overlay

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

It removes the deprecated flannel overlay integration in kubelet.
It's completely unnecessary now with CNI which can handle everything smoothly when flannel is running in a daemonset.

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

cc @kubernetes/sig-network @thockin @freehan @bprashanth @yujuhong @dchen1107
2016-10-04 21:39:20 -07:00
Chao Xu 75cc05de82 manual changes to let client-gen use versioned options 2016-10-04 20:39:29 -07:00
Kubernetes Submit Queue f1041e75cf Merge pull request #33728 from mikedanese/cfg-kubeadm
Automatic merge from submit-queue

kubeadm: refactor config

1) break object into substructures
2) seperate a config object for master and node
3) centralize defaulting and validation

Hacked til it compiled. Have not done 3 yet.

Step one of #33715
2016-10-04 17:48:14 -07:00
Jordan Liggitt 3c92eb75b3
Enable service account signing key rotation 2016-10-04 14:16:38 -04:00
Lucas Käldström 348717c50a Remove the flannel experimental overlay 2016-10-04 11:53:53 +03:00
Joe Beda 4330560b6a Make update-generated-*.sh not hack around with docker images
make-generated-{protobuf,runtime}.sh was doing some really nasty stuff with how
the build container was managed in order to copy results out.  Since we have
more flexibility to grab results out of the build container, we can now avoid
all of this.  Ideally we wouldn't have `hack` calling `build` at all, but we
aren't there yet.
2016-10-03 19:42:21 -07:00
Mike Danese 56ea178e7c kubeadm: refactor config
1) break object into substructures
2) seperate a config object for master and node
2016-10-03 14:44:18 -07:00
Chao Xu feb0d1daa8 decouple workqueue metrics from prometheus 2016-10-03 11:02:06 -07:00
deads2k 8eddc7158b stop plumbing options to start 2016-10-03 13:35:00 -04:00
Kubernetes Submit Queue 64d2b12d21 Merge pull request #33859 from luxas/not_so_aggressve_probes
Automatic merge from submit-queue

Do not probe so aggressively which may lead to unnecessary restarts

@errordeveloper @mikedanese PTAL

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

Maybe we should remove the etcd probe totally? I don't know, what do you think?
This is at least a try to loosen the limits here...
2016-10-03 05:55:42 -07:00
Ilya Dmitrichenko abc0a98d25
Replace references to http://releases.k8s.io/HEAD/docs/user-guide/ 2016-10-02 11:44:40 +01:00
Kubernetes Submit Queue bd97c4b7c8 Merge pull request #33879 from luxas/remove_refs_to_mesos
Automatic merge from submit-queue

Remove old references to contrib/mesos

@deads2k @k82cn @derekwaynecarr
2016-10-01 18:20:10 -07:00
Kubernetes Submit Queue 347d448180 Merge pull request #33831 from rustyrobot/print-cert-info
Automatic merge from submit-queue

Kubeadm: print information about certificates

Prints basic information about certificates to the user.

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

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

Fixes #33642
cc @kubernetes/sig-cluster-lifecycle
2016-10-01 11:31:25 -07:00
Kubernetes Submit Queue 6a1622a723 Merge pull request #33785 from deads2k/api-16-pass-config-to-hook
Automatic merge from submit-queue

pass loopback config to poststart hooks

Updates post start hooks to take a clientconfig with the new loopback credentials for bootstrapping.

@ericchiang This is a little bit of plumbing, but mainly auth I think.
2016-10-01 10:27:04 -07:00
Kubernetes Submit Queue 30ca344361 Merge pull request #33565 from liggitt/ecdsa
Automatic merge from submit-queue

Add ECDSA support for service account tokens

Fixes #28180

```release-note
ECDSA keys can now be used for signing and verifying service account tokens.
```
2016-10-01 08:42:53 -07:00
Lucas Käldström 0bba65ca1a Remove old references to contrib/mesos 2016-10-01 16:46:48 +03:00
Lucas Käldström 60274778bc Set FailureTreshold to 8 for kubeadm components in order to not restart unless really necessary 2016-10-01 16:25:27 +03:00
Kubernetes Submit Queue 901e3e30b6 Merge pull request #33387 from timothysc/resource_lock_abstraction
Automatic merge from submit-queue

Abstraction of endpoints in leaderelection code

**Problem Statement**:
Currently the Leader Election code is hard coded against the endpoints api.  This causes performance issues on large scale clusters due to incessant iptables refreshes, see: https://github.com/kubernetes/kubernetes/issues/26637 

The goal of this PR is to: 

- Abstract Endpoints out of the leader election code
- Fix a known bug in the event recording 

fixes #18386

**Special notes for your reviewer**:
This is a 1st pass at abstracting the details of endpoints out into an interface.  Any suggestions around how we we want to refactor this interface is welcome and could be addressed in either this PR or follow on PR. 

/cc @ncdc @wojtek-t @rrati
2016-10-01 05:19:29 -07:00
Kubernetes Submit Queue 5cfed5ff22 Merge pull request #33374 from deads2k/controller-05-more-informers
Automatic merge from submit-queue

switch node controller to shared informers

Switches the node controller to re-use existing watches and caches.
2016-10-01 03:39:47 -07:00
Kubernetes Submit Queue 5a9acd9113 Merge pull request #33681 from zachaller/master
Automatic merge from submit-queue

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

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

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

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

**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Fixes Kubeadm so kube-controller has certs for using amazon api
```
2016-09-30 23:24:56 -07:00
Evgeny L 12f8c979ba kubeadm: user-friendly certificates formatting 2016-10-01 04:57:30 +00:00
deads2k 57039cfdfa make well-known users and groups into constants 2016-09-30 10:34:33 -04:00
deads2k 4c8959df59 pass loopback config to posthooks 2016-09-30 10:34:33 -04:00
Timothy St. Clair 4a9f72b59f Abstraction of endpoints in leaderelection code 2016-09-29 23:42:00 -05:00
deads2k 5080a575ad add anytoken authenticator 2016-09-29 14:14:06 -04:00
Kubernetes Submit Queue d187997c94 Merge pull request #32386 from liggitt/anonymous-authenticated-groups
Automatic merge from submit-queue

Allow anonymous API server access, decorate authenticated users with system:authenticated group

When writing authorization policy, it is often necessary to allow certain actions to any authenticated user. For example, creating a service or configmap, and granting read access to all users

It is also frequently necessary to allow actions to any unauthenticated user. For example, fetching discovery APIs might be part of an authentication process, and therefore need to be able to be read without access to authentication credentials.

This PR:
* Adds an option to allow anonymous requests to the secured API port. If enabled, requests to the secure port that are not rejected by other configured authentication methods are treated as anonymous requests, and given a username of `system:anonymous` and a group of `system:unauthenticated`. Note: this should only be used with an `--authorization-mode` other than `AlwaysAllow`
* Decorates user.Info returned from configured authenticators with the group `system:authenticated`.

This is related to defining a default set of roles and bindings for RBAC (https://github.com/kubernetes/features/issues/2). The bootstrap policy should allow all users (anonymous or authenticated) to request the discovery APIs.

```release-note
kube-apiserver learned the '--anonymous-auth' flag, which defaults to true. When enabled, requests to the secure port that are not rejected by other configured authentication methods are treated as anonymous requests, and given a username of 'system:anonymous' and a group of 'system:unauthenticated'. 

Authenticated users are decorated with a 'system:authenticated' group.

NOTE: anonymous access is enabled by default. If you rely on authentication alone to authorize access, change to use an authorization mode other than AlwaysAllow, or or set '--anonymous-auth=false'.
```

c.f. https://github.com/kubernetes/kubernetes/issues/29177#issuecomment-244191596
2016-09-29 10:47:49 -07:00
Kubernetes Submit Queue 239630ce9a Merge pull request #33644 from errordeveloper/kubeadm-remove-glog
Automatic merge from submit-queue

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

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

**Release note**:
```release-note
NONE
```
2016-09-29 08:44:28 -07:00
deads2k 0961784a9b switch node controller to shared informers 2016-09-29 09:16:41 -04:00
Kubernetes Submit Queue 50e12ff5a2 Merge pull request #33575 from sttts/sttts-defaulted-config
Automatic merge from submit-queue

Decouple genericapiserver setDefault from New()
2016-09-29 01:52:46 -07:00
Dr. Stefan Schimanski 61409c821b Turn embedding into composition: master.Config.{Config -> GenericConfig} 2016-09-29 08:09:39 +02:00
Kubernetes Submit Queue df0ae9f67d Merge pull request #33668 from mikedanese/private-ip
Automatic merge from submit-queue

kubeadm: default to using a private range for service subnet

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

@errordeveloper @kubernetes/sig-cluster-lifecycle
2016-09-28 18:49:46 -07:00
Dr. Stefan Schimanski 8391a19b57 Decouple defaulting from genericapiserver and master 2016-09-28 23:16:09 +02:00
Mike Danese df2fcbda05 kubeadm: add OWNERS file 2016-09-28 13:52:27 -07:00
Zach Aller bd1d93e2e0 fix kubeadm on AWS so that kube-controller has access to certs for amazon api 2016-09-28 18:47:23 +00:00
Dr. Stefan Schimanski b4c6a68036 Unify genericapiserver Config.New() and master Config.New() 2016-09-28 19:19:54 +02:00
Mike Danese 3c8c71e80e default to using a private range for service subnet 2016-09-28 10:01:55 -07:00
gmarek cb0a13c1e5 Move orphaned Pod deletion logic to PodGC 2016-09-28 13:58:31 +02:00
Ilya Dmitrichenko 037ef3e50c
Remove glog added by mistake, start converting phase1+ TODOs to issues 2016-09-28 10:27:53 +01:00
Kubernetes Submit Queue df064881d2 Merge pull request #31005 from simonswine/feature-flocker-dyn-provisioning
Automatic merge from submit-queue

Dynamic provisioning for flocker volume plugin

Refactor flocker volume plugin
* [x] Support provisioning beta (#29006)
* [x] Support deletion
* [x] Use bind mounts instead of /flocker in containers

* [x] support ownership management or SELinux relabeling.
* [x] adds volume specification via datasetUUID (this is guranted to be unique)

I based my refactor work to replicate pretty much GCE-PD behaviour 

**Related issues**: #29006 #26908

@jsafrane @mattbates @wallrj @wallnerryan
2016-09-28 01:46:43 -07:00
Kubernetes Submit Queue 8ce107cbff Merge pull request #33263 from wu8685/flag_string_array
Automatic merge from submit-queue

Update godep for github.com/spf13/pflag and replace StringSlice with String Array in configMap

Update godep for pkg `github.com/spf13/pflag`, because the new flag type `StringArray` within it is needed in issue #27454
2016-09-28 00:20:43 -07:00
Kubernetes Submit Queue b2c175c758 Merge pull request #33474 from wojtek-t/user_agent_for_master_election
Automatic merge from submit-queue

Set UserAgent in LeaderElection clients.

Ref https://github.com/kubernetes/kubernetes/issues/33259

@timothysc - FYI
2016-09-27 22:58:08 -07:00
Kubernetes Submit Queue e808c97943 Merge pull request #33420 from thockin/openapi-make
Automatic merge from submit-queue

Fix make rebuilds for openapi

openapi generates a single file, so its rules can be significantly simpler.

federation generates an empty file which we previously elided, but which triggers deps every build.

This fixes both.

@mbohlool something to think about.  Generating a single file means you generate everything every time any tagged package changes.  This is not awesome.  In practice, it's pretty fast, so maybe just for thinking about - would it be better to generate a file for every tagged package, and only regenerate when needed.  The file could self-register a callback or just add some structs to your mega-map.
2016-09-27 21:08:13 -07:00
Kubernetes Submit Queue 1854bdcb0c Merge pull request #29048 from justinsb/volumes_nodename_not_hostname
Automatic merge from submit-queue

Use strongly-typed types.NodeName for a node name

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

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

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName
2016-09-27 17:58:41 -07:00
Tim Hockin 2b937f6d6e Fix openapi Make rules to emit 1 file 2016-09-27 17:52:22 -07:00
Tim Hockin bd9c04cf5d Move openapi output to a flag rather than tag 2016-09-27 17:52:22 -07:00
Kubernetes Submit Queue cf7301f16c Merge pull request #33564 from oz123/fix_typo
Automatic merge from submit-queue

Fix typo fialed->failed

Just a tiny fix .
2016-09-27 10:06:54 -07:00
Kubernetes Submit Queue 80be079c9f Merge pull request #33555 from rustyrobot/fix-selinux-rules-discovery
Automatic merge from submit-queue

Kubeadm: fix SELinux rules for kubernetes discovery service

**What this PR does / why we need it**:
Fixes problems with SELinux on CentOS for discovery container which cannot read data from `/tmp/secret` directory.

**Which issue this PR fixes**
Fixed #33541
2016-09-27 10:06:48 -07:00
Jordan Liggitt 6333d8fd86
Add ECDSA support 2016-09-27 12:44:54 -04:00
Kubernetes Submit Queue 8d72f66e47 Merge pull request #32129 from jsafrane/refactor-controller-startup
Automatic merge from submit-queue

Refactor volume controller parameters into a structure

`persistentvolumecontroller.NewPersistentVolumeController` has 11 arguments now,
put them into a structure.

Also, rename `NewPersistentVolumeController` to `NewController`, `persistentvolume`
is already name of the package.

Fixes #30219
2016-09-27 08:09:39 -07:00
Justin Santa Barbara 54195d590f Use strongly-typed types.NodeName for a node name
We had another bug where we confused the hostname with the NodeName.

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

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

Also clean up some of the (many) places where the NodeName is referred
to as a hostname (not true on AWS), or an instanceID (not true on GCE),
etc.
2016-09-27 10:47:31 -04:00
Oz N Tiram ae5d5867ab Fix typo fialed->failed 2016-09-27 16:38:01 +02:00
Evgeny L 8f586d916e Kubeadm: fix SELinux rules for kubernetes discovery service 2016-09-27 13:24:29 +00:00
Wojciech Tyczynski cbcce2c90f Set UserAgent in LeaderElection clients. 2016-09-27 15:22:40 +02:00
Christian Simon cd0897801b Refactor flocker volume plugin
* Support provisioning
* Support deletion
* Use bind mounts instead of /flocker in containers
* support ownership management or SELinux relabeling.
2016-09-27 13:19:45 +00:00
Kubernetes Submit Queue 294c9aa630 Merge pull request #33469 from thockin/autoconvert_cleanups
Automatic merge from submit-queue

Autoconvert cleanups

A few accumulated cleanups to conversion, and then a big change.  Please review commit-by-commit.  Verified by nuking all generated files and comparing the new results.

cc @lavalamp
2016-09-27 06:15:21 -07:00
Kubernetes Submit Queue 1e7fa1f6cd Merge pull request #33334 from caesarxuchao/copy-auth-plugin
Automatic merge from submit-queue

Copy auth plugin to client-go repo

client-go doesn't copy the [auth plugin](https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/client/auth/plugins.go). This causes user cannot access cluster run by GKE. User will see error "No Auth Provider found for name gcp".

This PR fixes this issue. It's marked as WIP because I'll need to rebase after #32906 gets merged. Also, the fix needs to be cherry-picked into 1.4 branch to update client-go/1.4.
2016-09-27 02:30:38 -07:00
Tim Hockin 957c85a8fd Add a lower-bound for conntrack 2016-09-26 20:25:40 -07:00
Tim Hockin 38d7c4b271 Conversion: log opted-out fields 2016-09-26 20:07:54 -07:00
Tim Hockin 7efb2d4738 Always emit autoConvert funcs, but call for help
Previously we refused to emit 'autoConvert_*' functions if any field was not
convertible.  The way around this was to write manual Conversion functions, but
to do so safely you must handle every fields.  Huge opportunity for errors.

This PR cleans up the filtering such that it only operates on types that should
be converted (remove a lot of code) and tracks when fields are skipped.  In
that case, it emits an 'autoConvert' function but not a public 'Convert'
function.  If there is no manual function, the compile will fail.

This also means that manual conversion functions can call autoConvert functions
and then "patch up" what they need.
2016-09-26 20:07:54 -07:00
Tim Hockin 3023decd00 Renames for readability in conversion-gen 2016-09-26 20:07:54 -07:00
Tim Hockin 210a634bcc Remove useless conversion-gen pre-filter 2016-09-26 20:07:54 -07:00
Tim Hockin 87abf78bb7 Minor cleanups in conversion gen 2016-09-26 20:07:54 -07:00
Tim Hockin 17b64fc3d6 Better warning string in failed conversion gen 2016-09-26 20:07:54 -07:00
wu8685 6140ab26d0 update godep for github.com/spf13/pflag 2016-09-27 10:56:12 +08:00
Kubernetes Submit Queue a61a1f51f3 Merge pull request #29732 from ping035627/ping035627-patch-0728
Automatic merge from submit-queue

Optimise the getConntrackMax function

The PR optimise the getConntrackMax function, make it more concise.
2016-09-26 19:56:00 -07:00
Chao Xu a397e306a4 run client-gen
run copy.sh
2016-09-26 15:40:36 -07:00
Chao Xu e17e0b19ab remove special clientrepo code from main repository gcp plugin
rename plugin/pkg/client/auth/plugins.go package name to auth

add the plugin import line in client-gen

update import_known_versions for release_1_5 clientset

change copy.sh
2016-09-26 15:40:29 -07:00
Jordan Liggitt 0c36c5e556
Add anonymous auth to the auth chain 2016-09-26 17:19:00 -04:00
Jan Safranek a54c9e2887 Refactor volume controller parameters into a structure
persistentvolumecontroller.NewPersistentVolumeController has 11 arguments now,
put them into a structure.

Also, rename NewPersistentVolumeController to NewController, persistentvolume
is already name of the package.

Fixes #30219
2016-09-26 14:15:25 +02:00
deads2k c22f076561 remove almost all usages of clientadapter 2016-09-26 07:53:03 -04:00
Kubernetes Submit Queue c19e08ebbc Merge pull request #33262 from errordeveloper/kubeadm
Automatic merge from submit-queue

kubeadm

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

This PR add alpha version of `kubeadm` tool, which allows user to boostrap a cluster rather quite easily. This is the initial contribution from @kubernetes/sig-cluster-lifecycle members, who's aim is to build easy-to-use tools that help to operate a cluster throughout its lifetime.

**Which issue this PR fixes**: a leap towards kubernetes/features#11

**Special notes for your reviewer**: previously seen by many folks in #31221

**Release note**:

```release-note
`kubeadm` (alpha) provides an easy way to securely bootstrap Kubernetes on Linux, see http://kubernetes.io/docs/kubeadm/
```
2016-09-26 02:35:47 -07:00
Luke Marsden 3a4613d3b2 fix https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/33262/kubernetes-pull-verify-all/15586/ 2016-09-26 09:13:09 +01:00
Lucas Käldström 51573860fa Update CHANGELOG and gofmt 2016-09-26 09:13:09 +01:00
Jordan Liggitt 2ac293a0bd
Put loopback authn/authz first in chain 2016-09-25 20:33:25 -04:00
Lucas Käldström b17e107def Various improvements plus added a version command 2016-09-25 22:38:39 +03:00
Ilya Dmitrichenko a023085a5f
Address comments in review 2016-09-24 17:28:34 +01:00
Ilya Dmitrichenko d0e29789b0
Fix sorting of linted packages and gofmt 2016-09-24 14:46:43 +01:00
Lucas Käldström 37dab80173
Make the Kubernetes control plane version configurable 2016-09-24 14:46:42 +01:00
Atanas Mirchev 5862ea6f38
Fix boostrap token encoding bug during master init
Currently the boostrap fails when a token is provided by the user
on `master init` and works when the token is generated. This is
because of a mismatch of how the token string in the kube-discovery
secret is encoded.
2016-09-24 14:46:42 +01:00
Evgeny L 0a68bb05ea
Rename flag `--schedule-workload` to `--schedule-pods-here` for kubeadm init 2016-09-24 14:46:41 +01:00
Atanas Mirchev ab3b2d579f
Fix package / struct naming after core refactoring. 2016-09-24 14:46:41 +01:00
Devan Goodwin 832d83efaa
Allow etcd container to work with selinux. 2016-09-24 14:46:40 +01:00
Ilya Dmitrichenko 0f05ccb019
Cleanup some low-hanging fruits and review TODOs 2016-09-24 14:46:40 +01:00
Atanas Mirchev 9eeae34581
Add node CIDR allocation as an option to kubeadm.
This is useful for users who are used to deploying with a flannel
overlay network.
2016-09-24 14:46:40 +01:00
Luke Marsden 38b53e31f3
Before declaring success, require that the discovery deployment has at least one active pod. 2016-09-24 14:46:39 +01:00
Paulo Pires 389cb2c7cd
Add support for external and optionally secured etcd cluster. 2016-09-24 14:46:39 +01:00
Paulo Pires 26aa32d32b
Reviewed help text, fix typos, go {fmt,vet,lint}. 2016-09-24 14:46:38 +01:00
Ilya Dmitrichenko a42ad6a913
Move `pkg/kubadm` to `cmd/kubeadm/app`, remove `cmd/manual.go` 2016-09-24 14:46:38 +01:00
Lucas Käldström cab23e202e
Various improvements for kubeadm. Removed the user command, as it's too little time for implementing that. Now it's possible to use multiple arches. 2016-09-24 14:46:37 +01:00
Evgeny L a2a807b50d
Mount etcd data directory to host 2016-09-24 14:46:36 +01:00
Ilya Dmitrichenko b9fd31ff7e
Refactoring improtant parts and start on docs 2016-09-24 14:46:35 +01:00