Commit Graph

4338 Commits (4c7c865ff6af3935ed76eadcc0948d57b59cdd49)

Author SHA1 Message Date
Solly Ross 85c3ca1013 [go-to-protobuf] Quote tag cast{key,value,type}
When using a `cast{key,value,type}` that was injected via struct tag, we
need to make sure to quote the value when transfering it over to proto
tags.  Otherwise, it'll come through as unquoted, resulting in invalid
proto.

This was previously not a problem, since all values of `castkey` and
`casttype` were actually coming from the auto-injecting code which deals
with maps and aliases, which does correctly quote values.
2017-05-26 19:59:27 -04:00
Solly Ross 7b8e572d8a [go-to-protobuf] generate proto for k8s.io/metrics
This commit adds the `k8s.io/metrics` APIs to the list of packages for
which to generate protobuf.  Additionally, it adds
`k8s.io/client-go/pkg/apis/v1` as a non-generated (referenced) package.
2017-05-26 19:59:27 -04:00
Solly Ross fb40658f9d [go-to-protobuf] Skip private types and functions
Since go-to-protobuf doesn't care about functions or private types (only
public types), we can skip them.  This helps to clean up the generated
IDL: previously, the IDL contained erroneous imports due to matching
functions and private types which were not actually converted to protobuf,
but which were the same as functions and private types in other packages.
2017-05-26 19:59:06 -04:00
Walter Fender ad8a83a7c1 Change to aggregator so it calls a user apiservice via its pod IP.
proxy_handler now uses the endpoint router to map the cluster IP to
appropriate endpoint (Pod) IP for the given resource.
Added code to allow aggregator routing to be optional.
Updated bazel build.
Fixes to cover JLiggit comments.
Added util ResourceLocation method based on Listers.
Fixed issues from verification steps.
Updated to add an interface to obfuscate some of the routing logic.
Collapsed cluster IP resolution in to the aggregator routing
implementation.
Added 2 simple unit tests for ResolveEndpoint
2017-05-26 16:10:01 -07:00
Kubernetes Submit Queue 3be6879bde Merge pull request #46440 from deads2k/crd-03-invert
Automatic merge from submit-queue (batch tested with PRs 42256, 46479, 45436, 46440, 46417)

move CRD behind TPR

Second attempt at https://github.com/kubernetes/kubernetes/pull/46297

@liggitt since @sttts is out can you take a look and hopefully find me a different, more sane way to do this? It's a little crazy, but I left a large comment explaining why I think its the only way.
2017-05-26 15:59:03 -07:00
Kubernetes Submit Queue 7bc6da0b77 Merge pull request #46294 from caesarxuchao/dynamic-registration-prototype
Automatic merge from submit-queue (batch tested with PRs 46383, 45645, 45923, 44884, 46294)

Dynamic registration prototype

Implementing the api proposed in https://github.com/kubernetes/community/pull/611.
Wiring the code to serve the api via apiserver.
```release-note
Adding admissionregistration API group which enables dynamic registration of initializers and external admission webhooks. It is an alpha feature.
```
2017-05-26 12:58:07 -07:00
Zihong Zheng ad437e9ce2 Add /healthz back to kube-proxy metrics server 2017-05-26 11:53:43 -07:00
Kubernetes Submit Queue bcad534ebc Merge pull request #46058 from jcbsmpsn/configure-certificate-duration
Automatic merge from submit-queue

Add support for specifying certificate duration at runtime.
2017-05-26 11:02:03 -07:00
deads2k 18177e2bde move CRD behind TPR 2017-05-26 12:15:13 -04:00
Kubernetes Submit Queue 58167fcfa1 Merge pull request #46202 from lixiaobing10051267/masterServerTest
Automatic merge from submit-queue

print the name of invalid host to help to fix the bug

print the name of invalid host to help to fix the bug.
2017-05-26 02:34:50 -07:00
lixiaobing1 a78eeebe2d print the name of invalid host to help to fix the bug 2017-05-26 16:14:37 +08:00
Chao Xu bc9b305f17 generated clients 2017-05-26 00:03:53 -07:00
Chao Xu 1500017111 go-to-protobuf take care of admissionregistration 2017-05-25 23:55:15 -07:00
Kubernetes Submit Queue 5e853709a7 Merge pull request #46089 from karataliu/wincri1
Automatic merge from submit-queue (batch tested with PRs 46124, 46434, 46089, 45589, 46045)

Support TCP type runtime endpoint for kubelet

**What this PR does / why we need it**:
Currently the grpc server for kubelet and dockershim has a hardcoded endpoint: unix socket '/var/run/dockershim.sock', which is not applicable on non-unix OS.

This PR is to support TCP endpoint type besides unix socket.

**Which issue this PR fixes** 
This is a first attempt to address issue https://github.com/kubernetes/kubernetes/issues/45927

**Special notes for your reviewer**:
Before this change, running on Windows node results in:
```
Container Manager is unsupported in this build
```

After adding the cm stub, error becomes:
```
listen unix /var/run/dockershim.sock: socket: An address incompatible with the requested protocol was used.
```

This PR is to fix those two issues.

After this change, still meets 'seccomp' related issue when running on Windows node, needs more updates later.

**Release note**:
2017-05-25 21:40:02 -07:00
Andy Goldstein 78a4c8e95a Up namespace controller workers to 5
Increase the number of namespace controller workers from 2 to 5 in an
effort to speed up namespace deletions.
2017-05-25 09:47:47 -04:00
lixiaobing1 b17e0a2876 ommitting close file while testing manifest 2017-05-25 17:08:58 +08:00
zhangxiaoyu-zidif 8e0add42f3 hollow-node.go:delete useless para. and import 2017-05-25 12:54:01 +08:00
Dong Liu fb26c9100a Support TCP type runtime endpoint for kubelet. 2017-05-25 09:16:11 +08:00
Ginwala 28a0e2621b Fix comment typo in kube-apiserver and cachesize 2017-05-24 13:41:33 -07:00
Jacob Simpson 07e9b0e197 Add support for specifying certificate duration at runtime. 2017-05-24 13:29:46 -07:00
Kubernetes Submit Queue 1153ef19ce Merge pull request #45635 from MrHohn/hyperkube-unit-test
Automatic merge from submit-queue (batch tested with PRs 45514, 45635)

hyperkube_test should not depend on number of spaces.

From #45524.

Apparently adding a long flag to kube-controller-manager breaks the hyperkube unit tests, because they depend on number of spaces :)

**Release note**:

```release-note
NONE
```
2017-05-23 20:52:56 -07:00
Kubernetes Submit Queue 5be7a6a73e Merge pull request #45514 from mikedanese/cert-refactor
Automatic merge from submit-queue (batch tested with PRs 45514, 45635)

refactor certificate controller to break it into two parts

Break pkg/controller/certificates into:
* pkg/controller/certificates/approver: containing the group approver
* pkg/controller/certificates/signer: containing the local signer
* pkg/controller/certificates: containing shared infrastructure
```release-note
Break the 'certificatesigningrequests' controller into a 'csrapprover' controller and 'csrsigner' controller.
```
2017-05-23 20:52:53 -07:00
Kubernetes Submit Queue 95a6f108bd Merge pull request #46289 from p0lyn0mial/admission_plugins_remove_init_blocks
Automatic merge from submit-queue

remove init blocks from all admission plugins

**What this PR does / why we need it**:
removes init blocks from all admission plugins

**Release note**:

```release-note
NONE
```
2017-05-23 17:00:59 -07:00
Kubernetes Submit Queue 45b275d52c Merge pull request #45897 from ncdc/gc-require-list-watch
Automatic merge from submit-queue (batch tested with PRs 46149, 45897, 46293, 46296, 46194)

GC: update required verbs for deletable resources, allow list of ignored resources to be customized

The garbage collector controller currently needs to list, watch, get,
patch, update, and delete resources. Update the criteria for
deletable resources to reflect this.

Also allow the list of resources the garbage collector controller should
ignore to be customizable, so downstream integrators can add their own
resources to the list, if necessary.

cc @caesarxuchao @deads2k @smarterclayton @mfojtik @liggitt @sttts @kubernetes/sig-api-machinery-pr-reviews
2017-05-23 15:48:57 -07:00
Mike Danese f04ce3cfba refactor certificate controller 2017-05-23 15:25:58 -07:00
Kubernetes Submit Queue 3ff99a8381 Merge pull request #46149 from cjcullen/logtoggle
Automatic merge from submit-queue

Allow the /logs handler on the apiserver to be toggled.

Adds a flag to kube-apiserver, and plumbs through en environment variable in configure-helper.sh
2017-05-23 15:19:08 -07:00
p0lyn0mial c5019bf696 remove init blocks from all admission plugins 2017-05-23 22:00:32 +02:00
Andy Goldstein d1a0384678 GC: allow ignored resources to be customized
Allow the list of resources the garbage collector controller should
ignore to be customizable, so downstream integrators can add their own
resources to the list, if necessary.
2017-05-23 12:05:09 -04:00
Andy Goldstein d30fb0d9d5 GC: update required verbs for deletable resources
The garbage collector controller currently needs to list, watch, get,
patch, update, and delete resources. Update the criteria for
deletable resources to reflect this.
2017-05-23 12:00:10 -04:00
Kubernetes Submit Queue cc6e51c6e8 Merge pull request #45427 from ncdc/gc-shared-informers
Automatic merge from submit-queue (batch tested with PRs 46201, 45952, 45427, 46247, 46062)

Use shared informers in gc controller if possible

Modify the garbage collector controller to try to use shared informers for resources, if possible, to reduce the number of unique reflectors listing and watching the same thing.

cc @kubernetes/sig-api-machinery-pr-reviews @caesarxuchao @deads2k @liggitt @sttts @smarterclayton @timothysc @soltysh @kargakis @kubernetes/rh-cluster-infra @derekwaynecarr @wojtek-t @gmarek
2017-05-22 20:58:03 -07:00
Kubernetes Submit Queue c6cf666fa1 Merge pull request #45308 from fabianofranz/more_cmd_sanity_checks
Automatic merge from submit-queue (batch tested with PRs 46022, 46055, 45308, 46209, 43590)

More cli sanity verifications

Adds some more `kubectl` command sanity checks to improve consistency and avoid the need of code reviews for some of our CLI style and standards.

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cli-pr-reviews
2017-05-22 19:59:59 -07:00
Kubernetes Submit Queue bb56937b92 Merge pull request #46055 from deads2k/crd-01-embed
Automatic merge from submit-queue (batch tested with PRs 46022, 46055, 45308, 46209, 43590)

embed kube-apiextensions inside of kube-apiserver

To reduce operation complexity, we decided to include the kube-apiextensions-server inside of kube-apiserver (https://github.com/kubernetes/community/blob/master/sig-api-machinery/api-extensions-position-statement.md#q-should-kube-aggregator-be-a-separate-binaryprocess-than-kube-apiserver).  With the API reasonably well established and a finalizer about merge, I think its time to add ourselves.

This pull wires kube-apiextensions-server ahead of the TPRs so that one will replace the other if both are added by accident (CRDs should have priority) and wires a controller for automatic aggregation.

WIP because I still need tests: unit test for controller, test-cmd test to mirror the TPR test.


```release-note
Adds the `CustomResourceDefinition` (crd) types to the `kube-apiserver`.  These are the successors to `ThirdPartyResource`.  See https://github.com/kubernetes/community/blob/master/contributors/design-proposals/thirdpartyresources.md for more details.
```
2017-05-22 19:59:57 -07:00
Michelle Au dd46c7f88e Local volume plugin 2017-05-22 14:44:51 -07:00
CJ Cullen 9dca164ddd Allow the /logs handler on the apiserver to be toggled.
Change-Id: Ibf173b7f85cf7fffe8482eaee74fb77da2b2588b
2017-05-22 14:37:24 -07:00
Andy Goldstein 2480f2ceb6 Use shared informers in gc controller if possible 2017-05-22 12:51:37 -04:00
deads2k 446e959bf7 make CRD apiservice controller 2017-05-22 08:54:14 -04:00
deads2k a637c49c8d embed apiextensions server into kube-apiserver 2017-05-22 08:53:07 -04:00
Cao Shufeng 9710eb62ae validate oidc flags
This change validate oidc flags for kube-apiserver.
2017-05-22 18:03:28 +08:00
Clayton Coleman 784e3ae5fa
Switch the tokens controller to use shared informers
Tokens controller previously needed a bit of extra help in order to be
safe for concurrent use. The new MutationCache allows it to keep a local
cache and still use a shared informer. The filtering event handler lets
it only see changes to secrets it cares about.
2017-05-20 14:19:49 -04:00
x1957 5e09714076 fixtypo seperated -> separated 2017-05-20 20:16:20 +08:00
Kubernetes Submit Queue af5d057339 Merge pull request #46018 from YuPengZTE/devBaseCommand
Automatic merge from submit-queue (batch tested with PRs 46033, 46122, 46053, 46018, 45981)

ineffectual assignment to baseCommand, delete it

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>



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

**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
```
2017-05-19 23:29:30 -07:00
Kubernetes Submit Queue 078d820de9 Merge pull request #46122 from ncdc/kube-proxy-version-flag
Automatic merge from submit-queue (batch tested with PRs 46033, 46122, 46053, 46018, 45981)

Restore kube-proxy --version

Accidentally removed by #34727.

Fixes #46026
2017-05-19 23:29:26 -07:00
Kubernetes Submit Queue 4f55f49035 Merge pull request #46042 from derekwaynecarr/quota-admission-registry
Automatic merge from submit-queue (batch tested with PRs 45346, 45903, 45958, 46042, 45975)

ResourceQuota admission control injects registry

**What this PR does / why we need it**:
The `ResourceQuota` admission controller works with a registry that maps a GroupKind to an Evaluator.  The registry used in the existing plug-in is not injectable, which makes usage of the ResourceQuota plug-in in other API server contexts difficult.  This PR updates the code to support late injection of the registry via a plug-in initializer.
2017-05-19 22:29:34 -07:00
Andy Goldstein f51c2c445c Restore kube-proxy --version 2017-05-19 14:40:35 -04:00
Jeremy Whitlock 1b59dd887d add "admission" API group
This commit is an initial pass at providing an admission API group.
The API group is required by the webhook admission controller being
developed as part of https://github.com/kubernetes/community/pull/132
and could be used more as that proposal comes to fruition.
2017-05-19 10:17:37 -06:00
Kubernetes Submit Queue 9a5694b4c4 Merge pull request #45908 from ncdc/kube-proxy-write-config
Automatic merge from submit-queue

kube-proxy: add --write-config-to flag

Add --write-config-to flag to kube-proxy to write the default configuration
values to the specified file location.

@deads2k suggested I create my own scheme for this, so I followed the example he shared with me. The only bit currently still referring to `api.Scheme` is where we create the event broadcaster recorder. In order to use the custom private scheme, I either have to pass it in to `NewProxyServer()`, or I have to make `NewProxyServer()` a member of the `Options` struct. If the former, then I probably need to export `Options.scheme`. Thoughts?

cc @mikedanese @sttts @liggitt @deads2k @smarterclayton @timothysc @kubernetes/sig-network-pr-reviews @kubernetes/sig-api-machinery-pr-reviews 

```release-note
Add --write-config-to flag to kube-proxy to allow users to write the default configuration settings to a file.
```
2017-05-19 09:01:04 -07:00
Kubernetes Submit Queue ead8c98cdb Merge pull request #45987 from nicksardo/cloud-init-kubeclient
Automatic merge from submit-queue

Initialize cloud providers with a K8s clientBuilder

**What this PR does / why we need it**:
This PR provides each cloud provider the ability to generate kubernetes clients. Either the full access or service account client builder is passed from the controller manager. Cloud providers could need to retrieve information from the cluster that isn't provided through defined interfaces, and this seems more preferable to adding parameters.

Please leave your thoughts/comments.

**Release note**:
```release-note
NONE
```
2017-05-18 20:51:24 -07:00
Derek Carr a71bea312a ResourceQuota admission control injects registry 2017-05-18 23:17:13 -04:00
Kubernetes Submit Queue a9fbeef694 Merge pull request #45929 from liggitt/node-admission
Automatic merge from submit-queue (batch tested with PRs 41535, 45985, 45929, 45948, 46056)

NodeRestriction admission plugin

Adds an optional `NodeRestriction` admission plugin that limits identifiable kubelets to mutating their own Node object, and Pod objects bound to their node.

This is the admission portion of https://github.com/kubernetes/community/blob/master/contributors/design-proposals/kubelet-authorizer.md and kubernetes/features#279

```release-note
The `NodeRestriction` admission plugin limits the `Node` and `Pod` objects a kubelet can modify. In order to be limited by this admission plugin, kubelets must use credentials in the `system:nodes` group, with a username in the form `system:node:<nodeName>`. Such kubelets will only be allowed to modify their own `Node` API object, and only modify `Pod` API objects that are bound to their node.
```
2017-05-18 19:58:13 -07:00
Kubernetes Submit Queue 8214f7bb29 Merge pull request #45839 from caesarxuchao/client-gen-vendor
Automatic merge from submit-queue

let client-gen understand vendor

This is extracted from #44784, where we move external api types to k8s.io/api. After the move, the types will locate at vendor/k8s.io/api/xxx. However, gengo index the parsed package using the import path, which is stripped of  the vendor/ prefix, so we'll need to strip the vendor/ prefix as necessary in client-gen.

This PR doesn't produce any change to the generated clientset yet since all types are still in the kubernetes repo.
2017-05-18 17:45:35 -07:00
Jordan Liggitt 6fd36792f1
Add NodeRestriction admission plugin 2017-05-18 16:43:42 -04:00
Matt Liggett 00e6de099e Log more verbose when DisruptionController doesn't start.
To help with debugging #45706
2017-05-18 13:19:06 -07:00
Fabiano Franz 3bb04c67cc More cli sanity verifications 2017-05-18 15:44:49 -03:00
Kubernetes Submit Queue d775ff4c3a Merge pull request #45982 from fabianofranz/more_sig_cli_owners
Automatic merge from submit-queue

More owners from SIG-CLI

Adds SIG-CLI as reviewers and approvers of `cmd/clicheck/` and adds me + @pwittrock as approvers in `hack/` (mostly for `test-cmd` and some `hack/verify*.sh` and `hack/update*.sh` scripts).

**Release note**:

```release-note
NONE
```
2017-05-18 10:17:22 -07:00
Kubernetes Submit Queue 2ff902b672 Merge pull request #45937 from smarterclayton/init_api
Automatic merge from submit-queue

Add initializers to ObjectMeta and a new filter on ListOptions

Will support admission extension by allowing controllers to interact with objects before they are visible to the rest of the API.

Part of https://github.com/kubernetes/community/blob/master/contributors/design-proposals/admission_control_extension.md
2017-05-18 10:17:15 -07:00
Kubernetes Submit Queue a1c2db2fec Merge pull request #45950 from shyamjvs/revert-proxier
Automatic merge from submit-queue

Make real proxier in hollow-proxy optional (default=true)

Ref https://github.com/kubernetes/kubernetes/pull/45622
This allows using real proxier for hollow proxy, but we use the fake one by default.

cc @kubernetes/sig-scalability-misc @wojtek-t @gmarek
2017-05-18 07:55:09 -07:00
Andy Goldstein 032e2f6652 kube-proxy: add --write-config flag
Add --write-config flag to kube-proxy to write the default configuration
values to the specified file location.
2017-05-18 10:34:22 -04:00
Clayton Coleman bdd4d34c7d
generated: api changes 2017-05-18 10:07:47 -04:00
Shyam Jeedigunta 804a4f558c Make usage of real proxier in hollow-proxy optional (default=true) 2017-05-18 14:30:12 +02:00
yupengzte b38be58a39 ineffectual assignment to baseCommand, delete it
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-05-18 15:56:07 +08:00
Nick Sardo 87a5edd2cd Initialize cloud providers with a K8s clientBuilder 2017-05-17 14:38:25 -07:00
Kubernetes Submit Queue 9a9a296556 Merge pull request #45889 from wojtek-t/kube_proxy_handlers
Automatic merge from submit-queue (batch tested with PRs 45953, 45889)

Add /metrics and profiling handlers to kube-proxy

Also expose "syncProxyRules latency" as a prometheus metrics.

Fix https://github.com/kubernetes/kubernetes/issues/45876
2017-05-17 13:56:47 -07:00
Fabiano Franz e4953081f7 More owners from SIG-CLI 2017-05-17 15:46:34 -03:00
Wojciech Tyczynski 45ed99c3a6 Add syncProxyRules prometheus metric 2017-05-17 19:26:58 +02:00
Wojciech Tyczynski e35b1c21a1 Expose /metrics and /debug/pprof from kube-proxy 2017-05-17 19:23:58 +02:00
Michael Taufen 2ee2ec5e21 Remove the deprecated --babysit-daemons kubelet flag 2017-05-17 09:08:57 -07:00
Kubernetes Submit Queue 6f4e0b66a7 Merge pull request #44685 from smarterclayton/serverside_get_api
Automatic merge from submit-queue (batch tested with PRs 44520, 45253, 45838, 44685, 45901)

API for server side tabular output

These are the APIs necessary to implement propsoal kubernetes/community#363

They consist of a new meta group (v1alpha1) that indicates these are alpha apis for the server as a whole, a new kind `TableList` which is a simple row + header arranged table capable of returning both object and columnar data, a `TableListOptions` for altering the behavior of the return, and `PartialObjectMetadata` which is an "interface" style API object which allows a client to ask any object for their metadata (without having to know how to parse the object or perform gymnastics).

Extracted from #40848

A few minor tweaks still required.
2017-05-16 21:28:00 -07:00
Chao Xu bd6a9604dc generated 2017-05-16 20:40:04 -07:00
Chao Xu 9288025c28 let client-gen understand vendor 2017-05-16 20:29:38 -07:00
Kubernetes Submit Queue 3f0ebbe884 Merge pull request #45247 from mbohlool/c3
Automatic merge from submit-queue (batch tested with PRs 45247, 45810, 45034, 45898, 45899)

Apiregistration v1alpha1→v1beta1

Promoting apiregistration api from v1alpha1 to v1beta1.

API Registration is responsible for registering an API `Group`/`Version` with
another kubernetes like API server. The `APIService` holds information
about the other API server in `APIServiceSpec` type as well as general
`TypeMeta` and `ObjectMeta`. The `APIServiceSpec` type have the main
configuration needed to do the aggregation. Any request coming for
specified `Group`/`Version` will be directed to the service defined by
`ServiceReference` (on port 443) after validating the target using provided
`CABundle` or skipping validation if development flag `InsecureSkipTLSVerify`
is set. `Priority` is controlling the order of this API group in the overall
discovery document.
The return status is a set of conditions for this aggregation. Currently
there is only one condition named "Available", if true, it means the
api/server requests will be redirected to specified API server.

```release-note
API Registration is now in beta.
```
2017-05-16 19:01:55 -07:00
Kubernetes Submit Queue 7f92d35f1c Merge pull request #45739 from timothysc/cm_lock
Automatic merge from submit-queue (batch tested with PRs 45374, 44537, 45739, 44474, 45888)

Allow kcm and scheduler to lock on ConfigMaps.

**What this PR does / why we need it**:
Plumbs through the ability to lock on ConfigMaps through the kcm and scheduler.  

**Which issue this PR fixes** 
Fixes: #44857
Addresses issues with: #45415

**Special notes for your reviewer**:

**Release note**:

```
Add leader-election-resource-lock support to kcm and scheduler to allow for locking on ConfigMaps as well as Endpoints(default) 
```
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews @jamiehannaford @bsalamat @mikedanese
2017-05-16 18:10:57 -07:00
Kubernetes Submit Queue ece4124e17 Merge pull request #45355 from p0lyn0mial/admission_options_spits_out_admission_control
Automatic merge from submit-queue (batch tested with PRs 45408, 45355, 45528)

Admission options spits out admission control

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

This PR adds ApplyTo method to AdmissionOptions struct. The method creates and initialises admission control to the server configuration.

**Release note**:

```
NONE
```
2017-05-16 09:11:54 -07:00
Kubernetes Submit Queue 560323ad9b Merge pull request #45389 from monopole/isolation1
Automatic merge from submit-queue (batch tested with PRs 45835, 45389)

Introduce visibility rules to kubernetes code.

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

Use rules to identify "bad" dependencies on kubectl code for later refactoring or removal, and prevent their reintroduction.

**Which issue this PR fixes**

First in a series of PRs to address kubernetes/community#598

**Release note**:
```release-note
NONE
```
2017-05-15 19:34:52 -07:00
Kubernetes Submit Queue e50ba62aa5 Merge pull request #45835 from ncdc/client-gen-more-groupName-override
Automatic merge from submit-queue (batch tested with PRs 45835, 45389)

client-gen: honor groupName overrides in customArgs

If there is a comment of the form "// +groupName=somegroup" or
"// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as
the name of the group in customArgs.GroupVersions and
customArgs.GroupVersionToInputPath.

@deads2k this lets OpenShift generate the correct group names for pkg/deploy (groupName=apps) and pkg/sdn (groupName=network), although we still need your hack to specify `--group`.

cc @smarterclayton @liggitt @sttts @kubernetes/sig-api-machinery-pr-reviews
2017-05-15 19:34:49 -07:00
Kubernetes Submit Queue 521d7d1ac5 Merge pull request #42472 from timchenxiaoyu/requesttypo
Automatic merge from submit-queue

fix request typo
2017-05-15 15:57:57 -07:00
mbohlool e2f20a3539 Promote apiregistration from v1alpha1 to v1beta1 2017-05-15 15:34:33 -07:00
Kubernetes Submit Queue 682f3a39a0 Merge pull request #45171 from ncdc/groupName-override
Automatic merge from submit-queue

Use groupName comment for listers/informers

If present, use the "// +groupName" doc comment as the desired group
name when generating listers and informers.

@kubernetes/sig-api-machinery-pr-reviews @smarterclayton @deads2k @liggitt @sttts
2017-05-15 14:14:21 -07:00
Andy Goldstein 84da322766 client-gen: honor groupName overrides in customArgs
If there is a comment of the form "// +groupName=somegroup" or
"// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as
the name of the group in customArgs.GroupVersions and
customArgs.GroupVersionToInputPath.
2017-05-15 16:52:09 -04:00
Jeffrey Regan 7abff879d7 Introduce visibility rules to kubernetes code.
**What this PR does / why we need it**:

Visibility rules allow dependency control.  The rules currently in
place make all targets public, to override the default state of
private.  This PR removes public visibility from kubectl code.  It
uses specially named pacakge groups to identify "bad" dependencies on
kubectl code for later refactoring or removal.

**Which issue this PR fixes**

First in a series of PRs to address kubernetes/community#598

**Release note**:
```release-note
NONE
```
2017-05-15 12:50:56 -07:00
Kubernetes Submit Queue c924414b1f Merge pull request #45548 from justinsb/fix_typo_ss_controller
Automatic merge from submit-queue (batch tested with PRs 45826, 45747, 45548, 45606, 41766)

Fix typo in name of ss controller
2017-05-15 11:39:24 -07:00
Timothy St. Clair 1173c84ad9 Update to plumb through configurable locking on different resource types. 2017-05-15 10:01:46 -05:00
Clayton Coleman c299a8049c
Add Table to meta.k8s.io/v1alpha1
Table is a generic tabular output that can be returned by servers to
enable clients to display data simply.
2017-05-15 10:50:49 -04:00
Jamie Hannaford a2248a2bcd Add lock type flags for controller-manager leadership election 2017-05-15 08:42:15 -05:00
p0lyn0mial 8cea69aa98 This PR implements AdmissionOptions.ApplyTo
ApplyTo adds the admission chain to the server configuration the method lazily initializes a generic plugin
that is appended to the list of pluginInitializers.

apiserver.Config will hold an instance of SharedInformerFactory to ensure we only have once instance.
The field will be initialized in apisever.SecureServingOptions
2017-05-14 10:30:19 +02:00
Kubernetes Submit Queue abaffb243e Merge pull request #45692 from caesarxuchao/limit-client-go-package-import-2
Automatic merge from submit-queue (batch tested with PRs 44748, 45692)

Limiting client go packages visibility, round 3

Continue the work in the merged PR https://github.com/kubernetes/kubernetes/pull/45258

These packages in client-go will be gone after #44065 is fixed:
pkg/api/helper, pkg/api/util, internal version of api groups, API install packages. 

This PR removes the dependency on these packages and add bazel visibility rules to prevent relapse.
2017-05-12 16:04:37 -07:00
Michael Taufen 93f392251c Mark kubelet's master-service-namespace flag deprecated
This flag is already deprecated in the API server:
- https://kubernetes.io/docs/admin/kube-apiserver/
- https://kubernetes.io/docs/admin/federation-apiserver/
2017-05-12 06:37:48 -07:00
Kubernetes Submit Queue 3b9a90ae79 Merge pull request #45684 from bowei/kube-dns-update
Automatic merge from submit-queue

Update kube-dns version to 1.14.2

```release-note
Updates kube-dns to 1.14.2

- Support kube-master-url flag without kubeconfig
- Fix concurrent R/Ws in dns.go
- Fix confusing logging when initialize server
- Fix printf in cmd/kube-dns/app/server.go
- Fix version on startup and --version flag
- Support specifying port number for nameserver in stubDomains
```
2017-05-12 03:13:38 -07:00
Kubernetes Submit Queue a126f40c58 Merge pull request #45622 from shyamjvs/mock-proxy
Automatic merge from submit-queue (batch tested with PRs 45571, 45657, 45638, 45663, 45622)

Use real proxier inside hollow-proxy but with mocked syscalls

Fixes https://github.com/kubernetes/kubernetes/issues/43701

This should make hollow-proxy better mimic the real kube-proxy in performance.
Maybe next we should have a more realistic implementation even for fake iptables (adding/updating/deleting rules/chains in an table, just not on the real one)? Though I'm not sure how important it is.

cc @kubernetes/sig-scalability-misc @kubernetes/sig-network-misc @wojtek-t @gmarek
2017-05-12 02:28:43 -07:00
jianglingxia 2d9b71d122 modify the initialization statement 2017-05-12 10:55:14 +08:00
Hemant Kumar 9a1a9cbe08 detach the volume when pod is terminated
Make sure volume is detached when pod is terminated because
of any reason and not deleted from api server.
2017-05-11 22:18:22 -04:00
Chao Xu 14045d253d hack/update-bazel.sh 2017-05-11 15:59:04 -07:00
Chao Xu c354076aa4 remove invocation of k8s.io/client-go/pkg/api/install
change import of client-go/api/helper to kubernetes/api/helper

remove unnecessary use of client-go/api.registry

change use of client-go/pkg/util to kubernetes/pkg/util

remove dependency on client-go/pkg/apis/extensions

remove unnecessary invocation of k8s.io/client-go/extension/intsall

change use of k8s.io/client-go/pkg/apis/authentication to v1
2017-05-11 15:03:46 -07:00
Bowei Du 1c223c8e1b Update kube-dns version to 1.14.2
Changes:

- Support kube-master-url flag without kubeconfig
- Fix concurrent R/Ws in dns.go
- Fix confusing logging when initialize server
- Fix printf in cmd/kube-dns/app/server.go
- Fix version on startup and --version flag
- Support specifying port number for nameserver in stubDomains
2017-05-11 12:29:00 -07:00
deads2k be39283923 plumb stopch to post start hook index since many of them are starting go funcs 2017-05-11 09:16:13 -04:00
Kubernetes Submit Queue 640373da10 Merge pull request #45641 from xilabao/update-token-ttl-description
Automatic merge from submit-queue (batch tested with PRs 44626, 45641)

update token ttl description
2017-05-11 03:59:38 -07:00
xilabao 7f5e8fdedd update token ttl description 2017-05-11 15:23:57 +08:00
Zihong Zheng 868edcb231 hyperkube_test should not depends on number of spaces. 2017-05-10 22:18:51 -07:00
Kubernetes Submit Queue 1f3b158a10 Merge pull request #45194 from yujuhong/rm-cri-flag
Automatic merge from submit-queue

Remove the deprecated `--enable-cri` flag

Except for rkt, CRI is the default and only integration point for
container runtimes.

```release-note
Remove the deprecated `--enable-cri` flag. CRI is now the default, 
and the only way to integrate with kubelet for the container runtimes.
```
2017-05-10 20:46:24 -07:00
Kubernetes Submit Queue a48cfe9fe5 Merge pull request #45384 from caesarxuchao/copy-metrics-interanl
Automatic merge from submit-queue (batch tested with PRs 45382, 45384, 44781, 45333, 45543)

Copy internal types to metrics

Supersedes #45306. 

#45306 removed the internal types and suggested whoever needs the internal types should define their own copy, and use the code-gen tools to generated the conversion functions. Per offline discussion with @DirectXMan12, we wanted to go that direction but it's not clear where to put the internal types yet. Hence, as a temporary solution, we decided copy the referred client-go/pkg/api types into metrics api to avoid the dependency.

The commit "remove need of registry from custom_metrics/client.go" is similar to what I did to the fake client in an earlier PR. Let me know if you want to put the commit in another PR.
2017-05-10 17:47:41 -07:00
Shyam Jeedigunta 27fa52390b Use real proxier inside hollow-proxy but with mocked syscalls 2017-05-10 23:45:26 +02:00
Yu-Ju Hong daa329c9ae Remove the deprecated `--enable-cri` flag
Except for rkt, CRI is the default and only integration point for
container runtimes.
2017-05-10 13:03:41 -07:00
Kubernetes Submit Queue bfa18037ce Merge pull request #45404 from wojtek-t/edge_based_winuserspace_proxy
Automatic merge from submit-queue

Edge based winuserspace proxy

Last PR in the series of making kube-proxy event-based.

This is a sibling PR to https://github.com/kubernetes/kubernetes/pull/45356 that is already merged.
The second commit is removing the code that is no longer used.
2017-05-10 12:51:43 -07:00
Kubernetes Submit Queue 77b2e6302c Merge pull request #45236 from verb/sharedpid-2-default
Automatic merge from submit-queue

Enable shared PID namespace by default for docker pods

**What this PR does / why we need it**: This PR enables PID namespace sharing for docker pods by default, bringing the behavior of docker in line with the other CRI runtimes when used with docker >= 1.13.1.

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

**Special notes for your reviewer**: cc @dchen1107 @yujuhong 

**Release note**:

```release-note
Kubernetes now shares a single PID namespace among all containers in a pod when running with docker >= 1.13.1. This means processes can now signal processes in other containers in a pod, but it also means that the `kubectl exec {pod} kill 1` pattern will cause the pod to be restarted rather than a single container.
```
2017-05-10 12:06:01 -07:00
Solly Ross 1cbc825fb9 [client-gen] Support Read-Only APIs
This commit adds support for read-only APIs to client-gen.
If the tag `// +readonly=true` is used, only the {Get,List,Watch}
client methods will be generated.
2017-05-10 13:33:18 -04:00
Solly Ross 392b8da1d0 [client-gen] Allow overriding the resource name
This commit allows client-gen to generate clients where the resource
name does not directly correspond to the type name.

The tag `// +resourceName=<name>` can be used to override the resource
name.
2017-05-10 13:33:17 -04:00
Wojciech Tyczynski ce752e3fc9 Remove no-longer used code in proxy/config 2017-05-10 12:16:35 +02:00
Wojciech Tyczynski 57d35d5acb Switch winuserspace proxy to be event based for services 2017-05-10 12:14:37 +02:00
Chao Xu a5fd6b91e7 generated 2017-05-09 21:28:39 -07:00
Kubernetes Submit Queue 51a3413371 Merge pull request #45307 from yujuhong/mv-docker-client
Automatic merge from submit-queue (batch tested with PRs 45453, 45307, 44987)

Migrate the docker client code from dockertools to dockershim

Move docker client code from dockertools to dockershim/libdocker. This includes
DockerInterface (renamed to Interface), FakeDockerClient, etc.

This is part of #43234
2017-05-09 20:23:44 -07:00
Kubernetes Submit Queue 61593ba8b8 Merge pull request #45453 from k82cn/k8s_45220
Automatic merge from submit-queue (batch tested with PRs 45453, 45307, 44987)

Init cache with assigned non-terminated pods before scheduling

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

**Release note**:

```release-note
The fix makes scheduling go routine waiting for cache (e.g. Pod) to be synced.
```
2017-05-09 20:23:37 -07:00
Chao Xu b5a41e770a remove unnecessary call to metrics install package
remove init and reference to client-go/api from metrcis install package
2017-05-09 18:05:22 -07:00
Kubernetes Submit Queue f8f9d7db93 Merge pull request #45304 from deads2k/controller-03-ns-discovery
Automatic merge from submit-queue (batch tested with PRs 45304, 45006, 45527)

increase the QPS for namespace controller

The namespace controller is really chatty. Especially to discovery since that involves two requests for every API version available. This bumps the QPS and burst on the namespace controller to avoid being stuck waiting.
2017-05-09 12:04:41 -07:00
Klaus Ma c78faec4ff Initialize scheduler cache with assigned non-terminated pods before scheduling. 2017-05-10 01:50:38 +08:00
Justin Santa Barbara a88a0abbdb Fix typo in name of ss controller
Typo, but I presume also we're intending to allow control of individual
controllers, so the name does matter.
2017-05-09 11:31:06 -04:00
Kubernetes Submit Queue a062782524 Merge pull request #44258 from wlan0/master
Automatic merge from submit-queue (batch tested with PRs 45508, 44258, 44126, 45441, 45320)

cloud initialize node in external cloud controller

@thockin This PR adds support in the `cloud-controller-manager` to initialize nodes (instead of kubelet, which did it previously)

This also adds support in the kubelet to skip node cloud initialization when `--cloud-provider=external`

Specifically,

Kubelet

1. The kubelet has a new flag called `--provider-id` which uniquely identifies a node in an external DB
2. The kubelet sets a node taint - called "ExternalCloudProvider=true:NoSchedule" if cloudprovider == "external"

Cloud-Controller-Manager

1. The cloud-controller-manager listens on "AddNode" events, and then processes nodes that starts with that above taint. It performs the cloud node initialization steps that were previously being done by the kubelet.
2. On addition of node, it figures out the zone, region, instance-type, removes the above taint and updates the node.
3. Then periodically queries the cloudprovider for node addresses (which was previously done by the kubelet) and updates the node if there are new addresses

```release-note
NONE  
```
2017-05-08 16:34:43 -07:00
Kubernetes Submit Queue 332b095ca9 Merge pull request #44968 from MrHohn/kube-proxy-healthcheck
Automatic merge from submit-queue (batch tested with PRs 44727, 45409, 44968, 45122, 45493)

Separate healthz server from metrics server in kube-proxy

From #14661, proposal is on kubernetes/community#552.

Couple bullet points as in commit:
- /healthz will be served on 0.0.0.0:10256 by default.
- /metrics and /proxyMode will be served on port 10249 as before.
- Healthz handler will verify timestamp in iptables mode.

/assign @nicksardo @bowei @thockin 

**Release note**:

```release-note
NONE
```
2017-05-08 14:54:38 -07:00
deads2k b7161a02b2 expose controller initializers 2017-05-08 14:34:18 -04:00
deads2k 4389f71576 refactor names for the apiserver handling chain 2017-05-08 07:55:31 -04:00
Sidhartha Mani 8666eaac53 bug fix #45156. Make cloud-provider flag mandatory 2017-05-05 16:51:49 -07:00
wlan0 45d2bc06b7 cloud initialize node in external cloud controller 2017-05-05 16:51:45 -07:00
Kubernetes Submit Queue 17d33ea82e Merge pull request #44830 from NickrenREN/remove-NodeLegacyHostIP
Automatic merge from submit-queue

Remove deprecated NodeLegacyHostIP

**Release note**:
```release-note
Remove deprecated node address type `NodeLegacyHostIP`.
```

ref #44807
2017-05-05 15:38:58 -07:00
Zihong Zheng e5db5dc3a1 Autogenerated files 2017-05-05 14:44:38 -07:00
Zihong Zheng ca59d909cf Separate healthz server from metrics server in kube-proxy
- /healthz will be served on 0.0.0.0:10256 by default.
- /metrics and /proxyMode will be served on port 10249
  as before.
- Healthz handler will verify timestamp in iptables mode.
2017-05-05 14:43:44 -07:00
Yu-Ju Hong cf3635c876 Update bazel BUID files 2017-05-05 11:48:08 -07:00
Yu-Ju Hong 389c140eaf Move docker client code from dockertools to dockershim/dockerlib
The code affected include DockerInterface (renamed to Interface),
FakeDockerClient, etc.
2017-05-05 11:48:08 -07:00
Wojciech Tyczynski 33a7a288a5 Switch userspace proxy to be event based for services 2017-05-05 09:35:38 +02:00
Kubernetes Submit Queue 78e08cf72d Merge pull request #45369 from dmmcquay/kubeadm_remove_etcd3_default
Automatic merge from submit-queue (batch tested with PRs 45364, 45369, 45323)

kubeadm: edit apiserver flags for storage-backend

**What this PR does / why we need it**: Since storage-backend defaults to etcd3 in 1.6 (see https://github.com/kubernetes/kubernetes/pull/36229), no need to have a flag defining the default.

**Special notes for your reviewer**: /cc @luxas 

**Release note**:
```release-note
NONE
```
2017-05-04 16:47:36 -07:00
Kubernetes Submit Queue 5a9759b0b4 Merge pull request #45376 from luxas/kubeadm_fix_taints
Automatic merge from submit-queue (batch tested with PRs 45309, 45376)

kubeadm: Fix the tainting of the master node

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

Currently, kubeadm unintentionally removes Taints set with the kubelet flag `--register-with-taints` when creating a new Taint slice instead of appening the existing one. This PR fixes that behavior.

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

This should be a cherrypick candidate for v1.6 cc @enisoc 

**Release note**:

```release-note
kubeadm: Fix invalid assign statement so it is possible to register the master kubelet with other initial Taints
```
@jbeda @dmmcquay @mikedanese @krousey PTAL, very straightforward PR
2017-05-04 15:54:39 -07:00
Kubernetes Submit Queue d23c73687a Merge pull request #45238 from deads2k/auth-04-expose-kubelet
Automatic merge from submit-queue (batch tested with PRs 45362, 45159, 45321, 45238)

expose kubelet authentication and authorization builders

The kubelet authentication and authorization builder methods are useful for consumers.

@liggitt
2017-05-04 13:25:06 -07:00
Lucas Käldström 6065824958
kubeadm: Fix the tainting of the master node 2017-05-04 22:34:44 +03:00
deads2k 0022223d8b expose kubelet authentication and authorization builders 2017-05-04 14:35:24 -04:00
Chao Xu 5f5a70f65f generated clientset changes
propagate to client-go
update-bazel.sh
2017-05-04 11:30:51 -07:00
Chao Xu bbb94e42c1 remove registry from testing/fixture.go; update client-gen to not use
registry in the generated clients
2017-05-04 11:30:51 -07:00
Derek McQuay 2c05234674
kubeadm: edit apiserver flags for storage-backend
Since storage-backend defaults to etcd3 in 1.6, no need to have a flag
defining the default.
2017-05-04 11:06:23 -07:00
Kubernetes Submit Queue 82bc084297 Merge pull request #45169 from ncdc/lister-gen-typo
Automatic merge from submit-queue

Fix typo in lister-gen, regenerate

NamespaeLister -> NamespaceLister

@stevekuznetsov, just for you 😄
2017-05-04 07:24:01 -07:00
Kubernetes Submit Queue f6ec7bade1 Merge pull request #45316 from yujuhong/dockershim-plugin-settings
Automatic merge from submit-queue (batch tested with PRs 45316, 45341)

Pass NoOpLegacyHost to dockershim in --experimental-dockershim mode

This allows dockershim to use network plugins, if needed.

/cc @Random-Liu
2017-05-04 05:19:49 -07:00
Kubernetes Submit Queue 10704b2ae1 Merge pull request #44919 from kinvolk/robertgzr/kubeproxy-check-conntrack-before-write
Automatic merge from submit-queue

[WIP] Skip resize of nf_conntrack/parameters/hashsize if not necessary

**What this PR does / why we need it**:
Linux does not support writing to `/sys/module/nf_conntrack/parameters/hashsize` when the writer process is not in the initial network namespace
(https://github.com/torvalds/linux/blob/v4.10/net/netfilter/nf_conntrack_core.c#L1795-L1796).

Usually that's fine. But in some configurations such as with https://github.com/kinvolk/kubeadm-nspawn, kube-proxy is in another netns.

Therefore, check if writing in hashsize is necessary and skip the writing if not.

**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
```
2017-05-03 23:25:31 -07:00
Yu-Ju Hong 40b0474956 pass noopnetworkhost to dockershim 2017-05-03 16:32:01 -07:00
deads2k 575c6d7ad8 increase the QPS for namespace controller 2017-05-03 15:25:13 -04:00
Lee Verberne b668371a63 Enable shared PID namespace by default for docker 2017-05-03 17:12:08 +00:00
Kubernetes Submit Queue 0a87487bda Merge pull request #38161 from chentao1596/correct-description-kubelet-get-pod-from-path
Automatic merge from submit-queue

kubelet/get-pods-from-path: correct description of implemention

**What this PR does / why we need it**:
    I find this description does not follow the current implementation, it should be describe like this according to my understanding of the source code.
2017-05-02 22:24:51 -07:00
Kubernetes Submit Queue 2a87baba6c Merge pull request #45199 from yujuhong/clean-up-dockertools
Automatic merge from submit-queue

Clean up code in dockertools

Move functions and sub packages to dockershim.
Part of #43234.
2017-05-02 20:55:59 -07:00
Christopher M. Luciano bafabcbb44
Consolidate sysctl commands for kubelet
These commands are important enough to be in the Kubelet itself.
By default, Ubuntu 14.04 and Debian Jessie have these set to 200 and
20000. Without this setting, nodes are limited in the number of
containers that they can start.
2017-05-02 12:15:01 -07:00
Kubernetes Submit Queue 8705dbaa82 Merge pull request #45231 from dmmcquay/kubeadm_test_cmds_preflight_skip
Automatic merge from submit-queue (batch tested with PRs 45227, 43003, 45231)

kubeadm: move preflight kubelet check

**What this PR does / why we need it**: If you passed the `--skip-preflight-checks` to kubeadm, it would still try to start up the kubelet, which is part of preflight checks. This was causing issues for test-cmds. Now, passing `--skip-preflight-checks` will skip over the kubelet check. 

**Special notes for your reviewer**: /cc @luxas @deads2k 

**Release note**:
```release-note
NONE
```
2017-05-02 11:24:55 -07:00
Kubernetes Submit Queue b976481fc1 Merge pull request #42331 from k82cn/rm_dup_default
Automatic merge from submit-queue

Removed duplicated 'default' in kubelet's help message

```release-note
None
```
2017-05-02 09:39:32 -07:00
Derek McQuay 6b2df1cf01
kubeadm: move preflight kubelet check 2017-05-02 08:26:42 -07:00
Yu-Ju Hong 93ecaf6812 Move exec.go from dockertools to dockershim 2017-05-01 16:00:46 -07:00
Andy Goldstein 43cb024402 Add kube-proxy config file support
Add support for configuring kube-proxy via a config file instead of
command line flags.
2017-05-01 18:02:47 -04:00
Andy Goldstein 11e4f149d9 Fix typo in lister-gen, regenerate
NamespaeLister -> NamespaceLister
2017-05-01 12:18:45 -04:00
Andy Goldstein a5761d8074 Use groupName comment for listers/informers
If present, use the "// +groupName" doc comment as the desired group
name when generating listers and informers.
2017-05-01 11:58:26 -04:00
Klaus Ma e0d67c9913 Removed duplicated 'default' in kubelet's help message. 2017-04-30 04:18:09 -04:00
Kubernetes Submit Queue 55f802b72a Merge pull request #44196 from xiangpengzhao/cmd-cleanup
Automatic merge from submit-queue

Delete "hard-coded" default value in flags usage.

**What this PR does / why we need it**:
Some flags of kubernetes components have "hard-coded" default values in their usage info. In fact, [pflag pkg](https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/spf13/pflag/flag.go#L602-L608) has already added a string `(default value)` automatically in the usage info if the flag is initialized. Then we don't need to hard-code the default value in usage info. After this PR, if we want to update the default value of a flag, we only need to update the flag where it is initialized. `pflag` will update the usage info for us. This will avoid inconsistency.

For example:
Before
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: 10s (default 10s)
...
```

After
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. (default 10s)
...
```

**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**:
This PR doesn't delete some "hard-coded" default values because they are not explicitly initialized. We still need to hard-code them to give users friendly info.

```
--allow-privileged                                        If true, allow containers to request privileged mode. [default=false]
```

**Release note**:

```release-note
None
```
2017-04-28 21:28:09 -07:00
Kubernetes Submit Queue e2042bb81b Merge pull request #41583 from verb/sharedpid
Automatic merge from submit-queue (batch tested with PRs 41583, 45117, 45123)

Implement shared PID namespace in the dockershim

**What this PR does / why we need it**: Defaults the Docker CRI to using a shared PID namespace for pods. Implements proposal in https://github.com/kubernetes/community/pull/207 tracked by #1615.

//cc @dchen1107 @vishh @timstclair 

**Special notes for your reviewer**: none

**Release note**:
```release-note
Some container runtimes share a process (PID) namespace for all containers in a pod. This will become the default for Docker in a future release of Kubernetes. You can preview this functionality if running with the CRI and Docker 1.13.1 by enabling the --experimental-docker-enable-shared-pid kubelet flag.
```
2017-04-28 20:15:03 -07:00
Kubernetes Submit Queue ce01882e32 Merge pull request #43301 from deads2k/agg-27-add-conditions
Automatic merge from submit-queue (batch tested with PRs 44044, 44766, 44930, 45109, 43301)

add APIService conditions

Adds conditions to the APIServiceStatus struct and fixes up generators that appear to have slipped.

The first condition is "ServiceAvailable" which will provide the status currently derived in the discovery handler that decides about whether to expose the version in discovery.

@kubernetes/sig-api-machinery-pr-reviews @liggitt @ncdc
2017-04-28 17:49:13 -07:00
Kubernetes Submit Queue 228219b0ce Merge pull request #44628 from dmmcquay/kubeadm_join_tests
Automatic merge from submit-queue (batch tested with PRs 42432, 44628, 45101, 44921)

kubeadm: join test cmds for new flags

**What this PR does / why we need it**: Adding test-cmds for new kubeadm join flags. 

Adding tests is a WIP from #34136

This is a continuation from https://github.com/kubernetes/kubernetes/pull/42812 since it had to be closed.

**Special notes for your reviewer**: /cc @luxas 

**Release note**:
```release-note
NONE
```
2017-04-28 08:41:36 -07:00
deads2k b5f0e3d07e add APIService status conditions 2017-04-28 10:47:29 -04:00
Kubernetes Submit Queue b2d714a7ca Merge pull request #44888 from caesarxuchao/clean-deepcopy-init
Automatic merge from submit-queue

Prepare for move zz_generated_deepcopy.go to k8s.io/api

This is in preparation to move deep copies to with the types to the types repo (see https://github.com/kubernetes/gengo/pull/47#issuecomment-296855818). The init() function is referring the `SchemeBuilder` defined in the register.go in the same packge, so we need to revert the dependency.

This PR depends on https://github.com/kubernetes/gengo/pull/49, otherwise verification will fail.
2017-04-27 18:48:28 -07:00
Kubernetes Submit Queue 8efb5c9957 Merge pull request #44983 from caesarxuchao/easy-remove-client-go-api-scheme
Automatic merge from submit-queue (batch tested with PRs 45052, 44983, 41254)

Non-controversial part of #44523

For easier review of #44523, i extracted the non-controversial part out to this PR.
2017-04-27 17:14:04 -07:00
Chao Xu d0b94538b9 make it possible to move SchemeBuilder with zz_generated.deepcopy.go 2017-04-27 16:57:29 -07:00
Lee Verberne d22dd0fa35 Implement shared PID namespace in the dockershim 2017-04-27 23:43:53 +00:00
Kubernetes Submit Queue 14a557b1a2 Merge pull request #44346 from mikedanese/build-static
Automatic merge from submit-queue (batch tested with PRs 41106, 44346, 44929, 44979, 45027)

bazel: statically link dockerized components
2017-04-27 12:11:00 -07:00
Chao Xu 958903509c bazel 2017-04-27 09:41:53 -07:00
Chao Xu 3fa7b7824a easy changes 2017-04-27 09:41:53 -07:00
Kubernetes Submit Queue c446132a97 Merge pull request #44974 from caesarxuchao/remove-client-go-api-listers
Automatic merge from submit-queue (batch tested with PRs 44940, 44974, 44935)

Remove import of internal api package in generated external-versioned listers

Follow up of https://github.com/kubernetes/kubernetes/pull/44523

One line change in cmd/libs/go2idl/lister-gen/generators/lister.go, and simple changes in pkg/apis/autoscaling/v2alpha1/register.go, other changes are generated.

The internal api package will be eliminated from client-go, so these imports should be removed. Also, it's more correct to report the versioned resource in the error.
2017-04-26 20:34:13 -07:00
Chao Xu 0bac9b6aaa update list-gen to not import internal package in external listers 2017-04-26 14:41:09 -07:00
Kubernetes Submit Queue 508041e9d8 Merge pull request #44731 from dmmcquay/kubeadm_manifest_cfg_usage
Automatic merge from submit-queue

kubeadm: remove func arg that isn't being used

**What this PR does / why we need it**: Functions had args passed to them that weren't being used. See https://github.com/kubernetes/kubernetes/pull/44601 for more details. 

**Special notes for your reviewer**: @luxas

**Release note**:
```release-note
NONE
```
2017-04-26 04:05:44 -07:00
Kubernetes Submit Queue eb0bc857bd Merge pull request #43850 from xilabao/add-output-to-kubeadm-version
Automatic merge from submit-queue

add --output flag to `kubeadm version`

ref to kubectl https://github.com/kubernetes/kubernetes/pull/39858
2017-04-26 03:16:51 -07:00
xilabao 3719840e0d add output flag to kubeadm version 2017-04-26 16:45:55 +08:00
Kubernetes Submit Queue 708d30a8d1 Merge pull request #44444 from fabriziopandini/kubeadm-certs-1
Automatic merge from submit-queue

Add --apiserver-advertise-address option to kubeadm alpha phase certs…

**What this PR does / why we need it**:
`kubeadm alpha phase certs` command currently does not support `--apiserver-advertise-address` options, and certificates by default are linked to the bind address of the machine where the kubeadm command is run. This behaviour is not adequate f.i. for use cases where you are using `kubeadm alpha phase certs` for an HA deployments or for use cases where you generate certificates on a machine different that the master.

The PR adds support for `--apiserver-advertise-address` to `kubeadm alpha phase certs`, with the following behaviour:
- if `--apiserver-advertise-address` is specified and valid, certificates are linked to the given IP
- if `--apiserver-advertise-address` is specified but not valid, the given ip is not valid an error is given

**Special notes for your reviewer**:
Implementation follow the track already in place for other flags (with validation, but no tests).
2017-04-25 16:11:50 -07:00
Kubernetes Submit Queue fb72285a78 Merge pull request #44753 from xilabao/fix-config-path-broken
Automatic merge from submit-queue (batch tested with PRs 44583, 44139, 44753)

fix config path broken in kubeadm

fixes https://github.com/kubernetes/kubeadm/issues/234
2017-04-25 13:52:39 -07:00
Kubernetes Submit Queue 896d2afb42 Merge pull request #44588 from dmmcquay/kubeadm_skip_token_print
Automatic merge from submit-queue (batch tested with PRs 44601, 44842, 44893, 44491, 44588)

kubeadm: add flag to skip token print out

**What this PR does / why we need it**: When kubeadm init is used in an automated context, it still prints the token to standard out. When standard output ends up in a log file, it can be considered that the token is leaked there and can be compromised. This PR adds a flag you can select to not have it print out and explicitly disable this behavior.

This is a continuation from https://github.com/kubernetes/kubernetes/pull/42823 since it had to be closed.

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

**Special notes for your reviewer**: /cc @luxas @errordeveloper 

**Release note**:
```release-note
NONE
```
2017-04-25 12:51:41 -07:00
Kubernetes Submit Queue 40db1d1986 Merge pull request #44601 from xilabao/fix-certdir-in-kubeadm
Automatic merge from submit-queue

fix kubeadm init when certdir changed

If --cert-dir specified, `kubeadm init`  failed.
2017-04-25 11:58:12 -07:00
Robert Günzler b397e16669 Skip resize of nf_conntrack/parameters/hashsize if not necessary 2017-04-25 16:08:30 +02:00
Jan Safranek 9d0c47f1db Use storage.v1 instead of v1beta1
storage.v1beta1 was used to work around GKE which does not expose v1. Now that
GKE is updated, we can switch everything to v1.
2017-04-25 10:13:38 +02:00
Kubernetes Submit Queue 099e7a5f0a Merge pull request #44162 from liggitt/tls-flag-help
Automatic merge from submit-queue (batch tested with PRs 40060, 44860, 44865, 44825, 44162)

Clarify kubelet cert flag usage
2017-04-24 23:07:45 -07:00
Kubernetes Submit Queue 6c8cb33fb3 Merge pull request #42101 from Dmitry1987/feature/hpa-upscale-downscale-delay-configurable
Automatic merge from submit-queue (batch tested with PRs 44862, 42241, 42101, 43181, 44147)

Feature/hpa upscale downscale delay configurable

**What this PR does / why we need it**:
Makes "upscale forbidden window" and "downscale forbidden window"  duration configurable in arguments of kube-controller-manager. Those are options of horizontal pod autoscaler.

**Special notes for your reviewer**:
Please have a look @DirectXMan12 , the PR as discussed in Slack.

**Release note**:
```
Make "upscale forbidden window" and "downscale forbidden window"  duration configurable in arguments of kube-controller-manager. Those are options of horizontal pod autoscaler. Right now are hardcoded 3 minutes for upscale, and 5 minutes to downscale.  But sometimes cluster administrator might want to change this for his own needs.
```
2017-04-24 19:39:42 -07:00
NickrenREN 7d00e5cfb6 remove deprecated NodeLegacyHostIP 2017-04-24 11:01:25 +08:00
Kubernetes Submit Queue 20dd848e7c Merge pull request #44204 from FengyunPan/optimize-code
Automatic merge from submit-queue

Optimize getProxyMode() to get proxy mode

1. getProxyMode() does not need nodeGetter args after remove
   proxy-mode annotation.
2. we should get error when the version of iptables less than
   MinVersion.
2017-04-21 18:11:07 -07:00
Kubernetes Submit Queue 072c127b47 Merge pull request #44627 from dmmcquay/kubeadm_add_validation_error_code
Automatic merge from submit-queue

kubeadm: add api validation exit code

**What this PR does / why we need it**: This will help with automation and provide more meaningful exit code for api validation. 

WIP to add more meaningful exit codes https://github.com/kubernetes/kubeadm/issues/61

This is a continuation from https://github.com/kubernetes/kubernetes/pull/42825 since it had to be closed.

**Special notes for your reviewer**: /cc @luxas 

**Release note**:
```release-note
NONE
```
2017-04-21 15:39:56 -07:00
Kubernetes Submit Queue ee86c18d92 Merge pull request #44623 from p0lyn0mial/split_out_admission_options
Automatic merge from submit-queue (batch tested with PRs 42202, 40784, 44642, 44623, 44761)

Split out AdmissionOptions

**What this PR does / why we need it**: The changes in this PR split out AdmissionOptions from ServerRunOptions. In the long term AdmissionOptions will accepts various dependencies
and spit out AdmissionControl

**Release note**:

NONE
2017-04-21 11:52:09 -07:00
chentao1596 785cad9580 change the description of getting pod from file 2017-04-21 15:35:31 +08:00
xilabao 4ec40e3789 fix config path broken in kubeadm 2017-04-21 14:18:43 +08:00
derek mcquay d047dfbc6f kubeadm: add flag to skip token print out 2017-04-20 13:12:37 -07:00
derek mcquay 60efc38ef3 kubeadm: remove func arg that isn't being used 2017-04-20 09:47:17 -07:00
xilabao c1197924cd fix kubeadm init when certdir changed 2017-04-20 15:23:45 +08:00
Daniel Nardo 2320fde49c Update kubelet to use the network-plugin-dir if the cni-bin-dir flag
is not set.
2017-04-19 16:33:06 -07:00
Kubernetes Submit Queue 505ec43dab Merge pull request #44499 from wojtek-t/edge_based_services_in_proxy
Automatic merge from submit-queue

Edge based services in proxy

This is sibling effort to what I did for endpoints in KubeProxy.
This PR is first one (changing config & iptables) - userspace will follow.
2017-04-19 09:43:04 -07:00
Paulo Pires 6c5e1eae2d
kubeadm: remove maintainer @pires.
Signed-off-by: Paulo Pires <pjpires@gmail.com>
2017-04-18 12:11:08 -07:00
Derek McQuay 6aa2c396e2 kubeadm: add api validation exit code 2017-04-18 11:41:53 -07:00
Derek McQuay 9daa13af3e kubeadm: kubeadm join test cmds for new flags 2017-04-18 11:35:24 -07:00
p0lyn0mial de9706bc15 Split out AdmissionOptions
In the long term AdmissionOptions will accepts various dependencies
and spit out AdmissionControl
2017-04-18 19:48:14 +02:00
Andy Goldstein 54b6edc400 go-to-protobuf: actually skip - packages
If a package is prefixed with -, we are not supposed to be generating
protobuf for it. Make that actually happen :-)
2017-04-18 12:35:16 -04:00
Kubernetes Submit Queue 4e17230345 Merge pull request #42246 from jamiehannaford/add-etcd-flags-kubeadm
Automatic merge from submit-queue

Allow configurable etcd options

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

Allows users to set the `--listen-client-urls` and `--advertise-client-urls` flags on etcd binaries for clusters set up with kubeadm.

**Which issue this PR fixes**:

As far as I can tell right now, other nodes in a cluster set up with kubeadm cannot communicate with the etcd static pod running on the master. This is needed in order to set up calico/canal SDN which needs access to a publicly addressable IPv4 _before_ the overlay network and inter-cluster subnet is created.

Addresses https://github.com/kubernetes/features/issues/138 and https://github.com/kubernetes/features/issues/11.

**Release note**:
```release-note
Users can now specify listen and advertise URLs for etcd in a kubeadm cluster 
```
2017-04-18 08:25:49 -07:00
Wojciech Tyczynski 7a647f9d1a Event-based iptables proxy for services 2017-04-18 13:30:59 +02:00
Kubernetes Submit Queue 877dc56864 Merge pull request #43282 from xilabao/use-healthz-api
Automatic merge from submit-queue

use healthz api in WaitForAPI

finish TODO
2017-04-18 00:17:03 -07:00
xilabao 7f613f09b8 use healthz api instead of componentstatus in WaitForAPI 2017-04-18 08:58:15 +08:00
Kubernetes Submit Queue a1684fea80 Merge pull request #42085 from cblecker/gofmt-fix
Automatic merge from submit-queue (batch tested with PRs 40055, 42085, 44509, 44568, 43956)

Fix gofmt errors

**What this PR does / why we need it**:
There were some gofmt errors on master. Ran the following to fix:
```
hack/verify-gofmt.sh | grep ^diff | awk '{ print $2 }' | xargs gofmt -w -s
```

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-04-17 15:39:07 -07:00
Chao Xu 4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Mike Danese 3757e8bb5c bazel: statically link dockerized components
and remove libc from docker images when it's not needed.
2017-04-14 15:51:54 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00