Commit Graph

14734 Commits (1dfd6ab0c11d95ef5d5352509c90fdab5ce4ed29)

Author SHA1 Message Date
Kubernetes Submit Queue f488d118ad Merge pull request #31091 from feiskyer/kuberuntime-getnetns
Automatic merge from submit-queue

Kubelet: implement GetNetNS for new runtime api

Kubelet: implement GetNetNS for new runtime api. 

CC @yujuhong @thockin @kubernetes/sig-node @kubernetes/sig-rktnetes
2016-08-24 13:40:40 -07:00
Minhan Xia c1d3c89cfa fix #30376 that broken cross-build 2016-08-24 13:18:18 -07:00
Daniel Smith 9dcef2e3cd Revert "Enable v3 Client as the default on UTs" 2016-08-24 13:16:40 -07:00
Jeff Lowdermilk fe643590ba Update/fix feature-gate comments 2016-08-24 13:04:25 -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
Kubernetes Submit Queue 49ff2e8831 Merge pull request #31115 from jsafrane/add-constants
Automatic merge from submit-queue

Add constants and documentation around AWS magic numbers

Also, bumped max IOPS/GB to 50, it changed from 30 since last time I checked.

Source: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html

@kubernetes/sig-storage
2016-08-24 12:59:50 -07:00
Kubernetes Submit Queue 9a9c98912b Merge pull request #31323 from hongchaodeng/testwatch
Automatic merge from submit-queue

Separate test watch from zero and nonzero

Recently there was spike flakes for this. See #31079.

This is to split the test into two units for further digging. We need to know which one is problematic, or both.
2016-08-24 12:19:00 -07:00
Kubernetes Submit Queue ca5879bdb9 Merge pull request #31051 from caesarxuchao/fix-rc-scale
Automatic merge from submit-queue

Fix rc scaler watch

<!--  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**:
The RC scaler uses Watch to monitor if the RC is scaled. The Watch was sent with resourceVersion=0, so the watch event it gets back starts from any point in the history, so the result is not valid.

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

Probably will fix #30990
Fix #30469

**Special notes for your reviewer**:

This breaks the load test because the reaper doesn't actually wait until all the pods are gone before it deletes the RC.

I haven't run the node-100 test myself to verify it fixes the problem though.

cc @deads2k @smarterclayton @lavalamp
2016-08-24 12:18:54 -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
Scott Creeley 22665e1806 Add ReclaimPolicy to the resource printer for 'get pv' 2016-08-24 14:00:29 -04:00
Kubernetes Submit Queue f96b8fc85a Merge pull request #31334 from jsafrane/fix-aws-encryption
Automatic merge from submit-queue

Fix AWS reporting "The parameter KmsKeyId requires the parameter Encrypted to be set."

- use aws.String/Int/Bool functions
- don't set the key to empty string, use nil instead

@justinsb @kubernetes/sig-storage
2016-08-24 10:55:33 -07:00
Chao Xu 5fd19d3766 fix RC watch in scale 2016-08-24 10:26:08 -07:00
Minhan Xia 42a554ec0d add ebtables rules to filter duplicate packets 2016-08-24 10:19:29 -07:00
Minhan Xia 950e689637 kubenet set cbr0 mac address 2016-08-24 10:18:48 -07:00
Minhan Xia 87ab70d6ef add ebtables util 2016-08-24 10:17:41 -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
Scott Creeley 9e078d7393 add validation for PV spec to ensure correct values are used for ReclaimPolicy 2016-08-24 12:18:22 -04: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 bb16ac239a Merge pull request #31159 from Clarifai/ext-svc-ref-no-e2e
Automatic merge from submit-queue

Implement ExternalName in kube-dns

Part of the ongoing saga formerly known as https://github.com/kubernetes/features/issues/33

This is the prelude (first commit) in #30931, spawn into a separate PR to allow building a new kube-dns image before e2e tests (the rest of #30931) are updated.

ExternalName allows kubedns to return CNAME records for external
services. No proxying is involved.

cc @thockin
2016-08-24 05:37:58 -07:00
Kubernetes Submit Queue b8c1a833a6 Merge pull request #31210 from lojies/changetostderr
Automatic merge from submit-queue

change to stderr

`fmt.Fprint(out, "You must specify the type of resource to describe. ", valid_resources)`

change this to stderr.
2016-08-24 03:32:57 -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 cfab351621 Merge pull request #31116 from fraenkel/scale_client
Automatic merge from submit-queue

Add ScaleExpansion to client v1.4

**What this PR does / why we need it**:
The generated v1.4 did not carry over the complete ScaleExpansion interface. The unversioned client is using this interface and should be in sync with generated client.

**Release note**:
```release-note

NONE
```
2016-08-24 02:09:35 -07:00
Jan Safranek 8cd5e263b8 Fix AWS reporting "The parameter KmsKeyId requires the parameter Encrypted to be set."
- use aws.String/Int/Bool functions
- don't set the key to empty string, use nil instead
2016-08-24 10:05:07 +02:00
Kubernetes Submit Queue d84dcaf3fb Merge pull request #30858 from kargakis/status-column-for-rs
Automatic merge from submit-queue

kubectl: display ready replicas in 'get {rs,rc}'

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

@kubernetes/kubectl @janetkuo @bgrant0607
2016-08-24 00:38:53 -07:00
Wojciech Tyczynski d5a596bca1 More efficient field selectors 2016-08-24 09:08:38 +02:00
Kubernetes Submit Queue 2fe56d4bb3 Merge pull request #30863 from ping035627/ping035627-patch-0818
Automatic merge from submit-queue

Optimise the ValidateBytes function

The PR optimise the "ValidateBytes" function in factory.go. Too much "if" branches is poor readability, use "switch" to look better.
2016-08-23 23:59:00 -07:00
Kubernetes Submit Queue e427ab0baa Merge pull request #30649 from dagnello/openstack-lbaasv2-multiport
Automatic merge from submit-queue

fix Openstack provider to allow more than one service port for lbaas v2

This resolves bug #30477 where if a service defines multiple ports for load balancer, the plugin will fail with multiple ports are not supported.

@anguslees @jianhuiz
2016-08-23 22:36:09 -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
Hongchao Deng 874cc7f2b6 separate test watch from zero and nonzero 2016-08-23 20:34:39 -07:00
Chao Xu f2d0f1e3f0 add absent owner cache 2016-08-23 17:21:15 -07:00
Girish Kalele b82c028f77 GCE Cloud provider changes for ESIPP
Add feature gate (ExternalTrafficLocalOnly) for alpha feature
2016-08-23 16:16:39 -07:00
Mike Danese 46176dbe66 Merge pull request #31297 from mikedanese/revert-kubelet
Revert kubelet dynamic config
2016-08-23 15:38:32 -07:00
Kubernetes Submit Queue 64210f43ff Merge pull request #30429 from ZTE-PaaS/zhangke-patch-023
Automatic merge from submit-queue

two nits for kubelet syncPod

a useless ‘(’ and a log level should be info
2016-08-23 15:04:59 -07:00
Janet Kuo 90557ec56c Handle overlapping deployments gracefully
1. When overlapping deployments are discovered, annotate them
2. Expose those overlapping annotations as warnings in kubectl describe
3. Only respect the earliest updated one (skip syncing all other overlapping deployments)
4. Use indexer instead of store for deployment lister
2016-08-23 14:33:30 -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
Yifan Gu 173dbd700b rkt: Append `all-run` to `insecure-options` when the pod's all containers are privileged. 2016-08-23 14:07:18 -07:00
Yifan Gu d65a96a600 rkt: Override the config using the response from rkt api service. 2016-08-23 11:42:20 -07:00
Davanum Srinivas 87a370f67c Increase request timeout based on termination grace period
When terminationGracePeriodSeconds is set to > 2 minutes (which is
the default request timeout), ContainerStop() times out at 2 minutes.
We should check the timeout being passed in and bump up the
request timeout if needed.

Fixes #31219
2016-08-23 13:44:11 -04:00
Davide Agnello 97fab82552 Openstack provider allowing more than one service port for lbaas v2 2016-08-23 10:17:32 -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
Kubernetes Submit Queue f297ea966e Merge pull request #30838 from caesarxuchao/per-resource-orphan-behavior
Automatic merge from submit-queue

[GarbageCollector] Allow per-resource default garbage collection behavior

What's the bug:
When deleting an RC with `deleteOptions.OrphanDependents==nil`, garbage collector is supposed to treat it as `deleteOptions.OrphanDependents==true", and orphan the pods created by it. But the apiserver is not doing that.

What's in the pr:
Allow each resource to specify the default garbage collection behavior in the registry. For example, RC registry's default GC behavior is Orphan, and Pod registry's default GC behavior is CascadingDeletion.
2016-08-23 08:46:32 -07:00
Kubernetes Submit Queue 9484b2c0a0 Merge pull request #30890 from timothysc/etcd3_v3client
Automatic merge from submit-queue

Enable v3 Client as the default on UTs

Updates the default initialization to use clientv3 interface to etcd3, and fixes the UTs.  

This PR includes a cherry-pick of https://github.com/kubernetes/kubernetes/pull/30634 so we can validate the tests, so do not merge until that PR is complete.
2016-08-23 08:04:02 -07:00
Rudi Chiarito 42e1e7aed4 kubectl: display ExternalName for services
Also add ExternalIPs in `describe`
2016-08-23 09:51:17 -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
Kubernetes Submit Queue f7365a43ec Merge pull request #30330 from derekwaynecarr/fix-quota-constraints-funcs
Automatic merge from submit-queue

Fix quota constraints funcs for pvc and service objects

Fixes https://github.com/kubernetes/kubernetes/issues/30315
2016-08-23 03:43:23 -07:00
Kubernetes Submit Queue 0b5547f462 Merge pull request #30183 from timstclair/aa-psp
Automatic merge from submit-queue

AppArmor PodSecurityPolicy support

Implements the AppArmor PodSecurityPolicy support based on the alpha API proposed [here](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/apparmor.md#pod-security-policy)

This implementation deviates from the original proposal in one way: it adds a separate option for specifying a default profile:
```
apparmor.security.alpha.kubernetes.io/defaultProfileName
```
This has several advantages over the original proposal:

- The default is explicit, rather than implicit on the ordering
- The default can be specified without constraining the allowed profiles
- The allowed profiles can be restricted without specifying a default (requires every pod to explicitly set a profile)

The E2E cluster does not currently enable the PodSecurityPolicy, so I will submit E2E tests in a separate PR.

/cc @dchen1107 @pweil- @sttts @jfrazelle @Amey-D
2016-08-23 03:06:05 -07:00
Kubernetes Submit Queue 4edc98260f Merge pull request #31109 from AdoHe/fix_get_cluster
Automatic merge from submit-queue

fix kubectl get cluster display issue

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

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

**Release note**:
`NONE`
2016-08-23 00:19:43 -07:00
Kubernetes Submit Queue ec5b204573 Merge pull request #28816 from xiangpengzhao/add_test_comment
Automatic merge from submit-queue

Unset https_proxy before roundtripper_test

When running `hack/test-go.sh`, if the testing env is behind a https proxy, roundtripper_test will fail randomly.

After `unset https_proxy`, the testing works well. So, add a comment to be a troubleshooting tip.

Fail info:

```
--- FAIL: TestRoundTripAndNewConnection (0.12s)
	roundtripper_test.go:319: proxied http->http: shouldError=false, got true: Get http://127.0.0.1:46711: unexpected EOF
FAIL
FAIL	k8s.io/kubernetes/pkg/util/httpstream/spdy	0.148s
```

```
--- FAIL: TestRoundTripAndNewConnection (0.12s)
	roundtripper_test.go:319: proxied https with auth (valid hostname + RootCAs) -> http: shouldError=false, got true: Get http://127.0.0.1:41028: unexpected EOF
FAIL
FAIL	k8s.io/kubernetes/pkg/util/httpstream/spdy	0.146s
```
2016-08-23 00:19:37 -07:00
Kubernetes Submit Queue a31aff85b7 Merge pull request #29664 from lixiaobing10051267/masterLogHandler
Automatic merge from submit-queue

Wrong path for log_handler.go
2016-08-23 00:19:31 -07:00
Kubernetes Submit Queue 2db76ad133 Merge pull request #30369 from lixiaobing10051267/masterQuote
Automatic merge from submit-queue

check using single quote in cmd/pkg/plugin
2016-08-23 00:19:25 -07:00
Kubernetes Submit Queue f977752243 Merge pull request #30953 from m1093782566/m109-node_status_test
Automatic merge from submit-queue

[kubelet test] Improve node status test debug info

I find the output format `%v` of glog couldn't output useful information of an `api.Node` object. The output of this line https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kubelet_node_status_test.go#L492
is

```
kubelet_node_status_test.go:491: expected
                &TypeMeta{Kind:,APIVersion:,}
                , got
                &TypeMeta{Kind:,APIVersion:,}
```

- It's difficult for me to tell the difference between expected and got.

- I prefer to use `diff.ObjectDiff(expectedNode, updatedNode)` to output the debug information as it will point out the starting character of the different objects.

I think this line https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kubelet_node_status_test.go#L647 can use `diff.ObjectDiff()` as well.

The related issus is #30952
2016-08-23 00:19:20 -07:00
lojies f21c37db64 change to stderr 2016-08-23 14:51:56 +08:00
mfanjie 3b374725c6 persist services need to be retried in service controller cache. 2016-08-23 14:49:54 +08:00
Kubernetes Submit Queue 5866476a89 Merge pull request #30652 from freehan/cleanuplegacy
Automatic merge from submit-queue

clean up oldIptablesMasqueradeMark

follow up of #30486
2016-08-22 23:00:53 -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
Rudi Chiarito b5464a970f Implement ExternalName in kube-dns 2016-08-23 00:55:47 -04:00
Kubernetes Submit Queue f3329b7bae Merge pull request #30923 from Q-Lee/configure-webhook
Automatic merge from submit-queue

Configure webhook

**What this PR does / why we need it**: this configures the image policy webhook + admission controller for gce/gci.

addresses: #22888

**Release note**:
```Configure image verification admission controller and webhook on gce.
```
2016-08-22 21:46:47 -07:00
jianhuiz 858e515f85 ignore clusterName on create and update 2016-08-22 21:09:57 -07:00
jianhuiz 7be20b0dac add ClusterName field to ObjectMeta 2016-08-22 21:09:57 -07:00
Kubernetes Submit Queue 25ce84b34e Merge pull request #31140 from thockin/feature-gate-fixes
Automatic merge from submit-queue

Make 'allAlpha' a special feature gate

Rather than making all caller check both allAlpha and their own flag, make `allAlpha` set all of the alpha gates explicitly.

This is hard to test because of the globalness.  I will follow this commit with a new one to add some way to test, but I wanted to float this design
2016-08-22 21:06:29 -07:00
Paul Morie b91ad76066 Kubelet code move: volume / util 2016-08-22 23:35:11 -04:00
Kubernetes Submit Queue df22dd70b8 Merge pull request #31033 from mml/evict
Automatic merge from submit-queue

Implementation of the /eviction subresource.
2016-08-22 20:25:09 -07:00
Paul Morie d22ffb0402 Add validation preventing recycle of / in a hostPath PV 2016-08-22 23:20:20 -04:00
Timothy St. Clair 99e017661a Fix for etcd3 TLS config options 2016-08-22 22:17:55 -05:00
Timothy St. Clair 49b7ebd791 Switch UT default settings to leverage etcd3.v3client 2016-08-22 22:17:55 -05:00
Kubernetes Submit Queue 5f7c02c40c Merge pull request #30753 from feiskyer/sandbox-name
Automatic merge from submit-queue

Kubelet: pass pod name/namespace/uid in new runtime API

First part of #30463.

Pass pod name/namespace/uid in new runtime API and change dockershim to build unique sandbox/container name based on them.

CC @yujuhong @euank @yifan-gu @kubernetes/sig-node
2016-08-22 19:41:44 -07:00
AdoHe bf66113802 fix kubectl get cluster display issue 2016-08-23 10:25:01 +08:00
Angus Salkeld c955de2ba8 Make sure the StatusCode is taken into account in DoRaw()
Currently if there is an error (not found) the error printed out
is to do with the inablity to convert an empty body into the expected json.

This patch will fill in the err correctly.

example of before (with NotFound error):
$ kubectl top node
failed to unmarshall heapster response: json: cannot unmarshal object into Go value of type []v1alpha1.NodeMetrics

Now:
$ kubectl top node
the server could not find the requested resource (get services http:heapster:)
2016-08-23 11:42:42 +10:00
lojies f5b7a6e2a3 add valid resources when args is nil 2016-08-23 09:40:57 +08:00
Tim Hockin 34bd1e391e Don't panic if the feature-gate flag was not used 2016-08-22 17:41:25 -07:00
Kubernetes Submit Queue d9533c9530 Merge pull request #29969 from ZTE-PaaS/zhangke-patch-015
Automatic merge from submit-queue

remove duplicate code in updatePodCIDR

As kl.runtimeState.podCIDR() is a sync method, need fetch lock and release lock, so we only invoke once here
2016-08-22 17:40:43 -07:00
Kubernetes Submit Queue 0babf0ed6d Merge pull request #30270 from ZJU-SEL/fix-minor-mistakes
Automatic merge from submit-queue

fix minor mistakes

<!--
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.
-->

Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2016-08-22 17:40:39 -07:00
Kubernetes Submit Queue 6a1c63fd37 Merge pull request #30857 from better0332/master
Automatic merge from submit-queue

fix FakeNodeHandler List()
2016-08-22 17:40:34 -07:00
Kubernetes Submit Queue b569a8daa9 Merge pull request #31053 from justinsb/dont_close_over_range_loops
Automatic merge from submit-queue

Avoid closing over range variables
2016-08-22 17:40:25 -07:00
Kubernetes Submit Queue 54ca389012 Merge pull request #30802 from MHBauer/ensure-mounter
Automatic merge from submit-queue

ensure pkg/util/mount compiles & crosses

<!--  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**:
osx doesn't build
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #30795

**Special notes for your reviewer**:

**Release note**:
```release-note-none
```

 - move compile time check from linux code to generic code
 - remove duplication of #30724 and #30666 to resolve #30795
2016-08-22 17:40:16 -07:00
Quintin Lee 2be0b40c55 Actually link in ImagePolicyWebhook and run initialization. 2016-08-22 16:54:03 -07:00
Tobias Schmidt 12c248315f Filter internal Kubernetes labels from Prometheus metrics
Kubernetes uses Docker labels as storage for some internal labels. The
majority of these labels are not meaningful metric labels and a few of
them are even harmful as they're not static and cause wrong aggregation
results.

This change provides a custom labels func to only attach meaningful
labels to cAdvisor exported metrics.
2016-08-22 19:44:27 -04:00
Pengfei Ni df00ec0c79 Kubelet: implement GetNetNS for new runtime api 2016-08-23 07:44:15 +08:00
Matt Liggett d82a5914da Re-run hack/update-all 2016-08-22 16:38:00 -07:00
Matt Liggett c86b84ccc0 Add /eviction subresource.
This is for #12611.
2016-08-22 16:38:00 -07:00
Pengfei Ni 9bfa37f2ae Kubelet: pass pod name/namespace/uid to runtimes 2016-08-23 07:33:15 +08:00
Kubernetes Submit Queue 5f9f8cc42c Merge pull request #30419 from quinton-hoole/2016-08-10-federated-ingress-controller
Automatic merge from submit-queue

Federated Ingress Controller

Based on new federated controller libraries. 

cc @kubernetes/sig-cluster-federation @mfanjie @nikhiljindal @mwielgus @mml @madhusudancs FYI
2016-08-22 15:26:53 -07:00
Minhan Xia ec5699e451 clean up oldIptablesMasqueradeMark 2016-08-22 15:05:13 -07:00
Kubernetes Submit Queue a6d37f7ead Merge pull request #30951 from caesarxuchao/increase-gc-resync-period
Automatic merge from submit-queue

[GarbageCollector] Garbage collector doesn't need to resync

ref https://github.com/kubernetes/kubernetes/issues/30759#issuecomment-240904817

Perhaps this is going to help controller manager's CPU consumption. 

@wojtek-t
2016-08-22 14:14:51 -07:00
Tim Hockin f77576bc2b Capitalize feature gates
Also rename variables for clarity
2016-08-22 13:57:35 -07:00
Tim Hockin 6c75bd8be5 Make 'allAlpha' a special feature gate
Rather than making all caller check both allAlpha and their own flag, make
allAlpha set the alpha gates explicitly, iff they were not already set.
2016-08-22 13:57:35 -07:00
Kubernetes Submit Queue 7bd8d7d0c2 Merge pull request #30843 from hongchaodeng/tls
Automatic merge from submit-queue

etcd3 backend: support TLS

What?
Support TLS in etcd3 storage backend.
It works the same as previous etcd2 config.

- [ ] Blocked on #https://github.com/kubernetes/kubernetes/pull/30480
2016-08-22 13:33:24 -07:00
Quinton Hoole 97d6494c41 Add Federated Ingress Controller. 2016-08-22 12:59:54 -07:00
Mike Danese 5af42f6380 autogenerated 2016-08-22 11:46:01 -07:00
Mike Danese 9f379df76b add an option to controller-manager to auto approve all CSRs 2016-08-22 11:46:01 -07:00
Chao Xu 67b7c7290a Allow per-resource default garbage collection behavior 2016-08-22 11:37:04 -07:00
Chao Xu 10a4e912a8 gc never resync 2016-08-22 11:32:37 -07:00
derekwaynecarr f40c1a7097 Fix quota constraints func for pvc 2016-08-22 14:18:15 -04:00
derekwaynecarr 04bf2acfc5 Fix quota constraints func for services 2016-08-22 14:17:56 -04:00
Kubernetes Submit Queue 119c0028ee Merge pull request #30904 from rootfs/cinder-prov2
Automatic merge from submit-queue

support storage class in Cinder provisioner

replace #30876

@kubernetes/sig-storage @jsafrane
2016-08-22 11:06:45 -07:00
Kubernetes Submit Queue 969ce77757 Merge pull request #30121 from feiskyer/kuberuntime-getpods
Automatic merge from submit-queue

Kubelet: implement GetPods for new runtime API

Implement GetPods for kuberuntime. Part of #28789 .

CC @yujuhong @Random-Liu
2016-08-22 10:24:23 -07:00
Kubernetes Submit Queue bfafb6f425 Merge pull request #30695 from krancour/manage-elb-attributes
Automatic merge from submit-queue

AWS: More ELB attributes via service annotations

Replaces #25015 and addresses all of @justinsb's feedback therein. This is a new PR because I was unable to reopen #25015 to amend it.

I noticed recently that there is existing (but undocumented) precedent for the AWS cloud provider to manage ELB-specifc load balancer configuration based on service annotations.  In particular, one can _already_ designate an ELB as "internal" or enable PROXY protocol.

This PR extends this capability to the management of ELB attributes, which includes the following items:
* Access logs:
    * Enabled / disabled
    * Emit interval
    * S3 bucket name
    * S3 bucket prefix
* Connection draining:
    * Enabled / disabled
    * Timeout
* Connection:
    * Idle timeout
* Cross-zone load balancing:
    * Enabled / disabled

Some of these are possibly more useful than others.  Use cases that immediately come to mind:

* Enabling cross-zone load balancing is potentially useful for "Ubernetes Light," or anyone otherwise attempting to spread worker nodes around multiple AZs.
* Increasing idle timeout is useful for the benefit of anyone dealing with long-running requests. An example I personally care about would be git pushes to Deis' builder component.
2016-08-22 10:24:12 -07:00
Xing Zhou 48100f7117 Fixed two issues of kubectl bosh completion.
This patch includes the fix of the following issue:
• Correct the method invocation from "__kubectl_namespace_flag"
  to "__kubectl_override_flags"
• Support bash completion if "--namespace=xxx" style flags are
  specified in the kubectl command

Fixes #31134
2016-08-23 01:13:38 +08:00
Michael Fraenkel d7d1bd592d Add ScaleExpansion to client v1.4 2016-08-22 09:58:28 -04:00
Jan Safranek a596668de7 Add constants and documentation aroung AWS magic numbers
Also, remove check for IOPS per GB, AWS checks it on its own.
2016-08-22 15:30:47 +02:00
Huamin Chen 259bce370e support storage class in Cinder provisioner
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-08-22 09:28:29 -04:00
Kubernetes Submit Queue cfe7a4391a Merge pull request #31060 from rata/secret-configmap-file-mode
Automatic merge from submit-queue

Fix coding style

cc @pmorie

**What this PR does / why we need it**: Fixes case on a variable name, it's simple and adjust the code to the coding style.

**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`. 
-->
```NONE
```
2016-08-22 06:19:47 -07:00
Kubernetes Submit Queue 2b8e95624a Merge pull request #30881 from deads2k/impersonate-user-extra
Automatic merge from submit-queue

Impersonate user extra

Second commit builds on https://github.com/kubernetes/kubernetes/pull/30803.

This adds a restriction to `user.Info.Extra`, keys must be lower case.  This is because HTTP headers are case insensitive, so we can't be sure that we'll get the right case through proxies or even Go (the go library capitalizes after dashes).  I don't think anyone is using them, if they are, they'll need to update to properly plumb through an impersonation flow.

@kubernetes/sig-auth 
@ericchiang since you have background here.
2016-08-22 06:19:38 -07:00
Michail Kargakis 51a894e616 kubectl: display ready replicas in 'get {rs,rc}' 2016-08-22 15:12:14 +02:00
Wojciech Tyczynski 2804055978 Avoid sorting List when unnecessary 2016-08-22 15:07:17 +02:00
Wojciech Tyczynski 3cfd3c236c Support UnsortedList() in auto-generated sets. 2016-08-22 15:05:37 +02:00
Kubernetes Submit Queue 2376db0e6e Merge pull request #31047 from liggitt/close-websocket-streaming
Automatic merge from submit-queue

Close websocket stream when client closes

Same problem as #30736, but for websocket streaming
2016-08-22 04:59:23 -07:00
deads2k 432e6ecdae allow impersonating user.Info.Extra 2016-08-22 07:43:52 -04:00
Kubernetes Submit Queue d12efc4702 Merge pull request #31044 from caesarxuchao/fix-ratelimiter-gc
Automatic merge from submit-queue

[GarbageCollector] Make Rate Limiter registration more efficient in GC

<!--  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**:
Decrease the CPU consumption of the garbage collector

**Which issue this PR fixes** 
#30759

**Special notes for your reviewer**:
I observed dramatic improvement (dropped from 0.8cpu to 0.3cpu) in load test.

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



@wojtek-t @lavalamp @gmarek
2016-08-22 04:17:03 -07:00
Kubernetes Submit Queue 1e5a5a2eac Merge pull request #30976 from wojtek-t/validated_selector
Automatic merge from submit-queue

	Don't validate selector that is already validated

Ref #30875

@timothysc
2016-08-22 03:34:44 -07:00
Kubernetes Submit Queue e29f1e2d11 Merge pull request #30948 from lavalamp/fix
Automatic merge from submit-queue

Do not hold the lock for a long time

Followup to #30839.

I'm not convinced this is a super great idea but I'll throw it out and let others decide.

Ref https://github.com/kubernetes/minikube/issues/368
Ref #30759
2016-08-22 02:50:19 -07:00
Wojciech Tyczynski 0459574450 Revert "Use netlink.SetPromiscOn instead of iproute2 command" 2016-08-22 10:28:11 +02:00
Kubernetes Submit Queue 364d696fd5 Merge pull request #30563 from knarz/master
Automatic merge from submit-queue

AWS: Support HTTP->HTTP mode for ELB

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

Right now it is not possible to create an AWS ELB that listens for HTTP and where the backend pod also listens for HTTP.
I asked @justinsb in slack and he said that this seems to be an oversight, so I'd like to use this PR as a step towards solving this.

**Special notes for your reviewer**:

I've only added a simple unit test. Are any integration tests needed? I'm not familiar with the code base.

cc @therc
2016-08-22 00:54:44 -07:00
Kubernetes Submit Queue 5b5a4145da Merge pull request #30821 from ardnaxelarak/21076_change_isEmpty_to_Empty
Automatic merge from submit-queue

Rename IsEmpty to Empty

addresses #21076
2016-08-22 00:54:28 -07:00
Wojciech Tyczynski e9d5be628a Don't validate selector that is already validated 2016-08-22 09:39:32 +02:00
Wojciech Tyczynski 42aee3ac5e Allow for selector creation without validation 2016-08-22 09:39:32 +02:00
Kubernetes Submit Queue ada5669c7f Merge pull request #30346 from dshulyak/promisc
Automatic merge from submit-queue

Use netlink.SetPromiscOn instead of iproute2 command

Depends on https://github.com/vishvananda/netlink/pull/157
Related https://github.com/kubernetes/kubernetes/issues/26093
2016-08-21 23:34:21 -07:00
Tim St. Clair 293770ef31
AppArmor PodSecurityPolicy implementation 2016-08-21 23:10:45 -07:00
Kubernetes Submit Queue 52b3ef6f9c Merge pull request #30722 from timstclair/aa-validation
Automatic merge from submit-queue

Validate AppArmor annotations in the API server

This is important because it applies the same validation to the annotations that we would eventually want for the AppArmor fields, which will smooth the upgrade path.

/cc @pmorie @pweil- @jfrazelle @vishh
2016-08-21 22:55:04 -07:00
Hongchao Deng 77ffae128e add boilerplate 2016-08-21 21:45:36 -07:00
Kubernetes Submit Queue a316e6def2 Merge pull request #30880 from markturansky/add_encryption
Automatic merge from submit-queue

Add encryption to EBS dynamic provisioner

Resolves https://github.com/kubernetes/kubernetes/issues/30792

Adds encryption to the EBS cloud provider and provisioner.

Follow up to #29006 (all commits but the one in this PR will drop out).

@kubernetes/sig-storage 


```release-note
```
2016-08-21 21:29:55 -07:00
Hongchao Deng 41d14d665e fix 2016-08-21 21:08:16 -07:00
Tim St. Clair 839034b46b
Validate AppArmor annotations in the API server 2016-08-21 20:59:11 -07:00
Tim St. Clair f94df59791
Remove apparmor dependency on pkg/kubelet/lifecycle 2016-08-21 20:59:11 -07:00
Pengfei Ni e3e10ddf8a Kubelet: implement GetPods for kuberuntime 2016-08-22 10:59:05 +08:00
Kubernetes Submit Queue 5b6e1c37c6 Merge pull request #29481 from kargakis/available-replicas-on-replica-sets
Automatic merge from submit-queue

Add readyReplicas to replica sets

@bgrant0607 for the api changes

@bprashanth for the controllers changes

@deads2k fyi
2016-08-21 19:44:50 -07:00
Morgan Bauer 92a043e833
ensure pkg/util/mount compiles & crosses
- move compile time check from linux code to generic code
2016-08-21 17:47:24 -07:00
Kubernetes Submit Queue 0039d75dd0 Merge pull request #30896 from mfojtik/add-get
Automatic merge from submit-queue

Add Get() to cache listers

@kargakis @deads2k  PTAL
2016-08-21 17:31:26 -07: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 1def4a0458 Merge pull request #30690 from wongma7/claimref-capacity
Automatic merge from submit-queue

Don't bind pre-bound pvc & pv if size request not satisfied

as discussed briefly here https://github.com/kubernetes/kubernetes/pull/30522 , volume size ought to be verified before binding a pv & pvc regardless of what's in the pv's claimRef. @thockin
2016-08-21 16:02:14 -07:00
Hongchao Deng 6e4f80909d unit test for tls of etcd3 2016-08-21 15:59:51 -07:00
Hongchao Deng 014ad63111 etcd3 backend: support TLS 2016-08-21 15:59:51 -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
Kubernetes Submit Queue d1ed6f598f Merge pull request #30614 from AdoHe/run_pull_policy
Automatic merge from submit-queue

kubectl run add pull-policy flag to control image pull policy

```release-note
Add support for --image-pull-policy to 'kubectl run'
```

Fix #30493 
@pwittrock @thockin ptal
2016-08-21 14:04:15 -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 5a98379bca Merge pull request #29696 from brendandburns/kubecfg
Automatic merge from submit-queue

Add initial support for TokenFile to to the client config file.

@smarterclayton @deads2k @cjcullen @krousey 

Part of the fix for #28260
2016-08-21 11:18:21 -07:00
Jordan Liggitt 6483f55733
Close websocket stream when client closes 2016-08-21 13:38:47 -04: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 a956dd1c25 Merge pull request #25524 from AdoHe/kubectl_reorg
Automatic merge from submit-queue

update kubectl help output for better organization

## Pull Request Guidelines

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
1. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
1. 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
* Use the release-note-* labels to set the release note state 
* Clear this block to use the PR title as the release note 
-OR-
* Enter your extended release note here
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-08-21 09:08:56 -07:00
Kubernetes Submit Queue 6dabf60114 Merge pull request #29919 from tmrts/kubelet-rkt-cri/container-api
Automatic merge from submit-queue

Kubelet rkt CRI stubs & fakes

Adds stubs for CRI interfaces and creates a fake for `ContainerRuntime` interface
2016-08-21 07:14:03 -07:00
Michail Kargakis 46291d51df api: generated code for readyReplicas 2016-08-21 15:47:23 +02:00
Kubernetes Submit Queue 00a474a108 Merge pull request #31020 from mikedanese/ds-taint
Automatic merge from submit-queue

daemonset controller should respect taints

cc @dchen1107 @davidopp
2016-08-21 06:30:44 -07:00