Commit Graph

2993 Commits (45a436ac24a83137d509cb0e717b9595d5977556)

Author SHA1 Message Date
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
Lucas Käldström 26c4f593aa
Cleanup/refactor some things, make it possible to use individual images, hide unused flags 2016-09-24 14:46:34 +01:00
Ilya Dmitrichenko b48df06aba
Refactor kube-dns addon constructors, more labels
- also add another IP to SANs
- fix mkdir calls
- add TODO for ComponentConfig
- start tagging TODOs by phases
2016-09-24 14:46:34 +01:00
Paulo Pires 9e4fc59d39
Added DNS add-on. 2016-09-24 14:46:34 +01:00
Ilya Dmitrichenko 1c132fe974
Address comments in review
- start cleaning up `cmd/manual.go`
- refine progress and error messages
- add missing blank lines after the license headers
- run `gofmt -s -w`
- do not set fake cloud provider
- add a note on why we cannot remove `HostNetwork: true` from `kube-discovery` pod just yet
- taint master and use `role=master`, set tolerations and affinity for `kube-discovery`
- parametrise log-level flag for all components
2016-09-24 14:46:33 +01:00
Ilya Dmitrichenko f223d814da
Initial version of kubeadm 2016-09-24 14:46:24 +01:00
Kubernetes Submit Queue a18bc2eb09 Merge pull request #33277 from mkumatag/genman_all
Automatic merge from submit-queue

Automatic generation of man pages

<!--  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**:
Currently genman supports only kubectl command, so this PR will enable genman to generate man pages for rest of the command like - kube-apiserver, kube-controller-manager, kube-proxy, kube-scheduler, kubelet
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
N/A
**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-09-24 02:10:19 -07:00
Kubernetes Submit Queue 071927a59d Merge pull request #32549 from smarterclayton/gc_non_kube_legacy
Automatic merge from submit-queue

Allow garbage collection to work against different API prefixes

The GC needs to build clients based only on Resource or Kind. Hoist the
restmapper out of the controller and the clientpool, support a new
ClientForGroupVersionKind and ClientForGroupVersionResource, and use the
appropriate one in both places.

Allows OpenShift to use the GC
2016-09-23 14:06:35 -07:00
Alan Grosskurth b629ab8714 kube-dns: Add --dns-bind-address flag
Currently, kube-dns always binds to 0.0.0.0 when starting the SkyDNS
server. Sometimes its 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-09-23 09:57:57 -07:00
Kubernetes Submit Queue 1834039960 Merge pull request #32203 from dgoodwin/kubediscovery
Automatic merge from submit-queue

Alpha JWS Discovery API for locating an apiserver securely

This PR contains an early alpha prototype of the JWS discovery API outlined in proposal #30707.

CA certificate, API endpoints, and the token to be used to authenticate to this discovery API are currently passed in as secrets. If the caller provides a valid token ID, a JWS signed blob of ClusterInfo containing the API endpoints and the CA cert to use will be returned to the caller. This is used by the alpha kubeadm to allow seamless, very quick cluster setup with simple commands well suited for copy paste.

Current TODO list:

- [x] Allow the use of arbitrary strings as token ID/token, we're currently treating them as raw keys.
- [x] Integrate the building of the pod container, move to cluster/images/kube-discovery.
  - [x] Build for: amd64, arm, arm64 and ppc64le. (just replace GOARCH=)
  - [x] Rename to gcr.io/google_containers/kube-discovery-ARCH:1.0
  - [x] Cleanup rogue files in discovery sub-dir.
  - [x] Move pkg/discovery/ to cmd/discovery/app.

There is additional pending work to return a kubeconfig rather than ClusterInfo, however I believe this is slated for post-alpha.
2016-09-23 08:19:19 -07:00
Kubernetes Submit Queue 1f7e79afbf Merge pull request #33066 from Random-Liu/set-docker-client-version
Automatic merge from submit-queue

Add docker client version.

Addressed https://github.com/kubernetes/kubernetes/issues/29478#issuecomment-248197665.

This partially reverted #31540, because currently we are really trying to connect to docker daemon when creating the client.

This PR updated docker client with real docker apiversion with `UpdateClientVersion`, so that the version related logic of engine-api can work properly, such as https://github.com/docker/engine-api/pull/174/files.

@yujuhong @feiskyer
2016-09-22 19:09:14 -07:00
Kubernetes Submit Queue cf8fcd03f0 Merge pull request #31731 from lavalamp/gengo
Automatic merge from submit-queue

Gengo

go2idl is now gengo.
2016-09-22 17:04:19 -07:00
Kubernetes Submit Queue 6b3f5c4147 Merge pull request #33038 from deads2k/api-11-push-deps-down
Automatic merge from submit-queue

remove storage related fields from genericapiserver

Removes `StorageFactory` and `StorageDecorator` from from `genericapiserver` since both constructs are related to building a `RESTStorage`, which should be provided fully formed (or via factory func) to a truly generic API server.

I found this while trying to move the creation API routes earlier.
2016-09-22 17:04:13 -07:00
Daniel Smith 76ba6d19e9 allow openapi import 2016-09-22 14:59:45 -07:00
Daniel Smith 52a96d95c0 use gengo dep 2016-09-22 13:44:02 -07:00
Daniel Smith e67cf8a264 gofmt 2016-09-22 13:42:46 -07:00
Daniel Smith 23fb528e0d fixdef 2016-09-22 13:42:46 -07:00
Daniel Smith 29977bd1a7 add k8s defaults 2016-09-22 13:42:46 -07:00
Daniel Smith ac9e5496d9 remove more redundant files 2016-09-22 13:42:46 -07:00
Daniel Smith 2709f07c71 rewrite import paths 2016-09-22 13:42:46 -07:00
Daniel Smith 7766f5e992 remove gengo source 2016-09-22 13:42:46 -07:00
Clayton Coleman 97c35fcc67
Allow garbage collection to work against different API prefixes
The GC needs to build clients based only on Resource or Kind. Hoist the
restmapper out of the controller and the clientpool, support a new
ClientForGroupVersionKind and ClientForGroupVersionResource, and use the
appropriate one in both places.
2016-09-22 15:00:58 -04:00
Kubernetes Submit Queue 4ab5a76338 Merge pull request #33103 from deads2k/controller-03-kill-non-generatedclient
Automatic merge from submit-queue

switch controller manager to generated clients

Switches the controller manager to generated clients.

@ncdc ptal
2016-09-22 11:37:01 -07:00
Kubernetes Submit Queue a8053c7c59 Merge pull request #33238 from mbohlool/openapi
Automatic merge from submit-queue

Move openapi common code to genericapiserver/openapi/common

a follow up to #32622

Reference: #13414
2016-09-22 10:20:48 -07:00
Manjunath A Kumatagi 6047787fa3 Add support for generating all the manpages to genman 2016-09-22 20:09:22 +05:30
deads2k f6882e8465 remove storage related fields from genericapiserver 2016-09-22 09:21:34 -04:00
Kubernetes Submit Queue 5af04d1dd1 Merge pull request #32876 from errordeveloper/more-cert-utils
Automatic merge from submit-queue

Refactor cert utils into one pkg, add funcs from bootkube for kubeadm to use

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

We have ended-up with rather incomplete and fragmented collection of utils for handling certificates. It may be worse to consider using `cfssl` for doing all of these things, but for now there is some functionality that we need in `kubeadm` that we can borrow from bootkube. It makes sense to move the utils from bookube into core, as discussed in #31221.

**Special notes for your reviewer**: I've taken the opportunity to review names of existing funcs and tried to make some improvements in that area (with help from @peterbourgon).

**Release note**:

```release-note
NONE
```
2016-09-22 01:29:46 -07:00
Kubernetes Submit Queue c46bc88f04 Merge pull request #31491 from dims/fixes-issue-13598
Automatic merge from submit-queue

Allow secure access to apiserver from Admission Controllers

* Allow options.InsecurePort to be set to 0 to switch off insecure access
* In NewSelfClient, Set the TLSClientConfig to the cert and key files
  if InsecurePort is switched off
* Mint a bearer token that allows the client(s) created in NewSelfClient
  to talk to the api server
* Add a new authenticator that checks for this specific bearer token

Fixes #13598
2016-09-21 21:31:56 -07:00
mbohlool c25ecc43ab Move openapi common code to genericapiserver/openapi/common 2016-09-21 17:01:54 -07:00
Kubernetes Submit Queue 735fca1c03 Merge pull request #32622 from mbohlool/openapi
Automatic merge from submit-queue

Move generated openAPI specs out of genericapiserver and make it configurable

A follow up to #31468

Generated OpenAPI Spec does not belong to genericapiserver package. A new package "generated" created in hope of all generated codes goes into it in future. Openapi folder of that package contains generated definitions and generic API server will accept the definition map as a configuration parameter.

Reference: #13414
2016-09-20 21:42:57 -07:00
Kubernetes Submit Queue 95dd65c9e3 Merge pull request #32276 from YuPengZTE/devERR
Automatic merge from submit-queue

In error, the first letter is low-case letter
2016-09-20 17:09:25 -07:00
mbohlool 38b2567d8b Move generated openAPI specs out of genericapiserver and make it configurable 2016-09-20 14:06:10 -07:00
Kubernetes Submit Queue 650715d231 Merge pull request #32903 from yujuhong/enable_docker_shim
Automatic merge from submit-queue

kubelet: Add a hidden flag to enable docker CRI integration for testing
2016-09-20 11:19:26 -07:00
deads2k b83a317003 switch controller manager to generated clientset 2016-09-20 12:53:47 -04:00
Davanum Srinivas 25d4a70827 Allow secure access to apiserver from Admission Controllers
* Allow options.InsecurePort to be set to 0 to switch off insecure access
* In NewSelfClient, Set the TLSClientConfig to the cert and key files
  if InsecurePort is switched off
* Mint a bearer token that allows the client(s) created in NewSelfClient
  to talk to the api server
* Add a new authenticator that checks for this specific bearer token

Fixes #13598
2016-09-20 10:42:21 -04:00
deads2k a2a6423574 separate RESTStorage by API group 2016-09-20 08:00:50 -04:00
Kubernetes Submit Queue 8d0518d4d2 Merge pull request #32897 from deads2k/api-07-remove-dead-mapper
Automatic merge from submit-queue

remove dead mapper

Removing a write-only field I found looking at the registration code.
2016-09-19 23:12:06 -07:00
YuPengZTE 9b3a79bfd1 In error, the first letter is low-case letter
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2016-09-20 14:10:47 +08:00
Random-Liu 08d74f33f6 Add client version. 2016-09-19 21:27:00 -07:00
Yu-Ju Hong 1c3c1ac514 kubelet: Add a hidden flag to enable docker CRI integration
The new flag, if specified, and if --container-runtime=docker, switches
kubelet to use the new CRI implementation for testing. This is hidden flag
since the feature is still under heavy development and the flag may be changed
in the near future.
2016-09-19 13:09:00 -07:00
deads2k 4aa61ddcb2 remove dead mapper 2016-09-19 09:57:19 -04:00
Kubernetes Submit Queue aa0e8b9cc1 Merge pull request #31434 from johscheuer/quobyte-dynamic-prov
Automatic merge from submit-queue

Support Quobyte as StorageClass

This PR allows Users to use Quobyte as StorageClass for dynamic volume provisioning and implements the Provisioner/Deleter Interface. 

@quolix @kubernetes/sig-storage @rootfs
2016-09-19 02:39:41 -07:00
Ilya Dmitrichenko 386fae4592
Refactor utils that deal with certs
- merge `pkg/util/{crypto,certificates}`
- add funcs from `github.com/kubernetes-incubator/bootkube/pkg/tlsutil`
- ensure naming of funcs is fairly consistent
2016-09-19 09:03:42 +01:00
Kubernetes Submit Queue 2ca15b9f76 Merge pull request #32815 from deads2k/controller-02-daemonset-informer
Automatic merge from submit-queue

convert daemonset controller to shared informers

Convert the daemonset controller completely to `SharedInformers` for its list/watch resources.

@kubernetes/rh-cluster-infra @ncdc
2016-09-16 09:39:57 -07:00
Kubernetes Submit Queue 12d916750e Merge pull request #32387 from sttts/sttts-handler-cleanup
Automatic merge from submit-queue

Cleanup non-rest apiserver handlers

- rename MuxHelper -> PathRecorderMux
- move non-rest handlers into routes packages within genericapiserver and `pkg/routes` (those from master)
- move ui and logs handlers out of genericapiserver (they are
  not generic)
- make version handler configurable (`config.EnableVersion`)
2016-09-16 08:58:06 -07:00
deads2k 234d68be83 convert daemonset controller to shared informers 2016-09-16 10:40:46 -04:00
Devan Goodwin baebd7cfd9 Expand on kube-discovery API and integrate container build. 2016-09-16 11:37:04 -03:00
Kubernetes Submit Queue e8fbcb1669 Merge pull request #32654 from soltysh/sj_clientset
Automatic merge from submit-queue

Switch ScheduledJob controller to use clientset

**What this PR does / why we need it**:
This is part of #25442. I've applied here the same fix I've applied in the manual client in #29187, see the 1st commit for that (@caesarxuchao we've talked about it in #29856).

@deads2k as promised 
@janetkuo ptal
2016-09-16 05:03:57 -07:00
Johannes Scheuermann 0b7cb5f2ae Inital Quobyte dynamic provision 2016-09-16 13:26:18 +02:00
Mike Danese a765d59932 move informer and controller to pkg/client/cache
Signed-off-by: Mike Danese <mikedanese@google.com>
2016-09-15 12:50:08 -07:00
Ilya Dmitrichenko e3278d965a Refactor and provide JSON file loaders for endpoints and tokens 2016-09-15 09:10:07 -03:00
Devan Goodwin d17a236af3 Add standalone kube-discovery JWS discovery API.
This is a standalone pod which will be configured by kubeadm for the
time being. A token ID/token map, endpoints list, and CA cert are
provided as secrets.

Callers request the cluster info by shared secret (token ID), and if the
token ID matches a JWS signed payload is returned using the other half
of the shared secret to validate.
2016-09-15 09:08:27 -03:00
Kubernetes Submit Queue 843d7cd24c Merge pull request #32576 from wongma7/revert-30825-pv-controller-informer
Automatic merge from submit-queue

Revert "Use PV shared informer in PV controller"

Fixes #32497 

Reverts kubernetes/kubernetes#30825
2016-09-15 04:37:29 -07:00
Dr. Stefan Schimanski 7f78661d0b Cleanup non-rest apiserver handlers
- rename MuxHelper -> PathRecorderMux
- move non-rest handlers into routes packages within genericapiserver and
  `pkg/routes` (those from master)
- move ui and logs handlers out of genericapiserver (they are
  not generic)
- make version handler configurable (`config.EnableVersion`)
2016-09-15 13:22:45 +02:00
Clayton Coleman acb4c00b39
EnableGarbageCollection should be a struct member on RESTOptions
Not a global. Now that we have RESTOptions this was an easy change.
2016-09-15 00:09:28 -04:00
Ilya Dmitrichenko c1e935af63 Vendor github.com/square/go-jose@789a4c4bd4c118f7564954f441b29c153ccd6a96
This is to be used by kubeadm (#31221) and kube-discovery.
It adds dummy code to make verification scripts pass.

[xref kubernetes/features#11]
2016-09-14 15:28:22 +01:00
Kubernetes Submit Queue e56a32a22d Merge pull request #31772 from gmarek/wrong_flag
Automatic merge from submit-queue

Create a flag for route reconciliation and deprecate unused node-sync-…

cc @pwittrock to decide if it can go in 1.4. It's a zero risk cleanup, that will reduce confusion about cluster configuration.
2016-09-14 06:22:47 -07:00
Kubernetes Submit Queue 7420061ee8 Merge pull request #32558 from guangxuli/k8s_test_new
Automatic merge from submit-queue

add break may be better in the loop
2016-09-14 05:35:46 -07:00
gmarek 4f0129b023 Create a flag for route reconciliatio and deprecate unused node-sync-period one 2016-09-14 11:49:50 +02:00
Maciej Szulik 7a34347f7f Move ScheduledJob controller to use generated clientset 2016-09-14 11:27:29 +02:00
Maciej Szulik 5894834cc8 Generated changes for clientset 2016-09-14 11:27:29 +02:00
Maciej Szulik d0236f1761 Create generated client set based on be GroupVersion passed in the
config
2016-09-14 11:27:29 +02:00
Kubernetes Submit Queue c4893df894 Merge pull request #32151 from bboreham/fix-cni-on-gci
Automatic merge from submit-queue

Add flag to set CNI bin dir, and use it on gci nodes

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

When using `kube-up` on GCE, following #31023 which moved the workers from debian to gci, CNI just isn't working.  The root cause is basically as discussed in #28563: one flag (`--network-plugin-dir`) means two different things, and the `configure-helper` script uses it for the wrong purpose.

This PR adds a new flag `--cni-bin-dir`, then uses it to configure CNI as desired.

As discussed at #28563, I have also added a flag `--cni-conf-dir` so users can be explicit 

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

**Special notes for your reviewer**:

I left the old flag largely alone for backwards-compatibility, with the exception that I stop setting the default when CNI is in use.  The value of `"/usr/libexec/kubernetes/kubelet-plugins/net/exec/"` is unlikely to be what is wanted there.

**Release note**:
```release-note
Added new kubelet flags `--cni-bin-dir` and `--cni-conf-dir` to specify where CNI files are located.
Fixed CNI configuration on GCI platform when using CNI.
```
2016-09-13 16:42:06 -07:00
Matthew Wong 25e9b9dcf9 Revert "Use PV shared informer in PV controller" 2016-09-13 10:12:34 -04:00
Kubernetes Submit Queue 6ffd30c2df Merge pull request #31468 from mbohlool/master
Automatic merge from submit-queue

Improvements on OpenAPI spec generation

- Generating models using go2idl library (no reflection anymore)
- Remove dependencies on go-restful/swagger
- Generate one swagger.json file for each web-service
- Bugfix: fixed a bug in trie implementation

Reference: #13414


**Release note**:

```release-note
Generate separate OpenAPI spec for each API GroupVersion on /<Group>/<Version>/swagger.json
```
2016-09-13 01:56:23 -07:00
guangxuli faf2d2c4b1 add break may be better in the loop 2016-09-13 15:41:48 +08:00
mbohlool 702f55e61d Add +k8s:openapi-gen tag to API types 2016-09-12 18:47:03 -07:00
mbohlool 54fee8c253 Improvements on OpenAPI spec generation:
- Generating models using go2idl library (no reflection anymore)
- Remove dependencies on go-restful/swagger
- Generate one swagger.json file for each web-service
- Bugfix: fixed a bug in trie implementation
2016-09-12 18:47:03 -07:00
mbohlool 8865f5d007 Only add to tracker if it's non-local 2016-09-12 18:47:03 -07:00
mbohlool 641b625a2a Add Finalize method to go2idl Generator interface 2016-09-12 18:47:03 -07:00
deads2k 713a0b038d update missing generated client 2016-09-12 07:38:34 -04:00
Kubernetes Submit Queue 66201fa7af Merge pull request #29650 from ping035627/ping035627-patch-0727
Automatic merge from submit-queue

Add error log for clientset.NewForConfig

Deal with the CreateAPIServerClientConfig return, when s.APIServerList == 0, CreateAPIServerClientConfig return error, and on the origin way the err perhaps has been rewrited by clientset.NewForConfig(&eventClientConfig).
2016-09-12 00:08:10 -07:00
Kubernetes Submit Queue a57f128a2a Merge pull request #32209 from errordeveloper/move-node-csr-helper
Automatic merge from submit-queue

Move CSR helper for nodes out of kubelet

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

Including `cmd/kubelet/app` in kubeadm causes flag leakage.

Namelly, the problem is with `pkg/credentialprovider/gcp`, which
leaks `--google-json-key` and changing the behaviour of `init()`
doesn't sound reasonable, given kubelet is the only one who uses
this packages and obviously the flag is part of the functionality.

The helper is already generic enough, it has already been exported
and works well for kubeadm, so moving it should be fine.

**Special notes for your reviewer**: cc @mikedanese @yifan-gu @gtank

**Release note**:

```release-note
NONE
```
2016-09-11 09:43:27 -07:00
Kubernetes Submit Queue e0d7425b11 Merge pull request #32101 from ping035627/ping035627-patch-0906
Automatic merge from submit-queue

Delete empty value in the log

When err isn't nil, it has printed log and returned, so it needn't to print err to the log later (it's nil).
2016-09-11 01:11:42 -07:00
Kubernetes Submit Queue bcdfb95ddd Merge pull request #31894 from MrHohn/kubedns-sigterm
Automatic merge from submit-queue

Support graceful termination in kube-dns

Fix #31807 

kube-dns used to trap SIGINT and SIGTERM and call glog.Fatalf() when signal received.
Let the program keep running when signal occur to support graceful termination. It will be terminated by SIGKILL when grace period ends.

@thockin @girishkalele
2016-09-10 15:58:04 -07:00
Kubernetes Submit Queue 17f82069bb Merge pull request #30825 from wongma7/pv-controller-informer
Automatic merge from submit-queue

Use PV shared informer in PV controller

Use the PV shared informer, addressing (partially) https://github.com/kubernetes/kubernetes/issues/26247 . Using the PVC shared informer is not so simple because sometimes the controller wants to `Requeue` and...
2016-09-10 12:40:30 -07:00
Kubernetes Submit Queue 34141a794d Merge pull request #31251 from rootfs/rbd-prov3
Automatic merge from submit-queue

support storage class in Ceph RBD volume

replace WIP PR #30959, using PV annotation idea from @jsafrane 

@kubernetes/sig-storage @johscheuer @elsonrodriguez
2016-09-10 07:03:14 -07:00
Bryan Boreham 4e961e2bf5 Add options to set CNI config and binary directories
Also make clearer the function of --network-plugin-dir when using CNI
2016-09-09 11:43:16 +01:00
Ilya Dmitrichenko d14df7afa7 Move CSR helper for nodes out of kubelet
Including `cmd/kubelet/app` in kubeadm causes flag leakage.

Namelly, the problem is with `pkg/credentialprovider/gcp`, which
leaks `--google-json-key` and changing the behaviour of `init()`
doesn't sound reasonable, given kubelet is the only one who uses
this packages and obviously the flag is part of the functionality.

The helper is already generic enough, it has already been exported
and works well for kubeadm, so moving it should be fine.
2016-09-08 07:27:38 +01:00
Kubernetes Submit Queue 0bd0d5571a Merge pull request #31540 from mtaufen/DockerOrDieRename
Automatic merge from submit-queue

Rename ConnectToDockerOrDie to CreateDockerClientOrDie

This function does not actually attempt to connect to the docker daemon, it just creates a client object that can be used to do so later. The old name was confusing, as it implied that a failure to touch the docker daemon could cause program termination (rather than just a failure to create the client).
2016-09-07 15:27:41 -07:00
Kubernetes Submit Queue 54db8fa2e3 Merge pull request #31886 from deads2k/move-storage-class
Automatic merge from submit-queue

Move StorageClass to a storage group

We discussed the pros and cons in sig-api-machinery yesterday.  Choosing a particular group name means that clients (including our internal code) require less work and re-swizzling to handle promotions between versions.  Even if you choose a group you end up not liking, the amount of work remains the same as the incubator work case: you move the affected kind, resource, and storage.

This moves the `StorageClass` type to the `storage.k8s.io` group (named for consistency with authentication, authorization, rbac, and imagepolicy).  There are two commits, one for manaul changes and one for generated code.
2016-09-06 23:22:02 -07:00
PingWang 3bce910d0f delete null value
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-09-07 08:27:17 +08:00
Michael Taufen 7b2af2dea0 Fixup in kubelet.go: Package short names should be [a-z0-9] 2016-09-06 14:59:59 -07:00
Kubernetes Submit Queue e7e9587799 Merge pull request #32102 from errordeveloper/fix-32085
Automatic merge from submit-queue

Do not go into standalone mode when `--require-kubeconfig` is passed

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

We have change how missing `--api-servers` is treated with introduction of `--require-kubeconfig` (#30798), however we haven't introduced explicit `--standalone` flag for backwards-compatibility reasons. Right now, setting `--kubeconfig` and`--require-kubeconfig` still gets kubelet into standalone mode. In practice this means that it doesn't get to update `nodeInfo` and thereby may refuse to admit pods which had been assigned to it by the scheduler. For example, if you update labels for that given node, and try to use affinity or `NodeLabels` on a pod, it won't get to run.

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

**Special notes for your reviewer**: This fix is only until we introduce `--standalone` flag.

**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
NONE
```
2016-09-06 11:11:40 -07:00
Kubernetes Submit Queue 2a7d0df30d Merge pull request #30727 from asalkeld/iptables-caps
Automatic merge from submit-queue

Clean up IPTables caps i.e.: sed -i "s/Iptables/IPTables/g"

Fixes #30651
2016-09-06 09:01:27 -07:00
deads2k cd5b6cc491 move StorageClass to its own group 2016-09-06 08:41:17 -04:00
Ilya Dmitrichenko fe768dd405 Do not go into standalone mode when `--require-kubeconfig` is passed (fix #32085) 2016-09-06 08:30:06 +01:00
Clayton Coleman 13adc63bff
generated DeepCopy without a function on a struct pointer is wrong
in and out are both pointers to pointers, so *in has to be cast to
*Type, not Type.
2016-09-04 15:26:02 -04:00
Kubernetes Submit Queue 7dfbd8f8db Merge pull request #31942 from smarterclayton/debug_conversion
Automatic merge from submit-queue

Make it easier to debug conversion mismatches

@thockin made finding mismatches easier
2016-09-04 00:01:34 -07:00
Kubernetes Submit Queue 1e21eda604 Merge pull request #31197 from freehan/kubenethairpin
Automatic merge from submit-queue

Deprecate the old cbr0 and flannel networking modes

fixes: #19766
2016-09-02 18:51:05 -07:00
Kubernetes Submit Queue 11765ab92e Merge pull request #31887 from liggitt/certificates-group
Automatic merge from submit-queue

Namespace certificates API group

New API groups should follow best-practices for naming, including using DNS names within the k8s.io namespace

```release-note
The certificates API group has been renamed to certificates.k8s.io
```
2016-09-02 15:08:55 -07:00
Minhan Xia 83ca3504b4 add deprecate message for configure-cbr0 2016-09-02 14:36:07 -07:00
Clayton Coleman 51da6bbc05 Make it easier to debug conversion mismatches 2016-09-01 22:35:31 -04:00
David McMahon 385fb81407 Update the latestReleaseBranch to release-1.4 in the munger. 2016-09-01 14:40:55 -07:00
MrHohn bde2324eb9 Support graceful termination in kube-dns 2016-09-01 12:54:33 -07:00
Jordan Liggitt a869de61bd
Namespace certificates API group 2016-09-01 14:39:06 -04:00
gmarek ea2d19f5d7 Remove unused argument to NodeController.Run 2016-08-30 14:24:56 +02:00
Angus Salkeld f785f3d3ef Clean up IPTables caps i.e.: sed -i "s/Iptables/IPTables/g" 2016-08-29 10:34:42 +10:00
Kubernetes Submit Queue 6fcbbe8663 Merge pull request #31404 from m1093782566/m109-proxy-log-level
Automatic merge from submit-queue

[kube-proxy] Modify log level from Info to Warning when proxyMode unknown

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

Currently, we use `glog.Infof` to print the log when proxy-mode is unknown, I think we may need to modify to `glog.Warningf`.

**Which issue this PR fixes**: 

fixes #31405
2016-08-28 16:14:53 -07:00
Daniel Smith a291846cd1 Revert "Remove deprecated Namespace admission plug-ins" 2016-08-28 10:20:44 -07:00
Kubernetes Submit Queue 90e5559d03 Merge pull request #31250 from derekwaynecarr/deprecated-ns-plugins
Automatic merge from submit-queue

Remove deprecated Namespace admission plug-ins

```release-note
The NamespaceExists and NamespaceAutoProvision admission controllers have been removed.

All cluster operators should use NamespaceLifecycle.
```

Fixes https://github.com/kubernetes/kubernetes/issues/31195
2016-08-27 02:13:25 -07:00
Kubernetes Submit Queue 961ef2b51d Merge pull request #31470 from caesarxuchao/regenerate-release-1-4
Automatic merge from submit-queue

Fix missing expansion files in clientset release 1.4

<!--  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 missing expansion files in clientset release 1.4;
Update the client-gen tool to automatically update generated_expansion.go;
Update the readme to document the best practice of using client-gen.

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

https://github.com/kubernetes/kubernetes/issues/29698#issuecomment-241315798


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

cc @lavalamp @krousey @mbohlool
2016-08-27 00:45:52 -07:00
Michael Taufen b9ad337bbd Rename ConnectToDockerOrDie to CreateDockerClientOrDie
This function does not actually attempt to connect to the docker daemon,
it just creates a client object that can be used to do so later. The old
name was confusing, as it implied that a failure to touch the docker daemon
could cause program termination (rather than just a failure to create the
client).
2016-08-26 11:21:07 -07:00
derekwaynecarr c727fdc81f Remove deprecated namespace admission controllers 2016-08-26 11:14:55 -04:00
Matthew Wong 1d6dbdd9d2 Use PV shared informer in PV controller 2016-08-25 21:55:23 -04:00
Kubernetes Submit Queue c70583ac10 Merge pull request #30902 from krousey/version_metric
Automatic merge from submit-queue

Split the version metric out to its own package

This PR breaks a client dependency on prometheus. Combined with #30638, the client will no longer depend on these packages.
2016-08-25 18:33:48 -07:00
PingWang fa5c496669 deal error for clientset.NewForConfig
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-08-26 09:17:51 +08:00
Chao Xu bb6b087a06 some improvement to client-gen 2016-08-25 15:26:07 -07:00
Michael Taufen 7ae1458ab0 Remove the deprecated AuthPath from KubeletServer
It has been deprecated for two releases (1.2 and 1.3).
2016-08-25 10:57:31 -07:00
Michael Taufen 0afaeab9b1 Only try to connect to docker if we're actually using the docker runtime 2016-08-25 10:57:31 -07:00
Michael Taufen f277205f4f Kubelet Refactoring
This refactor removes the legacy KubeletConfig object and adds a new
KubeletDeps object, which contains injected runtime objects and
separates them from static config. It also reduces NewMainKubelet to two
arguments: a KubeletConfiguration and a KubeletDeps.

Some mesos and kubemark code was affected by this change, and has been
modified accordingly.

And a few final notes:

KubeletDeps:
KubeletDeps will be a temporary bin for things we might consider
"injected dependencies", until we have a better dependency injection
story for the Kubelet. We will have to discuss this eventually.

RunOnce:
We will likely not pull new KubeletConfiguration from the API server
when in runonce mode, so it doesn't make sense to make this something
that can be configured centrally. We will leave it as a flag-only option
for now. Additionally, it is increasingly looking like nobody actually uses the
Kubelet's runonce mode anymore, so it may be a candidate for deprecation
and removal.
2016-08-25 10:57:31 -07:00
Dr. Stefan Schimanski e356e52247 Add sysctl whitelist on the node 2016-08-25 13:22:01 +02:00
Kubernetes Submit Queue 1f4020f8d8 Merge pull request #31171 from jlowdermilk/dynamic-volume-gate
Automatic merge from submit-queue

Dynamic volume gate

Rebased on #31140, only review last commit.  Adds a feature-gate flag for dynamic volume provisioning alpha, defaulting to enabled to avoid breaking people. Key should be removed when support for the alpha version of this is removed.
2016-08-24 21:37:16 -07:00
m1093782566 23aadeadb8 modify log Info to Warning when proxyMode unknown
Change-Id: I39f143d07fb43261afb0d6cbd67bff054796ebcc
2016-08-25 10:20:22 +08:00
Minhan Xia c1d3c89cfa fix #30376 that broken cross-build 2016-08-24 13:18:18 -07:00
Jeff Lowdermilk 991b07e60d Add a feature gate for alpha dynamic volume provisioning
Enabled by default to avoid breaking people, since this was
turned on in 1.3.
2016-08-24 13:02:42 -07:00
Kris 1740358573 Split the version metric out to its own package 2016-08-24 11:47:16 -07:00
Kubernetes Submit Queue 448a133e97 Merge pull request #31352 from mtaufen/revert-revert-30090-with-fix
Automatic merge from submit-queue

Revert revert 30090 with fix

This reverts #31297 (which originally reverted #30090) and applies a fix to stop the fd leak that was exposed by #30090.
2016-08-24 11:37:59 -07:00
Kubernetes Submit Queue 94666b4a4e Merge pull request #31112 from wojtek-t/set_unsorted_list
Automatic merge from submit-queue

Avoid sorting lists when unnecessary

I've seen ThreadSafeMap::List consuming ~30% of whole CPU usage, spending the whole time in sorting (while it is in fact completely unneded).
2016-08-24 10:11:36 -07:00
Michael Taufen 2e989a3c38 Revert "Merge pull request #31297 from mikedanese/revert-kubelet"
This reverts the revert of #30090 and #31282.
2016-08-24 09:06:12 -07:00
Kubernetes Submit Queue ef2718620c Merge pull request #30900 from jsafrane/pvc-admission
Automatic merge from submit-queue

Add admission controller for default storage class.

The admission controller adds a default class to PVCs that do not require any
specific class. This way, users (=PVC authors) do not need to care about
storage classes, administrator can configure a default one and all these PVCs
that do not care about class will get the default one.

The marker of default class is annotation "volume.beta.kubernetes.io/storage-class", which must be set to "true" to work. All other values (or missing annotation) makes the class non-default.

Based on @thockin's code, added tests and made it not to reject a PVC when no class is marked as default.
. 
@kubernetes/sig-storage
2016-08-24 03:32:46 -07:00
Kubernetes Submit Queue 3544f8a717 Merge pull request #29836 from rootfs/azuredd
Automatic merge from submit-queue

support Azure data disk volume

This is a WIP of supporting azure data disk volume. Will add test and dynamic provisioning support once #29006 is merged

replace #25915
fix #23259

@kubernetes/sig-storage 
@colemickens @brendandburns
2016-08-24 02:49:54 -07:00
Kubernetes Submit Queue 189a870ec8 Merge pull request #30376 from justinsb/kubenet_mtu
Automatic merge from submit-queue

Add kubelet --network-plugin-mtu flag for MTU selection

* Add network-plugin-mtu option which lets us pass down a MTU to a network provider (currently processed by kubenet)
* Add a test, and thus make sysctl testable
2016-08-23 21:54:50 -07:00
Mike Danese 0a735b7886 Revert "Merge pull request #30090 from mtaufen/dynamic-kubelet-restart"
This reverts commit fe808ec2a4, reversing
changes made to f297ea966e.
2016-08-23 14:11:48 -07:00
Kubernetes Submit Queue fe808ec2a4 Merge pull request #30090 from mtaufen/dynamic-kubelet-restart
Automatic merge from submit-queue

[Kubelet] Optionally consume configuration from <node-name> named config maps

This extends the Kubelet to check the API server for new node-specific config, and exit when it finds said new config.

/cc @kubernetes/sig-node @mikedanese @timstclair @vishh

**Release note**:
```
Extends Kubelet with Alpha Dynamic Kubelet Configuration. Please note that this alpha feature does not currently work with cloud provider auto-detection.
```
2016-08-23 09:25:22 -07:00
Huamin Chen 5445ccf4cb support storage class in Ceph RBD volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-08-23 11:05:51 -04:00
Huamin Chen dea4b0226d support Azure data disk volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-08-23 13:23:07 +00:00
Kubernetes Submit Queue c5d56ea356 Merge pull request #30535 from abrarshivani/vsphere_attach_detach_interface
Automatic merge from submit-queue

Implements Attacher Plugin Interface for vSphere

This PR does the following,

Fixes #29028 (vsphere volume should implement attacher interface):  Implements Attacher Plugin Interface for vSphere. 
See file: 
pkg/volume/vsphere_volume/vsphere_volume.go. - Removed attach and detach calls from SetupAt and TearDownAt.
pkg/volume/vsphere_volume/attacher.go. - Implements Attacher & Detacher Plugin Interface for vSphere. (Ref :- GCE_PD & AWS attacher.go)
pkg/cloudproviders/provider/vsphere.go - Added DiskIsAttach method.

The vSphere plugin code needs clean up. (ex: The code for getting vSphere instance is repeated in file pkg/cloudprovider/providers/vsphere.go). I will fix this in next PR.
2016-08-23 05:13:12 -07:00
Kubernetes Submit Queue 4b949093c2 Merge pull request #28921 from jianhuiz/federation-cluster-in-meta
Automatic merge from submit-queue

Add Cluster field in ObjectMeta

There will be no sub-rs, but add `Cluster` field to the ObjectMeta (for all the objects)

"To distinguish the object at the federation level from it's constituents at the cluster level we will add a "Cluster" field to the metadata of all objects (where the federation itself will also have a cluster identifier).  That way it is possible to list, interact with, and distinguish between the objects either at the federation level or at the individual cluster level based on the cluster identifier. "


@quinton-hoole @nikhiljindal @deepak-vij @mfanjie @huangyuqi

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-08-23 04:33:51 -07:00
jianhuiz 494129b089 add generated files 2016-08-22 23:00:23 -07:00
Justin Santa Barbara 902ba4e249 Add network-plugin-mtu option for MTU selection
MTU selection is difficult, and if there is a transport such as IPSEC in
use may be impossible.  So we allow specification of the MTU with the
network-plugin-mtu flag, and we pass this down into the network
provider.

Currently implemented by kubenet.
2016-08-23 01:50:58 -04:00
Michael Taufen 35a63d956b Implement Alpha Dynamic Kubelet Configuration
See Issue #27980 and Proposal PR #29459
2016-08-22 22:42:51 -07:00
Justin Santa Barbara 2c103af2b6 Create testable implementation of sysctl
This is so we can test kubenet Init, which calls sysctl
2016-08-23 01:42:37 -04:00
Kubernetes Submit Queue 5d25bffffe Merge pull request #30153 from mikedanese/auto-approve
Automatic merge from submit-queue

add an option to controller-manager to auto approve all CSRs

I think we talked about this.

cc @gtank
2016-08-22 22:24:06 -07:00
Quintin Lee 2be0b40c55 Actually link in ImagePolicyWebhook and run initialization. 2016-08-22 16:54:03 -07:00
Mike Danese 9f379df76b add an option to controller-manager to auto approve all CSRs 2016-08-22 11:46:01 -07:00
Wojciech Tyczynski 3cfd3c236c Support UnsortedList() in auto-generated sets. 2016-08-22 15:05:37 +02:00
Jan Safranek 5f6efefc40 [squash] Rename and move to storageclass/ 2016-08-22 14:11:01 +02:00
Kubernetes Submit Queue b51d5c3cc0 Merge pull request #30638 from krousey/metrics_registration
Automatic merge from submit-queue

Remove implicit Prometheus metrics from client

**What this PR does / why we need it**: This PR starts to cut away at dependencies that the client has.

**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 request count and latency have been removed, and a plug-able interface was added. If you were using our client libraries in your own binaries and want these metrics, add the following to your imports in the main package: "k8s.io/pkg/client/metrics/prometheus". 
```

cc: @kubernetes/sig-api-machinery @kubernetes/sig-instrumentation @fgrzadkowski  @wojtek-t
2016-08-21 16:47:05 -07:00
Kubernetes Submit Queue 9669eaaa39 Merge pull request #31082 from liggitt/pvc_test_race
Automatic merge from submit-queue

Fix data race in PVC Run/Stop methods

Fixes #30947
Fixes #30775
2016-08-21 14:42:35 -07:00
Jordan Liggitt 387f9ea952
Fix data race in PVC Run/Stop methods 2016-08-21 15:15:33 -04:00
Kubernetes Submit Queue 5d54c55710 Merge pull request #30212 from feiskyer/kuberuntime-flag
Automatic merge from submit-queue

Kubelet: add --container-runtime-endpoint and --image-service-endpoint

Flag `--container-runtime-endpoint` (overrides `--container-runtime`) is introduced to identify the unix socket file of the remote runtime service. And flag `--image-service-endpoint` is introduced to identify the unix socket file of the image service.

This PR is part of #28789 Milestone 0. 

CC @yujuhong @Random-Liu
2016-08-21 12:03:10 -07:00
Kubernetes Submit Queue 7979801e54 Merge pull request #28860 from ericchiang/separate-apiserver-authz-options
Automatic merge from submit-queue

pkg/genericapiserver/options: don't import pkg/apiserver

Refactor the authorization options for the API server so
pkg/apiserver isn't directly imported by the options package.

Closes #28544

cc @smarterclayton

@madhusudancs, @nikhiljindal I've updated `federation/cmd/federation-apiserver/app/server.go` to include the RBAC options with this change. I don't know if this was intentionally left out in the first place but would like your feedback.
2016-08-21 09:49:14 -07:00
Kubernetes Submit Queue a41e6e3817 Merge pull request #30922 from yifan-gu/tls_bootstrap_refactor
Automatic merge from submit-queue

Implement TLS bootstrap for kubelet using `--experimental-bootstrap-kubeconfig`  (2nd take)

Ref kubernetes/features#43 (comment)

cc @gtank @philips @mikedanese @aaronlevy @liggitt @deads2k @errordeveloper @justinsb 


Continue on the older PR https://github.com/kubernetes/kubernetes/pull/30094 as there are too many comments on that one and it's not loadable now.
2016-08-21 03:47:07 -07:00
Kubernetes Submit Queue ad6eed40ec Merge pull request #30888 from humblec/mypr/29006
Automatic merge from submit-queue

GlusterFS dynamic provisioner and deleter interface based on storageclass claims

This PR depends on PR#29006
2016-08-21 01:50:16 -07:00
Kubernetes Submit Queue c8c18b1d5c Merge pull request #30480 from caesarxuchao/gc-beta
Automatic merge from submit-queue

Enable the garbage collector by default

Turning GC on by default.

Memory usage of GC is back to normal after #30943. The CPU usage is a little higher than the cap in scalability test (1.11 core vs. 1 core). This PR adjusted the default GC worker to 20 to see if that helps CPU usage.

@kubernetes/sig-api-machinery  @wojtek-t @lavalamp
2016-08-19 22:57:54 -07:00
Kubernetes Submit Queue e9815020eb Merge pull request #30475 from derekwaynecarr/pod-cgroup
Automatic merge from submit-queue

Unblock iterative development on pod-level cgroups

In order to allow forward progress on this feature, it takes the commits from #28017 #29049 and then it globally disables the flag that allows these features to be exercised in the kubelet.  The flag can be re-added to the kubelet when its actually ready.

/cc @vishh @dubstack @kubernetes/rh-cluster-infra
2016-08-19 21:06:48 -07:00
Jordan Liggitt 26a6623261 kubelet: '--experimental-bootstrap-kubeconfig' refactor.
Move bootstrap functions to separate files.
Split some of the functions into small sub-functions for reusability.
Other cleanups
2016-08-19 15:27:23 -07:00
Yifan Gu 2e631d811c crypto.go: Rename ShouldGenSelfSignedCerts() to FoundCertOrKey().
Since the function only tests whether the files are on the disk,
the original name is a little bit misleading.
2016-08-19 13:51:34 -07:00
Yifan Gu 26babd4eba kubelet: Add --bootstrap-kubeconfig to get TLS client cert.
Add --bootstrap-kubeconfig flag to kubelet. If the flag is non-empty
and --kubeconfig doesn't exist, then the kubelet will use the bootstrap
kubeconfig to create rest client and generate certificate signing request
to request a client cert from API server.

Once succeeds, the result cert will be written down to
--cert-dir/kubelet-client.crt, and the kubeconfig will be populated with
certfile, keyfile path pointing to the result certificate file, key file.
(The key file is generated before creating the CSR).
2016-08-19 13:51:33 -07:00
Chao Xu f7a1ef8189 enable gc by default 2016-08-19 10:42:05 -07:00
Humble Chirammal 836ac6e403 GlusterFS dynamic provisioner and deleter interface based on StorageClass claims
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-08-19 23:03:32 +05:30
Kris 8d6ce0dcc6 Remove implicit Prometheus metrics from client 2016-08-19 10:11:45 -07:00
Jeff Lowdermilk 51198f59da Add --feature-gates to kube-system components
apiserver,scheduler,controller-manager,proxy,kubelet all get
flag. Using one variable to plumb through config via salt/init
scripts for GCE and GKE
2016-08-19 09:07:43 -07:00
Kubernetes Submit Queue 6ce405c6ee Merge pull request #27778 from screeley44/k8-vol-executor
Automatic merge from submit-queue

Add Events for operation_executor to show status of mounts, failed/successful to show in describe events

Fixes #27590 
@saad-ali @pmorie @erinboyd

After talking with @pmorie last week about the above issue, I decided to poke around and see if I could remedy.  The refactoring broke my previous UXP merged PR's that correctly showed failed mount errors in the describe events.  However, Not sure I implemented correctly, but it tested out and seems to be working, let me know what I missed or if this is not the correct approach.

```
Events:
  FirstSeen	LastSeen	Count	From			SubobjectPath	Type		Reason		Message
  ---------	--------	-----	----			-------------	--------	------		-------
  2m		2m		1	{default-scheduler }			Normal		Scheduled	Successfully assigned nfs-bb-pod1 to 127.0.0.1
  44s		44s		1	{kubelet 127.0.0.1}			Warning		FailedMount	Unable to mount volumes for pod "nfs-bb-pod1_default(a94f64f1-37c9-11e6-9aa5-52540073d346)": timeout expired waiting for volumes to attach/mount for pod "nfs-bb-pod1"/"default". list of unattached/unmounted volumes=[nfsvol]
  44s		44s		1	{kubelet 127.0.0.1}			Warning		FailedSync	Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "nfs-bb-pod1"/"default". list of unattached/unmounted volumes=[nfsvol]
  38s		38s		1	{kubelet }				Warning		FailedMount	Unable to mount volumes for pod "a94f64f1-37c9-11e6-9aa5-52540073d346": Mount failed: exit status 32
Mounting arguments: nfs1.rhs:/opt/data99 /var/lib/kubelet/pods/a94f64f1-37c9-11e6-9aa5-52540073d346/volumes/kubernetes.io~nfs/nfsvol nfs []
Output: mount.nfs: Connection timed out

Resolution hint: Check and make sure the NFS Server exists (ensure that correct IPAddress/Hostname was given) and is available/reachable.
Also make sure firewall ports are open on both client and NFS Server (2049 v4 and 2049, 20048 and 111 for v3).
Use commands telnet <nfs server> <port> and showmount <nfs server> to help test connectivity.
```
2016-08-19 08:27:48 -07:00
derekwaynecarr fde285cd8f Disable cgroups-per-qos flag until implementation is stabilized 2016-08-19 11:08:59 -04:00
Kubernetes Submit Queue 5898f87722 Merge pull request #30233 from mbohlool/swagger2
Automatic merge from submit-queue

OpenAPI / Swagger2 spec generation

This is alpha version of OpenAPI spec generation. Generated "/swagger.json" file (accessible on api server) is a valid OpenAPI spec with some warnings that will be fixed in next versions of spec generation. Currently it is possible to generate a client using this spec though I did not test the clients.

reference: #13414

**Release note**:

```release-note
Alpha support for OpenAPI (aka. Swagger 2.0) specification serves on /swagger.json 
```
2016-08-19 04:21:48 -07:00
Abrar Shivani e89ad04422 Implements Attacher Plugin Interface for vSphere 2016-08-19 00:28:55 -07:00
Kubernetes Submit Queue c19e9cc89d Merge pull request #26044 from smarterclayton/multiversion_encode
Automatic merge from submit-queue

Guarantee that Encode handles nested objects again
2016-08-18 21:10:55 -07:00
Pengfei Ni b36ace9a57 Kubelet: add --container-runtime-endpoint and --image-service-endpoint
New flag --container-runtime-endpoint (overrides --container-runtime)
is introduced to kubelet which identifies the unix socket file of
the remote runtime service. And new flag --image-service-endpoint is
introduced to kubelet which identifies the unix socket file of the
image service.
2016-08-19 10:22:44 +08:00
Kubernetes Submit Queue c5e3b79f32 Merge pull request #30634 from timothysc/etcd3_shouldbe_intergration_tests
Automatic merge from submit-queue

Move UTs that block on apiserver to integration tests. 

In validating etcd.v3client we had uncovered that a change in the behavior of the client https://github.com/coreos/etcd/issues/6162 , caused a number of unit tests to fail.  These test failures were due to the fact that the unit tests were trying to standup a apiserver even though there was no etcd backend stood up.  

This PR simply shuffles those tests to integration tests, which is where they should be. 

/cc @kubernetes/sig-scalability @wojtek-t @hongchaodeng @xiang90
2016-08-18 18:39:13 -07:00
Kubernetes Submit Queue 57ad590d8d Merge pull request #30925 from caesarxuchao/gc-concurrency
Automatic merge from submit-queue

Increase concurrent GC workers, adjust the polling interval and timeout in e2e test

ref: https://github.com/kubernetes/kubernetes/issues/30759#issuecomment-240853949
2016-08-18 17:10:35 -07:00
Kubernetes Submit Queue 7523669699 Merge pull request #30814 from freehan/lbsrcrevert
Automatic merge from submit-queue

Revert "Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE

Reverts kubernetes/kubernetes#30729
2016-08-18 15:34:10 -07:00
mbohlool c5f1d63d6f Generates OpenAPI (aka Swagger 2.0) Spec on /swagger.json path 2016-08-18 15:32:04 -07:00
Chao Xu c9b28416b7 increase GC concurrency to 100 2016-08-18 14:04:34 -07:00
Eric Chiang b4eaf625a0 pkg/genericapiserver/options: don't import pkg/apiserver
Refactor the authorization options for the API server so
pkg/apiserver isn't directly imported by the options package.
2016-08-18 13:01:50 -07:00
Timothy St. Clair d6606a6aa9 etcd3 validation showed that several unit tests that depend on apiserver being fully
stood up should be integration tests, not unit tests.
2016-08-18 14:12:24 -05:00
Kubernetes Submit Queue dbc9063c17 Merge pull request #24977 from johscheuer/quobyte-plugin
Automatic merge from submit-queue

Quobyte Volume plugin

@quofelix and myself developed a volume plugin for [Quobyte](http://www.quobyte.com) which is a software-defined storage solution. This PR allows Kubernetes users to mount a Quobyte Volume inside their containers over Kubernetes.

Here are some further informations about [Quobyte and Storage for containers](http://www.quobyte.com/containers)
2016-08-18 11:46:37 -07:00
Clayton Coleman 5f8366aac3
Convert() should accept the new conversion Context value
Allows Convert() to reuse the same conversions as ConvertToVersion
without being overly coupled to the version.
2016-08-18 14:45:20 -04:00
Minhan Xia 1acaa1db09 Revert "Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE"" 2016-08-18 10:19:48 -07:00
Jan Safranek 82d35fb461 Add admission controller for default storage class.
The admission controller adds a default class to PVCs that do not require any
specific class. This way, users (=PVC authors) do not need to care about
storage classes, administrator can configure a default one and all these PVCs
that do not care about class will get the default one.
2016-08-18 18:55:35 +02:00
Johannes Scheuermann eed42380f9 Initial Quobyte support 2016-08-18 17:13:50 +02:00
Jan Safranek bb5d562f37 Restore alpha behavior 2016-08-18 10:36:50 +02:00
Jan Safranek 6e4d95f646 Dynamic provisioning V2 controller, provisioners, docs and tests. 2016-08-18 10:36:49 +02:00
Kubernetes Submit Queue f9190ed61a Merge pull request #30138 from gmarek/flags
Automatic merge from submit-queue

Expose flags for new NodeEviction logic in NodeController

Fix #28832
Last PR from the NodeController NodeEviction logic series. 

cc @davidopp @lavalamp @mml
2016-08-18 00:41:28 -07:00
Kubernetes Submit Queue ec4d645da4 Merge pull request #30798 from smarterclayton/fix_kubeconfig
Automatic merge from submit-queue

Allow a flag that forces kubelet to have a valid kubeconfig

`--require-kubeconfig` forces the kubelet to use the kubeconfig for all
APIserver communication, and exit cleanly.  Allows cluster lifecycle to loop waiting for config to be available.

Fixes #30515

A follow up PR will handle the issue discovered where the DefaultCluster rules applied to kubeconfig allow a malicious party who can bind to localhost:8080 to take advantage of an admin misconfiguration.

@lukemarsden @mikedanese



```release-note
The Kubelet now supports the `--force-kubeconfig` option which reads all client config from the provided `--kubeconfig` file and will cause the Kubelet to exit with error code 1 on error.  It also forces the Kubelet to use the server URL from the kubeconfig file rather than the  `--api-servers` flag.  Without this flag set, a failure to read the kubeconfig file would only result in a warning message.

In a future release, the value of this flag will be defaulted to `true`.
```
2016-08-17 22:07:07 -07:00
Kubernetes Submit Queue 6fb10dd762 Merge pull request #30241 from Q-Lee/webhook
Automatic merge from submit-queue

Adding types file for image admission controller.

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

```release-note
Adding container image verification webhook API.
```
2016-08-17 21:30:34 -07:00
Clayton Coleman a66828d73e
Allow a flag that forces kubelet to have a valid kubeconfig
--require-kubeconfig forces the kubelet to use the kubeconfig for all
APIserver communication, and exit cleanly.
2016-08-17 16:26:52 -04:00
Quintin Lee 19c0c676d8 Adding imagepolicy group non-autogenerated code. 2016-08-17 12:25:42 -07:00
Scott Creeley 782d7d9815 Add Events for operation_executor to show status of mounts, failed or successful 2016-08-17 09:53:47 -04:00
gmarek 4cf698ef04 Expose flags for new NodeEviction logic in NodeController 2016-08-17 10:43:24 +02:00
Kubernetes Submit Queue 622db63282 Merge pull request #30435 from hodovska/1328441-non-k8scontainers
Automatic merge from submit-queue

Add note: kubelet manages only k8s containers.

Kubelet wrote log when accesing container which was not created in k8s, what could confuse users. That's why we added note about it in documentation and lowered log level of the message to 5.

Here is example of the message: 
```
> Apr 19 11:50:32 openshift-114.lab.sjc.redhat.com atomic-openshift-node[9551]: 
I0419 11:50:32.194020    9600 docker.go:363] 
Docker Container: /tiny_babbage is not managed by kubelet.
```

bug 1328441
Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1328441
2016-08-17 00:54:33 -07:00
Matt Liggett d60ba3c6e2 Implement DisruptionController.
Part of #12611
2016-08-16 15:20:41 -07:00
Kubernetes Submit Queue 921c4604b1 Merge pull request #30466 from vishh/kubelet-as-root
Automatic merge from submit-queue

[Kubelet] Check if kubelet is running as uid 0

Related to #30176
2016-08-15 15:04:59 -07:00
Kubernetes Submit Queue 79ed7064ca Merge pull request #27970 from jingxu97/restartKubelet-6-22
Automatic merge from submit-queue

Add volume reconstruct/cleanup logic in kubelet volume manager

Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.

Fixes https://github.com/kubernetes/kubernetes/issues/27653
2016-08-15 13:48:43 -07:00
Jing Xu f19a1148db This change supports robust kubelet volume cleanup
Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.
2016-08-15 11:29:15 -07:00
Dominika Hodovska 08945a9b6a Add note: kubelet manages only k8s containers.
bug 1328441
Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1328441
2016-08-15 12:36:29 +02:00
PingWang ee567e1ea0 optimise the getConntrackMax function
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-08-15 09:42:09 +08:00
Kubernetes Submit Queue e39d7f71e6 Merge pull request #30251 from hongchaodeng/r2
Automatic merge from submit-queue

Move new etcd storage (low level storage) into cacher

In an effort for #29888, we are pushing forward this:

What?
- It changes creating etcd storage.Interface impl into creating config
- In creating cacher storage (StorageWithCacher), it passes config created above and new etcd storage inside.

Why?
- We want to expose the information of (etcd) kv client to cacher. Cacher storage uses this information to talk to remote storage.
2016-08-13 10:09:49 -07:00
Kubernetes Submit Queue dadb3322dc Merge pull request #30327 from janetkuo/sj-controller-client
Automatic merge from submit-queue

Use unversioned client in scheduledjobs and set group version to batch/v2alpha1

Fixes #30323
2016-08-12 22:08:34 -07:00
Hongchao Deng d0938094d9 move new etcd storage into cacher 2016-08-12 18:40:20 -07:00
Kubernetes Submit Queue 29eda9bf29 Merge pull request #30421 from nikhiljindal/eventsAPI
Automatic merge from submit-queue

Adding events to federation control plane

Adding events to federation control plane.

Apart from the standard changes to add a resource to `federation/apis/core/v1`, other changes are:
* Adding a new `federationoptions.ServerRunOptions` which includes `genericoptions.ServerRunOptions` and EventsTTL. 
* Added a new method in `pkg/api/mapper` to build a RestMapper based on the passed Scheme rather than using `api.Scheme`. Updated `federation/apis/core/install` to use this new method. Without this change, if `federation/apis/core/install.init()` is called before `pkg/api/install.init()` then the registered RESTMapper in `pkg/apimachinery/registered` will have no resources. This second problem will be fixed once we have instances of `pkg/apimachinery/registered` instead of a single global singleton (generated clientset which imports `pkg/api/install` will have a different instance of registered, than federation-apiserver which imports `federation/apis/core/install`).

cc @kubernetes/sig-cluster-federation @lavalamp
2016-08-12 17:26:54 -07:00
Janet Kuo e4269d490f Use unversioned client in scheduledjobs and set group version to batch/v2alpha1 2016-08-12 16:46:09 -07:00
Girish Kalele f64c052858 Revert "Scheduledjob e2e" 2016-08-12 16:12:19 -07:00
Kubernetes Submit Queue f279e61e4a Merge pull request #27874 from ingvagabund/kubelet-kernel-tunning-behaviour-new-flags
Automatic merge from submit-queue

[kubelet] Introduce --protect-kernel-defaults flag to make the tunable behaviour configurable

Let's make the default behaviour of kernel tuning configurable. The default behaviour is kept modify as has been so far.
2016-08-12 14:11:26 -07:00
Vishnu kannan c75b61ed48 check if kubelet is running as uid 0
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-08-12 14:06:10 -07:00
Kubernetes Submit Queue ac1f8bc665 Merge pull request #26027 from soltysh/scheduledjob_e2e
Automatic merge from submit-queue

Scheduledjob e2e

@erictune last element of the scheduledjob puzzle. I think we'll iterate on this once we have all the puzzles in place. This is one of those things that will be allowed to merge after code freeze.

```release-note
* Introducing ScheduledJobs as described in [the proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/scheduledjob.md) as part of `batch/v2alpha1` version (experimental feature).
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-08-12 13:27:32 -07:00
Kubernetes Submit Queue d933f07835 Merge pull request #30184 from ping035627/ping035627-patch-0806
Automatic merge from submit-queue

some optimization for server.go

The PR modified two places:
1) Optimise the code style according to the go style guide;
2) Optimise the log.
2016-08-12 12:07:15 -07:00
nikhiljindal 1d76884336 Adding events to federation apiserver 2016-08-12 10:48:19 -07:00
Kubernetes Submit Queue c73b96d66d Merge pull request #25526 from lavalamp/fix-generated-code
Automatic merge from submit-queue

Fix code generators-- make scheme building composable

I needed to make some changes to make my other refactoring possible and this got rather large. 

We now provide a "SchemeBuilder" to help all of the api packages provide their scheme-building functions (addKnownTypes and friends) in a standardized way. This also allows generated deepcopies & conversions to be entirely self contained, the project will now build without them being present (as they can add themselves to the SchemeBuilder). (Although if you actually build without them, you will get reduced performance!)

Previously, there was no way to construct your own runtime.Scheme (e.g., to test), you had to use the api.Scheme object, which has all sorts of non-hermetic cruft in it. Now you can get everything from a package by calling the scheme builder's AddToScheme, including the generated functions, if they are present.

Next steps are to allow for declaring dependencies, and to standardize the registration & install code. (#25434)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/25526)
<!-- Reviewable:end -->
2016-08-11 22:38:29 -07:00
Kubernetes Submit Queue ca92a205d9 Merge pull request #27855 from andreykurilin/cobra_update
Automatic merge from submit-queue

Update github.com/spf13/pflag and github.com/spf13/cobra

Update github.com/spf13/pflag and github.com/spf13/cobra
    
Update:
    github.com/spf13/cobra to f62e98d28ab7ad31d707ba837a966378465c7b57
    github.com/spf13/cobra/doc to f62e98d28ab7ad31d707ba837a966378465c7b57
    github.com/spf13/pflag to 1560c1005499d61b80f865c04d39ca7505bf7f0b

Closes issue #29852

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/27855)
<!-- Reviewable:end -->
2016-08-11 19:05:13 -07:00
Daniel Smith bd7d7cc02a changes to generators 2016-08-11 17:06:54 -07:00
Daniel Smith f1fd638962 fix register.go files up + add test import 2016-08-11 17:06:54 -07:00
Kubernetes Submit Queue 475f6c5ef6 Merge pull request #30387 from lavalamp/refactor-generators
Automatic merge from submit-queue

Refactor generators

Extracting pure refactoring out of #25526 so I don't have to do it for a 4th time.

This makes no changes to the output of the generators.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30387)
<!-- Reviewable:end -->
2016-08-11 10:04:09 -07:00
Kubernetes Submit Queue c51a89bc83 Merge pull request #30440 from sttts/sttts-fix-kubectl-logtostderr
Automatic merge from submit-queue

Fix glog's --v in kubectl

With https://github.com/kubernetes/kubernetes/pull/29147 kubectl lost its glog output to stderr because  the `init()` func did not run anymore which had set `logtostderr` to true before.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30440)
<!-- Reviewable:end -->
2016-08-11 09:28:20 -07:00
Kubernetes Submit Queue f5861b9e49 Merge pull request #30176 from dims/check-for-root-access
Automatic merge from submit-queue

Check for CAP_SYS_ADMIN in Kubelet

Comment from nsenter_mount.go header:
The Kubelet process must have CAP_SYS_ADMIN (required by nsenter); at
the present, this effectively means that the kubelet is running in a
privileged container.

Related to #26093

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30176)
<!-- Reviewable:end -->
2016-08-11 08:46:19 -07:00
Kubernetes Submit Queue 2fb7cae2be Merge pull request #29999 from mtaufen/kubecfg-config-field-rename
Automatic merge from submit-queue

[Kubelet] Rename `--config` to `--pod-manifest-path`. `--config` is deprecated.

This field holds the location of a manifest file or directory of manifest
files for pods the Kubelet is supposed to run. The name of the field
should reflect that purpose. I didn't change the flag name because that
API should remain stable.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29999)
<!-- Reviewable:end -->
2016-08-11 08:11:52 -07:00
Jan Chaloupka eb967ad143 kubelet: introduce --protect-kernel-defaults to make the KernelTunableBehavior configurable 2016-08-11 13:08:27 +02:00
Janet Kuo fe53ec34cf Use unversioned client in scheduledjobs and set group version to batch/v2alpha1 2016-08-11 13:06:18 +02:00
bindata-mockuser e07e65d411 Setup logging in kubectl via pkg/util/logs
pkg/util/logs.go got its own package in a771578a1c, but it was not
imported in the kubelet anymore such that its init() func
did not run setting logtostderr to true by default.
2016-08-11 12:19:19 +02:00
Daniel Smith d7e4028437 modify generators 2016-08-10 16:55:05 -07:00
Kubernetes Submit Queue 1d4e0ea3c1 Merge pull request #30341 from sttts/sttts-simplify-deepcopy-canonical-element
Automatic merge from submit-queue

Simplify canonical element term in deepcopy

Replace the old functional canonical element term in deepcopy registration with direct struct instantiation.

The old way was an artifact of non-uniform pointer/non-pointer types in the signature of deepcopy function. Since we changed that to always be a pointer, we can simplify the code.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30341)
<!-- Reviewable:end -->
2016-08-10 16:34:07 -07:00
Michael Taufen e43ccdbf2c Rename KubeletConfiguration.Config to PodManifestPath for clarity
Also provide a new --pod-manifest-path flag and deprecate the old
--config one.

This field holds the location of a manifest file or directory of manifest
files for pods the Kubelet is supposed to run. The name of the field
should reflect that purpose.
2016-08-10 09:40:21 -07:00
Kubernetes Submit Queue ba1666fb7b Merge pull request #30293 from girishkalele/kube-proxy-hostname
Automatic merge from submit-queue

kube-proxy: Propagate hostname to iptables proxier

Need to propagate the hostname (i.e. Nodename) from kube-proxy to the iptables proxier to allow kube-proxy to determine local endpoints.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30293)
<!-- Reviewable:end -->
2016-08-10 02:00:37 -07:00
bindata-mockuser d1a37f5ce2 Simplify canonical element term in deepcopy 2016-08-10 09:07:40 +02:00
Kubernetes Submit Queue f53a35fb76 Merge pull request #29147 from caesarxuchao/cut-client-repo-staging
Automatic merge from submit-queue

Cut the client repo, staging it in the main repo

Tracking issue: #28559
ref: https://github.com/kubernetes/kubernetes/pull/25978#issuecomment-232710174

This PR implements the plan a few of us came up with last week for cutting client into its own repo:
1. creating "_staging" (name is tentative) directory in the main repo, using a script to copy the client and its dependencies to this directory
2. periodically publishing the contents of this staging client to k8s.io/client-go repo
3. converting k8s components in the main repo to use the staged client. They should import the staged client as if the client were vendored. (i.e., the import line should be `import "k8s.io/client-go/<pacakge name>`). This requirement is to ease step 4.
4. In the future, removing the staging area, and vendoring the real client-go repo.

The advantage of having the staging area is that we can continuously run integration/e2e tests with the latest client repo and the latest main repo, without waiting for the client repo to be vendored back into the main repo. This staging area will exist until our test matrix is vendoring both the client and the server.

In the above plan, the tricky part is step 3. This PR achieves it by creating a symlink under ./vendor, pointing to the staging area, so packages in the main repo can refer to the client repo as if it's vendored. To prevent the godep tool from messing up the staging area, we export the staged client to GOPATH in hack/godep-save.sh so godep will think the client packages are local and won't attempt to manage ./vendor/k8s.io/client-go.

This is a POC. We'll rearrange the directory layout of the client before merge.

@thockin @lavalamp @bgrant0607 @kubernetes/sig-api-machinery

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29147)
<!-- Reviewable:end -->
2016-08-09 17:12:14 -07:00
Davanum Srinivas 2616fc9cf5 Check for CAP_SYS_ADMIN in Kubelet
The Kubelet process must have CAP_SYS_ADMIN, which implies that
the kubelet process must be either running as root or in a privileged
container. Make this check early in the startup sequence and bail out
if necessary.

Related to #26093
2016-08-09 13:40:07 -04:00
Girish Kalele 5d6abf59ff kube-proxy: Propagate hostname to iptables proxier 2016-08-09 10:05:29 -07:00
Timothy St. Clair 24993b0343 Update generated files due to dependency shift.
Also minor bug fix in federation api.
2016-08-09 10:41:09 -05:00
Andrey Kurilin 1b00a2d5b6 Update github.com/spf13/pflag and github.com/spf13/cobra
Update:
  github.com/spf13/cobra to f62e98d28ab7ad31d707ba837a966378465c7b57
  github.com/spf13/cobra/doc to f62e98d28ab7ad31d707ba837a966378465c7b57
  github.com/spf13/pflag to 1560c1005499d61b80f865c04d39ca7505bf7f0b

Closes issue #29852
2016-08-09 15:01:19 +03:00
mksalawa a806351cc3 Extract etcd options from genericapiserver. 2016-08-09 13:35:53 +02:00
Wojciech Tyczynski 8a8cd06ea4 Configurable cache sizes of cachers 2016-08-09 09:41:48 +02:00
Chao Xu 4d2350632c only store typeMeta and objectMeta in the gc store 2016-08-08 17:23:13 -07:00
Chao Xu a771578a1c move pkg/util/ files to their own package to reduce client-go dependencies 2016-08-05 23:32:02 -07:00
PingWang 9f3d83efac some optimization for server.go
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-08-06 11:13:05 +08:00
Kubernetes Submit Queue 9083ee971e Merge pull request #29137 from janetkuo/scheduledjob-controller
Automatic merge from submit-queue

Scheduledjob controller

Supersedes #25952; first 7 commits come from #25816

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

```release-note
```
2016-08-05 18:07:48 -07:00
Eric Tune 8675e014fb ScheduledJob controller 2016-08-05 13:34:50 -07:00
deads2k 32920b5617 add subjectaccessreviews resource 2016-08-05 11:20:56 -04:00
Kubernetes Submit Queue 4d75d6e807 Merge pull request #30115 from timstclair/cleanbuild
Automatic merge from submit-queue

Cleanup k8s script noise with a verbosity concept

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

The KUBE_VERBOSE environment variable sets the verbosity level to
use. Log messages can specify a verbosity by setting the V
variable. e.g.

    V=2 kube::log::info foo bar

Would only print "foo bar" if $KUBE_VERBOSE >= 2.

Examples:

Default verbosity (1 for make commands):
```
$ make kubelet
+++ [0804 17:23:32] Generating bindata:
    /usr/local/google/home/stclair/go/k8s3/src/k8s.io/kubernetes/test/e2e/framework/gobindata_util.go
+++ [0804 17:23:37] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
+++ [0804 17:23:37] Building go targets for linux/amd64:
    cmd/kubelet
# k8s.io/kubernetes/pkg/kubelet
pkg/kubelet/kubelet.go:247: undefined: a
make: *** [kubelet] Error 1
```

Extra verbose (5, comparable to previous levels):
<details>
```
$ make kubelet KUBE_VERBOSE=5
I0804 17:31:05.083395    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/trace.go:151:30: cannot use (traceBufHeader literal) (value of type traceBufHeader) as unsafe.ArbitraryType value in argument to unsafe.Sizeof
I0804 17:31:05.083503    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/trace.go:151:7: array length 64 << 10 - unsafe.Sizeof((traceBufHeader literal)) (value of type uintptr) must be constant
I0804 17:31:05.083600    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/mgcwork.go:269:37: cannot use (workbufhdr literal) (value of type workbufhdr) as unsafe.ArbitraryType value in argument to unsafe.Sizeof
I0804 17:31:05.083654    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/mgcwork.go:269:7: array length (_WorkbufSize - unsafe.Sizeof((workbufhdr literal))) / sys.PtrSize (value of type uintptr) must be constant
I0804 17:31:05.084006    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/chan.go:21:28: cannot use (hchan literal) (value of type hchan) as unsafe.ArbitraryType value in argument to unsafe.Sizeof
I0804 17:31:05.084040    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/chan.go:21:66: cannot use (hchan literal) (value of type hchan) as unsafe.ArbitraryType value in argument to unsafe.Sizeof
I0804 17:31:05.084076    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/chan.go:21:14: unsafe.Sizeof((hchan literal)) + uintptr(-int(unsafe.Sizeof((hchan literal))) & (maxAlign - 1)) (value of type uintptr) is not constant
I0804 17:31:05.085536    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/hashmap.go:80:31: cannot use (struct{b bmap; v int64} literal).v (value of type int64) as unsafe.ArbitraryType value in argument to unsafe.Offsetof
I0804 17:31:05.085567    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/hashmap.go:80:15: unsafe.Offsetof((struct{b bmap; v int64} literal).v) (value of type uintptr) is not constant
I0804 17:31:05.085788    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/hashmap.go:1053:45: cannot convert &zeroinitial (value of type *[1024]byte) to unsafe.Pointer
I0804 17:31:05.086995    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/mfinal.go:20:65: cannot use (finalizer literal) (value of type finalizer) as unsafe.ArbitraryType value in argument to unsafe.Sizeof
I0804 17:31:05.087031    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/mfinal.go:20:11: array length (_FinBlockSize - 2 * sys.PtrSize - 2 * 4) / unsafe.Sizeof((finalizer literal)) (value of type uintptr) must be constant
I0804 17:31:05.087957    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/mstats.go:170:39: cannot use memstats.by_size (variable of type [67]struct{size uint32; nmalloc uint64; nfree uint64}) as unsafe.ArbitraryType value in argument to unsafe.Offsetof
I0804 17:31:05.087999    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/mstats.go:170:76: cannot use memstats.by_size[0] (variable of type struct{size uint32; nmalloc uint64; nfree uint64}) as unsafe.ArbitraryType value in argument to unsafe.Sizeof
I0804 17:31:05.088483    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/panic.go:118:34: cannot use (_defer literal) (value of type _defer) as unsafe.ArbitraryType value in argument to unsafe.Sizeof
I0804 17:31:05.088510    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/panic.go:118:20: unsafe.Sizeof((_defer literal)) (value of type uintptr) is not constant
I0804 17:31:05.089812    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/sema.go:42:42: cannot use (semaRoot literal) (value of type semaRoot) as unsafe.ArbitraryType value in argument to unsafe.Sizeof
I0804 17:31:05.089845    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/runtime/sema.go:42:8: array length sys.CacheLineSize - unsafe.Sizeof((semaRoot literal)) (value of type uintptr) must be constant
I0804 17:31:05.094634    2601 parse.go:307] type checking encountered some errors in "runtime", but ignoring.
I0804 17:31:05.875185    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/go/k8s3/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/davecgh/go-spew/spew/bypass.go:33:26: cannot use (*byte)(nil) (value of type *byte) as unsafe.ArbitraryType value in argument to unsafe.Sizeof
I0804 17:31:05.875234    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/go/k8s3/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/davecgh/go-spew/spew/bypass.go:33:12: unsafe.Sizeof((*byte)(nil)) (value of type uintptr) is not constant
I0804 17:31:05.875838    2601 parse.go:307] type checking encountered some errors in "github.com/davecgh/go-spew/spew", but ignoring.
I0804 17:31:05.897216    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/crypto/cipher/xor.go:12:36: cannot use uintptr(0) (constant 0 of type uintptr) as unsafe.ArbitraryType value in argument to unsafe.Sizeof
I0804 17:31:05.897261    2601 parse.go:353] type checker error: /usr/local/google/home/stclair/.gvm/gos/go1.6.2/src/crypto/cipher/xor.go:12:18: int(unsafe.Sizeof(uintptr(0))) (value of type int) is not constant
I0804 17:31:05.897360    2601 parse.go:307] type checking encountered some errors in "crypto/cipher", but ignoring.
I0804 17:31:06.400904    2601 conversion.go:227] considering pkg "k8s.io/kubernetes/federation/apis/core/v1"
I0804 17:31:06.401138    2601 conversion.go:243]   tags: ["k8s.io/kubernetes/federation/apis/core"]
I0804 17:31:06.427408    2601 conversion.go:283]   no viable conversions, not generating for this package
I0804 17:31:06.427508    2601 main.go:73] Completed successfully.
Go version: go version go1.6.2 linux/amd64
+++ [0804 17:31:06] Generating bindata:
    /usr/local/google/home/stclair/go/k8s3/src/k8s.io/kubernetes/test/e2e/framework/gobindata_util.go
Generated bindata file : 11536 ../../..//test/e2e/generated/bindata.go lines of lovely automated artifacts
+++ [0804 17:31:12] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
+++ [0804 17:31:12] Building go targets for linux/amd64:
    cmd/kubelet
# k8s.io/kubernetes/pkg/kubelet
pkg/kubelet/kubelet.go:247: undefined: a
!!! Error in /usr/local/google/home/stclair/go/k8s3/src/k8s.io/kubernetes/hack/lib/golang.sh:506
  'go install "${goflags[@]:+${goflags[@]}}" -gcflags "${gogcflags}" -ldflags "${goldflags}" "${nonstatics[@]:+${nonstatics[@]}}"' exited with status 2
Call stack:
  1: /usr/local/google/home/stclair/go/k8s3/src/k8s.io/kubernetes/hack/lib/golang.sh:506 kube::golang::build_binaries_for_platform(...)
  2: /usr/local/google/home/stclair/go/k8s3/src/k8s.io/kubernetes/hack/lib/golang.sh:692 kube::golang::build_binaries(...)
  3: hack/make-rules/build.sh:27 main(...)
Exiting with status 1
!!! Error in /usr/local/google/home/stclair/go/k8s3/src/k8s.io/kubernetes/hack/lib/golang.sh:596
  '( kube::golang::setup_env; echo "Go version: $(go version)"; local host_platform; host_platform=$(kube::golang::host_platform); local goflags goldflags gogcflags; eval "goflags=(${KUBE_GOFLAGS:-})"; goldflags="${KUBE_GOLDFLAGS:-} $(kube::version::ldflags)"; gogcflags="${KUBE_GOGCFLAGS:-}"; local use_go_build; local -a targets=(); local arg; readonly BINDATAS=("${KUBE_ROOT}/test/e2e/framework/gobindata_util.go"); kube::log::status "Generating bindata:" "${BINDATAS[@]}"; for bindata in ${BINDATAS[@]};
do
    if [[ -f $bindata ]]; then
        go generate "${bindata}";
    fi;
done; for arg in "$@";
do
    if [[ "${arg}" == "--use_go_build" ]]; then
        use_go_build=true;
    else
        if [[ "${arg}" == -* ]]; then
            goflags+=("${arg}");
        else
            targets+=("${arg}");
        fi;
    fi;
done; if [[ ${#targets[@]} -eq 0 ]]; then
    targets=("${KUBE_ALL_TARGETS[@]}");
fi; local -a platforms=(${KUBE_BUILD_PLATFORMS:-}); if [[ ${#platforms[@]} -eq 0 ]]; then
    platforms=("${host_platform}");
fi; local binaries; binaries=($(kube::golang::binaries_from_targets "${targets[@]}")); local parallel=false; if [[ ${#platforms[@]} -gt 1 ]]; then
    local gigs; gigs=$(kube::golang::get_physmem); if [[ ${gigs} -ge ${KUBE_PARALLEL_BUILD_MEMORY} ]]; then
        kube::log::status "Multiple platforms requested and available ${gigs}G >= threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in parallel"; parallel=true;
    else
        kube::log::status "Multiple platforms requested, but available ${gigs}G < threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in serial"; parallel=false;
    fi;
fi; kube::golang::build_kube_toolchain; if [[ "${parallel}" == "true" ]]; then
    kube::log::status "Building go targets for ${platforms[@]} in parallel (output will appear in a burst when complete):" "${targets[@]}"; local platform; for platform in "${platforms[@]}";
    do
        ( kube::golang::set_platform_envs "${platform}"; kube::log::status "${platform}: go build started"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-}; kube::log::status "${platform}: go build finished" ) &> "/tmp//${platform//\//_}.build" &
    done; local fails=0; for job in $(jobs -p);
    do
        wait ${job} || let "fails+=1";
    done; for platform in "${platforms[@]}";
    do
        cat "/tmp//${platform//\//_}.build";
    done; exit ${fails};
else
    for platform in "${platforms[@]}";
    do
        kube::log::status "Building go targets for ${platform}:" "${targets[@]}"; kube::golang::set_platform_envs "${platform}"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-};
    done;
fi )' exited with status 1
Call stack:
  1: /usr/local/google/home/stclair/go/k8s3/src/k8s.io/kubernetes/hack/lib/golang.sh:596 kube::golang::build_binaries(...)
  2: hack/make-rules/build.sh:27 main(...)
Exiting with status 1
make: *** [kubelet] Error 1
```
</details>

Remaining work: Add a verbosity label to more log messages.

/cc @kubernetes/sig-api-machinery @kubernetes/contributor-experience
2016-08-05 04:30:06 -07:00
Kubernetes Submit Queue 34e51d8ce9 Merge pull request #30095 from ronnielai/image-gc-2
Automatic merge from submit-queue

Moving image gc to pkg/kubelet/images
2016-08-05 03:11:33 -07:00
Tim St. Clair f4ce5583c2
Adjust verbosity levels of go2idl logging 2016-08-04 22:01:35 -07:00
Kubernetes Submit Queue 7921a9ce67 Merge pull request #25816 from soltysh/scheduledjob_kubectl
Automatic merge from submit-queue

ScheduledJob kubectl

@erictune the last part (kubectl) of the ScheduledJob, as usual builds on top of previous PRs, so only last 2 commits matter (the kubectl one and storage leftovers).

```release-note
* Introducing ScheduledJobs as described in [the proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/scheduledjob.md) as part of `batch/v2alpha1` version (experimental feature).
```
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-08-04 17:36:07 -07:00
Kubernetes Submit Queue c41c3d4d14 Merge pull request #25189 from mfanjie/kube-service-controller-rewritten
Automatic merge from submit-queue

Rewrite service controller to apply best controller pattern

This PR is a long term solution for #21625:
We apply the same pattern like replication controller to service controller to avoid the potential process order messes in service controller, the change includes:
1. introduce informer controller to watch service changes from kube-apiserver, so that every changes on same service will be kept in serviceStore as the only element.
2. put the service name to be processed to working queue
3. when process service, always get info from serviceStore to ensure the info is up-to-date
4. keep the retry mechanism, sleep for certain interval and add it back to queue.
5. remote the logic of reading last service info from kube-apiserver before processing the LB info as we trust the info from serviceStore.

The UT has been passed, manual test passed after I hardcode the cloud provider as FakeCloud, however I am not able to boot a k8s cluster with any available cloudprovider, so e2e test is not done.

Submit this PR first for review and for triggering a e2e test.
2016-08-04 14:05:51 -07:00
bindata-mockuser 0c76d85cc8 moving image gc to images 2016-08-04 12:26:06 -07:00
Kubernetes Submit Queue 42a12a4cd6 Merge pull request #29978 from hodovska/sharedInformer-fixup
Automatic merge from submit-queue

SharedInformerFactory: usage and fixes

Follow-up for #26709
2016-08-04 09:00:23 -07:00
Dominika Hodovska 305342c48d Use shared informer factory in controllers 2016-08-04 10:10:03 +02:00
Dominika Hodovska 816f6d32ca Collapse duplicate informer creation paths 2016-08-04 09:02:13 +02:00
Kubernetes Submit Queue 544851a19f Merge pull request #29796 from deads2k/token-review
Automatic merge from submit-queue

Token review endpoint

Unrevert of #28788, which was rolled back because of https://github.com/kubernetes/kubernetes/issues/29375


@cjcullen @wojtek-t I'd like to remerge if possible.  Have we gotten the field checking mentioned here relaxed? https://github.com/kubernetes/kubernetes/pull/28788#discussion_r71918442
2016-08-03 20:48:31 -07:00
mfanjie 5fa640490e rewrite serivce controller to apply the latest controller pattern 2016-08-04 09:28:55 +08:00
Kubernetes Submit Queue 804109d349 Merge pull request #29950 from andreykurilin/kubelet_typos
Automatic merge from submit-queue

Fix various typos in kubelet
2016-08-03 10:05:46 -07:00
Maciej Szulik e6c327048e Forced using batch/v2alpha1 for storing ScheduledJob 2016-08-03 17:25:37 +02:00
deads2k d50506345c fix String protobuf generator 2016-08-03 08:37:45 -04:00
deads2k 60dd4a5d26 interesting changes to add tokenreviews endpoint to implement webhook 2016-08-03 08:37:45 -04:00
Kubernetes Submit Queue 24216fe02f Merge pull request #26958 from resouer/util-line
Automatic merge from submit-queue

Refactoring runner resource container linedelimiter to it's own pkg

Continuing my work ref #15634

Anyone is ok to review this fix.
2016-08-03 02:26:12 -07:00
Chao Xu 81858d755e add validateListType to pkg/api/meta/schema_test.go 2016-08-02 15:47:24 -07:00
Andrey Kurilin 9f1c3a4c56 Fix various typos in kubelet 2016-08-03 01:14:44 +03:00
k8s-merge-robot 59836d6dbd Merge pull request #24841 from sjenning/shared-informer
Automatic merge from submit-queue

update node controller to use shared pod informer

continuing work from #24470 and #23575
2016-08-02 03:45:01 -07:00
k8s-merge-robot 88172c4815 Merge pull request #29658 from ping035627/ping035627-patch-0727-2
Automatic merge from submit-queue

optimise some code style in server.go

The PR modified some code style for authPathClientConfig and parseReservation function in server.go.
2016-08-01 23:36:14 -07:00
k8s-merge-robot 0693d47987 Merge pull request #29241 from jianhuiz/federation-apiserver-extensions-replicaset-client
Automatic merge from submit-queue

Generate federation apiserver extensions replicaset client

generate clientset for extensions/ReplicaSet of federation apiserver

@nikhiljindal @quinton-hoole, @deepak-vij
#24764
2016-07-29 11:40:12 -07:00
Harry Zhang e0ab76019e Rename runnter pkg name 2016-07-29 02:37:00 -04:00
Harry Zhang 94c6994ab3 Move rlimit to it's own pkg 2016-07-29 02:34:54 -04:00
Harry Zhang 15d0f5cfd5 Move linedelimiter to it's own pkg
Refactoring resource container
2016-07-29 02:29:26 -04:00
k8s-merge-robot 2817674715 Merge pull request #29557 from deads2k/make-prefx-configurable
Automatic merge from submit-queue

make the resource prefix in etcd configurable for cohabitation

This looks big, its not as bad as it seems.

When you have different resources cohabiting, the resource name used for the etcd directory needs to be configurable.  HPA in two different groups worked fine before.  Now we're looking at something like RC<->RS.  They normally store into two different etcd directories.  This code allows them to be configured to store into the same location.

To maintain consistency across all resources, I allowed the `StorageFactory` to indicate which `ResourcePrefix` should be used inside `RESTOptions` which already contains storage information.

@lavalamp affects cohabitation.
@smarterclayton @mfojtik prereq for our rc<->rs and d<->dc story.
2016-07-28 03:01:28 -07:00
PingWang bb191a07ea optimise the style for parseReservation function
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

optimise some code style in server.go

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-07-28 11:29:24 +08:00
deads2k aa3db4d995 make the resource prefix in etcd configurable for cohabitation 2016-07-27 07:51:40 -04:00
k8s-merge-robot 5064306808 Merge pull request #29254 from ping035627/ping035627-patch-0718
Automatic merge from submit-queue

Judge the cloud isn't nil before use it in server.go

The PR add a judgement for the cloud before use it, because cloudprovider.InitCloudProvider maybe return nil for the cloud.
2016-07-27 01:24:21 -07:00
PingWang a7d3c73bbc add a judgement for the cloud in server.go
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update server.go

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-07-26 08:29:12 +08:00
k8s-merge-robot 0724a9c4dc Merge pull request #28828 from zte-cloud/failmodify
Automatic merge from submit-queue

modify Failure to failed

use 'failed' is more suitable than 'Failure'
2016-07-25 12:56:15 -07:00
k8s-merge-robot 2e53a24889 Merge pull request #29400 from derekwaynecarr/min-reclaim-parse
Automatic merge from submit-queue

Add parsing code in kubelet for eviction-minimum-reclaim

The kubelet parses the eviction-minimum-reclaim flag and validates it for correctness.

The first two commits are from https://github.com/kubernetes/kubernetes/pull/29329 which has already achieved LGTM.
2016-07-22 21:35:35 -07:00
k8s-merge-robot 444e34fc7e Merge pull request #29371 from ping035627/ping035627-patch-0722
Automatic merge from submit-queue

Print two errors to log

The PR add two error info to log.
2016-07-22 17:13:18 -07:00
k8s-merge-robot 73f1218398 Merge pull request #29370 from ping035627/ping035627-patch-0721-2
Automatic merge from submit-queue

add configz.InstallHandler in controllermanager.go

I think it should add configz.InstallHandler for Run function in controllermanager.go.
2016-07-22 17:13:14 -07:00
k8s-merge-robot df2cf16ddb Merge pull request #26709 from hodovska/master
Automatic merge from submit-queue

Allow shareable resources for admission control plugins.

Changes allow admission control plugins to share resources. This is done via new PluginInitialization structure. The structure can be extended for other resources, for now it is an shared informer for namespace plugins (NamespiceLifecycle, NamespaceAutoProvisioning, NamespaceExists).

If a plugins needs some kind of shared resource e.g. client, the client shall be added to PluginInitializer and Wants methods implemented to every plugin which will use it.
2016-07-22 11:07:05 -07:00
k8s-merge-robot c5abb90c2f Merge pull request #29329 from derekwaynecarr/min-reclaim-flag
Automatic merge from submit-queue

Add kubelet flag for eviction-minimum-reclaim

This is taken from #27199 as its the most burdensome to rebase and should have little disagreement.

/cc @vishh @ronnielai PTAL
2016-07-22 09:08:43 -07:00
k8s-merge-robot 6fd685b54b Merge pull request #29207 from fgrzadkowski/ha_master_leader_elect
Automatic merge from submit-queue

Add default leader election for scheduler and controller manager.

#21124
2016-07-22 04:49:44 -07:00
k8s-merge-robot 60e59c9461 Merge pull request #29184 from wojtek-t/rs_controller_ref
Automatic merge from submit-queue

ReplicaSet controller can set/remove ControllerRef

This is mostly a copy from https://github.com/kubernetes/kubernetes/pull/27600
2016-07-22 04:18:00 -07:00
PingWang f759f3243a print two errors to log
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update for go vet

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-07-22 09:47:52 +08:00
PingWang 2dae79c114 add configz.InstallHandler
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-07-22 08:25:33 +08:00
k8s-merge-robot 8780b45a04 Merge pull request #29369 from ping035627/ping035627-patch-0721
Automatic merge from submit-queue

two optimization for StartControllers in controllermanager.go

The PR changed two places to optimise StartControllers function in controllermanager.go.
2016-07-21 14:51:13 -07:00
jianhuiz 41b409b24e support included-types-overrides without version provided (group/type) 2016-07-21 14:00:35 -07:00
derekwaynecarr 2f4a4ea4cf Kubelet parses and validates eviction-minimum-reclaim flag 2016-07-21 16:46:12 -04:00
k8s-merge-robot 1cf3f1cf03 Merge pull request #29237 from ncdc/fixup-windows-term
Automatic merge from submit-queue

Fix Windows terminal handling

Fix some issues with Windows terminal handling with respect to TTYs that came up as part of the
code that adds support for terminal resizing.

cc @smarterclayton @sttts @csrwng
2016-07-21 07:24:13 -07:00
derekwaynecarr 99bddd23c4 Add eviction minimum reclaim option to kubelet 2016-07-21 10:06:17 -04:00
Dominika Hodovska 037d116add Factory for SharedIndexInformers 2016-07-21 14:04:48 +02:00
PingWang eb2f6934c6 two optimization for StartControllers
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-07-21 18:31:28 +08:00
Wojciech Tyczynski 85de930a66 ReplicaSet controller can set/remove ControllerRef 2016-07-21 11:36:52 +02:00
Wojciech Tyczynski 4d0d115690 Revert "add tokenreviews endpoint to implement webhook" 2016-07-21 09:40:35 +02:00
k8s-merge-robot f8fd8046e7 Merge pull request #29275 from wojtek-t/rs_shared_pod_informer
Automatic merge from submit-queue

Use sharedPodInformer in ReplicaSet controller

@caesarxuchao
2016-07-21 00:05:01 -07:00
k8s-merge-robot 8ead63f127 Merge pull request #28788 from deads2k/wire-authentication
Automatic merge from submit-queue

add tokenreviews endpoint to implement webhook

Wires up an API resource under `apis/authentication.k8s.io/v1beta1` to expose the webhook token authentication API as an API resource.  This allows one API server to use another for authentication and uses existing policy engines for the "authoritative" API server to controller access to the endpoint.

@cjcullen you wrote the initial type
2016-07-20 22:23:45 -07:00
Tim Hockin b829d4d4ef Merge pull request #26702 from joe2far/fix-broken-links
Fix broken warning image link in docs
2016-07-20 15:10:41 -07:00
Seth Jennings db6026c82a node controller use shared pod informer 2016-07-20 15:26:19 -05:00
deads2k 2256c6e619 fix String protobuf generator 2016-07-20 15:11:57 -04:00
deads2k 2c4a9f2e8d interesting changes to add tokenreviews endpoint to implement webhook 2016-07-20 15:11:56 -04:00
Andy Goldstein 77b0547b3d Fix Windows terminal handling
Fix some issues with Windows terminal handling with respect to TTYs that came up as part of the
code that adds support for terminal resizing.
2016-07-20 13:37:14 -04:00
Dominika Hodovska ba40a528e1 PluginInitializer as a new part of NewFromPlugins method 2016-07-20 12:53:52 +02:00
Dominika Hodovska fc0a3c6dcb Allow shareable resources for admission control plugins 2016-07-20 12:53:52 +02:00
Wojciech Tyczynski 2794cf538c Use sharedPodInformer in ReplicaSet controller 2016-07-20 12:25:26 +02:00
Filip Grzadkowski 69e9786383 Change defaults for leader election for scheduler and controller manager 2016-07-20 11:36:15 +02:00
k8s-merge-robot 411c32bc98 Merge pull request #27520 from olegshaldybin/format-apiserver-options
Automatic merge from submit-queue

Format apiserver options

Trivial change, code formatting only: it was hard to read long lines, and my editor was really slow when scrolling through them.
2016-07-19 19:58:01 -07:00
k8s-merge-robot a279673de6 Merge pull request #25764 from gtank/certificates-api-controller-v3
Automatic merge from submit-queue

Certificate signing controller for TLS bootstrap (alpha)

The controller handles generating and signing certificates when a CertificateSigningRequest has the "Approved" condition. Uses cfssl to support a wide set of possible keys and algorithms. Depends on PR #25562, only the last two commits are relevant to this PR.

cc @mikedanese

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-19 18:45:31 -07:00
k8s-merge-robot a3ce4513ad Merge pull request #28934 from smarterclayton/optional_slice
Automatic merge from submit-queue

Unable to have optional message slice

When making a message slice optional, we need to handle one more
conditional case in the rewriter.

@wojtek-t
2016-07-19 12:55:19 -07:00
George Tankersley 803c7ac299 certificates: implement certificates controller 2016-07-19 11:25:38 -07:00
k8s-merge-robot 4466531382 Merge pull request #29094 from luxas/gomaxproc
Automatic merge from submit-queue

Remove GOMAXPROCS() calls because they are unnecessary


Now we're setting GOMAXPROCS when every binary starts up, but we don't have to do that anymore, since we've upgraded to Go 1.6

Documentation for it:

> func GOMAXPROCS(n int) int

> GOMAXPROCS sets the maximum number of CPUs that can be executing simultaneously and returns the previous setting. If n < 1, it does not change the current setting. The number of logical CPUs on the local machine can be queried with NumCPU. This call will go away when the scheduler improves. 

A simple program to prove it's unnecessary:

```go
package main
import (
    "fmt"
    "runtime"
)
func main(){
    numCPUBefore := runtime.GOMAXPROCS(runtime.NumCPU())
    numCPUAfter := runtime.GOMAXPROCS(runtime.NumCPU())
    fmt.Println(numCPUBefore, numCPUAfter)
}
```

Output with Go 1.4.2: `1 4`
Output with Go 1.6.2: `4 4`

So I think we should remove calls to GOMAXPROCS now, and it should be pretty straightforward

@thockin @wojtek-t @gmarek @lavalamp @vishh
2016-07-19 08:11:24 -07:00
Lucas Käldström 88ea80b572 Remove GOMAXPROCS() calls because they are unnecessary 2016-07-19 11:08:21 +03:00
k8s-merge-robot fa174bcdaf Merge pull request #29042 from dims/fixup-imports
Automatic merge from submit-queue

Use Go canonical import paths

Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-18 07:23:38 -07:00
k8s-merge-robot 9b5696b7b4 Merge pull request #26705 from nebril/issue-26704
Automatic merge from submit-queue

Make discovery summarizer call servers in parallel

fixes #26704
2016-07-18 04:42:46 -07:00
Prashanth Balasubramanian 2f9516db30 List all nodes and occupy cidr map before starting allocations 2016-07-16 13:54:01 -07:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
Tim Hockin 1f37281dae Scale kube-proxy conntrack limits by cores
For large machines we want more conntrack entries than smaller machines.
2016-07-15 16:36:40 -07:00
Buddha Prakash 5000e74664 Inject top level QoS cgroup creation in the Kubelet 2016-07-15 10:02:22 -07:00
k8s-merge-robot 5844145795 Merge pull request #28815 from smarterclayton/fix_stringer
Automatic merge from submit-queue

Generate a better Stringer method for proto types

This replaces the bad string output generated by golang/proto with gogo/protobuf stringer generation. Makes the output similar to %#v and more debuggable. We have to have a String() method to implement proto.Message, so this is strictly better.

@wojtek-t, @thockin for after your PR merges

Fixes #28756
2016-07-15 05:49:40 -07:00
k8s-merge-robot e7e434b10d Merge pull request #27600 from caesarxuchao/rc-gc
Automatic merge from submit-queue

[GarbageCollector] Let the RC manager set/remove ControllerRef

What's done:
* RC manager sets Controller Ref when creating new pods
* RC manager sets Controller Ref when adopting pods with matching labels but having no controller
* RC manager clears Controller Ref when pod labels change
* RC manager clears pods' Controller Ref when rc's selector changes
* RC manager stops adoption/creating/deleting pods when rc's DeletionTimestamp is set
* RC manager bumps up ObservedGeneration: The [original code](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/replication/replication_controller_utils.go#L36) will do this.
* Integration tests:
  * verifies that changing RC's selector or Pod's Labels triggers adoption/abandoning
* e2e tests (separated to #27151):
  * verifies GC deletes the pods created by RC if DeleteOptions.OrphanDependents=false, and orphans the pods if DeleteOptions.OrphanDependents=true.

TODO:

- [x] we need to be able to select Pods that have a specific ControllerRef. Then each time we sync the RC, we will iterate through all the Pods that has a controllerRef pointing the RC, event if the labels of the Pod doesn't match the selector of RC anymore. This will prevent a Pod from stuck with a stale controllerRef, which could be caused by the race between abandoner (the goroutine that removes controllerRef) and worker the goroutine that add controllerRef to pods).
- [ ] use controllerRef instead of calling `getPodController`. This might be carried out by the control-plane team.
- [ ] according to the controllerRef proposal (#25256): "For debugging purposes we want to add an adoptionTime annotation prefixed with kubernetes.io/ which will keep the time of last controller ownership transfer." This might be carried out by the control-plane team.

cc @lavalamp @gmarek
2016-07-15 04:40:40 -07:00