Commit Graph

14734 Commits (1dfd6ab0c11d95ef5d5352509c90fdab5ce4ed29)

Author SHA1 Message Date
Tim St. Clair 9bde6f0770
Add AppArmor feature gate 2016-08-25 17:40:18 -07:00
Janet Kuo 6004be15b8 Fix the bug that SJ sees finished jobs as unexpected 2016-08-25 17:01:22 -07:00
Kubernetes Submit Queue 40efde7e0a Merge pull request #31390 from hongchaodeng/fix
Automatic merge from submit-queue

return destroy func to clean up internal resources of storage

What?
Provide a destroy func to clean up internal resources of storage.
It changes **unit tests** to clean up resources. (Maybe fix integration test in another PR.)

Why?
Although apiserver is designed to be long running, there are some cases that it's not.
See https://github.com/kubernetes/kubernetes/issues/31262#issuecomment-242208771
We need to gracefully shutdown and clean up resources.
2016-08-25 16:44:10 -07:00
AdoHe 10440ed47d fix same node port different protocols conflict issue 2016-08-26 07:36:45 +08:00
Tim St. Clair a5b7212453
Promote AppArmor annotations to beta 2016-08-25 15:40:32 -07:00
Jeff Mendoza 95b73058d2 Removed non-md files from docs. Moved doc yamls to test/fixtures.
Most of the contents of docs/ has moved to kubernetes.github.io.
Development of the docs and accompanying files has continued there, making
the copies in this repo stale. I've removed everything but the .md files
which remain to redirect old links. The .yaml config files in the docs
were used by some tests, these have been moved to test/fixtures/doc-yaml,
and can remain there to be used by tests or other purposes.
2016-08-25 15:09:27 -07:00
Yifan Gu de402ac2c5 rkt: Force `rkt fetch` to fetch from remote to conform the fetch policy. 2016-08-25 14:44:44 -07:00
Yu-Ju Hong a072bda6fd Print out resource name when evicting pods 2016-08-25 14:11:21 -07:00
Kubernetes Submit Queue 75fba4c953 Merge pull request #31445 from pmorie/goroutinemap-godoc
Automatic merge from submit-queue

Improve godoc for goroutinemap

Improves the godoc of goroutinemap; found while preparing to use this type in another PR.

@saad-ali
2016-08-25 14:07:08 -07:00
Kubernetes Submit Queue df54a28361 Merge pull request #29216 from mtaufen/kconf-refactor
Automatic merge from submit-queue

Refactor to simplify the hard-traveled path of the KubeletConfiguration object

### There are two main goals of this PR:
- Make `NewMainKubelet` take `KubeletConfiguration` and `KubeletDeps` as its only arguments.
- Finally eliminate the legacy `KubeletConfig` type.

### Why am I doing this?
Long story short, I started adding an endpoint to the Kubelet to display the *current* config that the Kubelet was running with, and I realized a few things:
- There were so many transformations to the configuration, in so many different places, before it was used that I wasn't confident the values initially passed in on the `KubeletConfiguration` would be the correct values to report by the time someone used the endpoint to check on them.
- Trying to reconstruct a `KubeletConfiguration` object from a mix of the `Kubelet` object and the legacy `KubeletConfig` object would just add to the mess (not to mention maintenance burden), and it would be much easier if we passed the `KubeletConfiguration` all the way down to where we construct the `Kubelet` object, and then just store a reference to the `KubeletConfiguration` object on the `Kubelet` for later retrieval. 
- My hope is that by eliminating unnecessary internal transformations to the config information, and by consolidating the remaining ones in a single place (`NewMainKubelet`), we can have a much clearer understanding of what happens to the config before it makes it to the `Kubelet` object, and also a better ability to report up-to-date information on the status of the Kubelet. 

So I started cleaning things up :-). 

### Discussion points

It was relatively simple to get `NewMainKubelet` to just take the legacy `KubeletConfig` as its only argument, because most of its arguments were just passing through `KubeletConfig` fields or passing information that was generated solely from `KubeletConfig` fields.

Completely eliminating the legacy `KubeletConfig` type has been more difficult, because the fields of the `KubeletConfiguration` do not have a one-to-one relationship with the fields of the `KubeletConfig`. While I was able to eliminate many of the `KubeletConfig` fields, I'm starting to get into the nontrivial stuff and I'd like to get a discussion started on what should happen with the remaining fields (pending cherry-picking notwithstanding). 

On my `kconf-refactor` branch, the legacy `KubeletConfig` object is down to the following 27 fields (from the initial 93). I'd really appreciate any guidance people have on what should happen with these fields.
```
type KubeletConfig struct {
	Auth                    server.AuthInterface
	AutoDetectCloudProvider bool
	Builder                 KubeletBuilder
	CAdvisorInterface       cadvisor.Interface
	Cloud                   cloudprovider.Interface
	ContainerManager        cm.ContainerManager
	DockerClient            dockertools.DockerInterface
	EventClient             *clientset.Clientset
	Hostname                string
	HostNetworkSources      []string
	HostPIDSources          []string
	HostIPCSources          []string
	KubeClient              *clientset.Clientset
	Mounter                 mount.Interface
	NetworkPlugins          []network.NetworkPlugin
	NodeName                string
	OOMAdjuster             *oom.OOMAdjuster
	OSInterface             kubecontainer.OSInterface
	PodConfig               *config.PodConfig
	Recorder                record.EventRecorder
	Reservation             kubetypes.Reservation
	TLSOptions              *server.TLSOptions
	Writer                  kubeio.Writer
	VolumePlugins           []volume.VolumePlugin
	EvictionConfig          eviction.Config
	ContainerRuntimeOptions []kubecontainer.Option
	Options                 []Option
}
```

The patterns I've seen so far with respect to eliminating `KubeletConfig` fields may be of some help:
- Some fields could just be eliminated, because they were either the same on `KubeletConfiguration` or just a typecast away from being the same. 
- Some fields from `KubeletConfiguration` just ended up in substructures of `KubeletConfig`; it was easy to just remove those substructure fields from `KubeletConfig` and construct them using local vars in `NewMainKubelet` instead. 
- Some fields, e.g. `Runonce`, were able to move into the `KubeletConfiguration`.


**P.S.** Part of the way I'm making the transition is by adding an extra `KubeletConfiguration` argument to functions that originally took a `KubeletConfig`, and field-by-field, switching those functions over to using information from the `KubeletConfiguration`. Once the `KubeletConfig` is gone, I'll remove the `KubeletConfig` argument, and the transition will be complete.

**Final note:**
Please try to keep in mind that this is not a general Kubelet cleanup effort, it is just me cleaning things up that are directly in the path of what I'm trying to do. Let's keep this focused on cleanup related to the path that config takes on it's way to the Kubelet.


**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`. 
-->
```
Removed Flags
- Removes the --auth-path flag. This has been deprecated in favor of --kubeconfig for two releases.
```
2016-08-25 13:17:22 -07:00
Janet Kuo 6e86a20304 Use updated deployment after rollback 2016-08-25 13:08:52 -07:00
Kubernetes Submit Queue a4665cff64 Merge pull request #31354 from janetkuo/sj-replace-e2e
Automatic merge from submit-queue

Update sj on UpdateStatus return value

Fixes #30542, #30549

cc @erictune
2016-08-25 11:56:31 -07:00
Jordan Liggitt 0deddb1a62
Do initial 0-byte write to stdout when streaming container logs 2016-08-25 14:29:22 -04:00
Jordan Liggitt ebd44347a5
Make limitWriter respect 0-byte writes until limit is reached 2016-08-25 14:27:17 -04:00
Paul Morie 1294267450 Improve godoc for goroutinemap 2016-08-25 14:25:05 -04:00
Jordan Liggitt 8b1a00b6d9
Send ping frame using specified encoding
If base-64 encoding was requested, send the ping frame as a 0-length text frame, rather than as a 0-length binary frame.
2016-08-25 14:24:59 -04:00
Kubernetes Submit Queue c63cd8fc20 Merge pull request #31396 from foxish/integer-overflow
Automatic merge from submit-queue

Fixed integer overflow bug in rate limiter.

```release-note
Fix overflow issue in controller-manager rate limiter
```

This PR fixes a bug in the delayed work-queue used by some controllers.
The integer overflow bug would previously cause hotlooping behavior after a few failures 
as `time.Duration(..)` on values larger than MaxInt64 behaves unpredictably, and 
after a certain value returns 0 always.

cc @bprashanth @pwittrock
2016-08-25 11:17:38 -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
Kubernetes Submit Queue b44b716965 Merge pull request #31248 from wojtek-t/better_selectable_fields
Automatic merge from submit-queue

Avoid unnecessary copies & allocations in field selectors
2016-08-25 09:01:44 -07:00
Hongchao Deng 9fc0e1e98d return destroy func to clean up internal resources of storage 2016-08-25 08:32:21 -07:00
Kubernetes Submit Queue 8f431e4af8 Merge pull request #31167 from caesarxuchao/gc-absent-owner-cache
Automatic merge from submit-queue

[GarbageCollector] add absent owner cache

<!--  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**:
Reducing the Request sent to the API server by the garbage collector to check if an owner exists.

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

#26120

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

Currently when processing an item in the dirtyQueue, the garbage collector issues GET to check if any of its owners exist. If the owner is a replication controller with 1000 pods, the garbage collector sends a GET for the RC 1000 times. This PR caches the owner's UID if it does not exist according to the API server. This cuts 1/3 of the garbage collection time of the density test in the gce-500 and gce-scale, where the QPS is the bottleneck.
2016-08-25 07:39:31 -07:00
Kubernetes Submit Queue 6901a00078 Merge pull request #31286 from yifan-gu/rkt_privileged
Automatic merge from submit-queue

rkt: Improve support for privileged pod (pod whose all containers are privileged) 

Fix https://github.com/kubernetes/kubernetes/issues/31100

This takes advantage of https://github.com/coreos/rkt/pull/2983 . By appending the new `--all-run` insecure-options to `rkt run-prepared` command when all the containers are privileged. The pod now gets more privileged power.
2016-08-25 06:58:43 -07:00
Kubernetes Submit Queue 4ddfc4849a Merge pull request #27180 from sttts/sysctl-implementation
Automatic merge from submit-queue

Add sysctl support

Implementation of proposal https://github.com/kubernetes/kubernetes/pull/26057, feature  https://github.com/kubernetes/features/issues/34

TODO:
- [x] change types.go
- [x] implement docker and rkt support
- [x] add e2e tests
- [x] decide whether we want apiserver validation
- ~~[ ] add documentation~~: api docs exist. Existing PodSecurityContext docs is very light and links back to the api docs anyway: 6684555ed9/docs/user-guide/security-context.md
- [x] change PodSecurityPolicy in types.go
- [x] write admission controller support for PodSecurityPolicy
- [x] write e2e test for PodSecurityPolicy
- [x] make sure we are compatible in the sense of https://github.com/kubernetes/kubernetes/blob/master/docs/devel/api_changes.md
- [x] test e2e with rkt: it only works with kubenet, not with no-op network plugin. The later has no sysctl support.
- ~~[ ] add RunC implementation~~ (~~if that is already in kube,~~ it isn't)
- [x] update whitelist
- [x] switch PSC fields to annotations
- [x] switch PSP fields to annotations
- [x] decide about `--experimental-whitelist-sysctl` flag to be additive or absolute
- [x] decide whether to add a sysctl node whitelist annotation

### Release notes:

```release-note
The pod annotation `security.alpha.kubernetes.io/sysctls` now allows customization of namespaced and well isolated kernel parameters (sysctls), starting with `kernel.shm_rmid_forced`, `net.ipv4.ip_local_port_range`, `net.ipv4.tcp_max_syn_backlog` and `net.ipv4.tcp_syncookies` for Kubernetes 1.4.

The pod annotation  `security.alpha.kubernetes.io/unsafeSysctls` allows customization of namespaced sysctls where isolation is unclear. Unsafe sysctls must be enabled at-your-own-risk on the kubelet with the `--experimental-allowed-unsafe-sysctls` flag. Future versions will improve on resource isolation and more sysctls will be considered safe.
```
2016-08-25 06:21:24 -07:00
Kubernetes Submit Queue ab8d4525bb Merge pull request #31421 from wojtek-t/fix_kubectl_scale
Automatic merge from submit-queue

Fix scale x->x in kubectl for ReplicationController

Fix #31374

This fixes problem introduced in #31051 (which in turn was fixing a different problem).

@lavalamp - FYI
2016-08-25 05:40:06 -07:00
Dr. Stefan Schimanski 03d7e33034 Run hack/update-all.sh 2016-08-25 13:22:01 +02:00
Dr. Stefan Schimanski e356e52247 Add sysctl whitelist on the node 2016-08-25 13:22:01 +02:00
Dr. Stefan Schimanski ed36baed20 Add sysctl PodSecurityPolicy support 2016-08-25 13:22:01 +02:00
Dominika Hodovska bea189e9c9 Add sysctl api, validation & Docker support 2016-08-25 13:22:01 +02:00
Kubernetes Submit Queue e4178c82f3 Merge pull request #31275 from dims/fix-issue-31219
Automatic merge from submit-queue

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-25 03:20:32 -07:00
Jedrzej Nowak 13b33e04cc added auto generated stuff 2016-08-25 12:15:35 +02:00
Jedrzej Nowak 1cc36a7c42 Fix various typos in pkg/apis 2016-08-25 11:44:59 +02:00
Wojciech Tyczynski 79d8c9754d Fix scale x->x in kubectl for ReplicationController 2016-08-25 11:44:11 +02:00
Kubernetes Submit Queue 098c999a8c Merge pull request #31246 from Clarifai/ext-svc-ref
Automatic merge from submit-queue

kubectl: display ExternalName for services

User-visible part of https://github.com/kubernetes/features/issues/33

Also add ExternalIPs in `describe`

cc @thockin @smarterclayton
2016-08-25 02:36:09 -07:00
Michail Kargakis 4c56b8cfc5 kubectl: cast notFound error to struct 2016-08-25 10:40:44 +02:00
Kubernetes Submit Queue c2f8c265b4 Merge pull request #30958 from lojies/addvalidresourceforexplain
Automatic merge from submit-queue

add valid resources when args is nil

add valid resources message is more friendly to user when running `kubectl explain`
and this also can be same with other cmd like get\describe.
2016-08-25 01:38:52 -07:00
Kubernetes Submit Queue c5e7e5124a Merge pull request #30969 from asalkeld/raw-status-code
Automatic merge from submit-queue

Make sure the StatusCode is taken into account in DoRaw()

**What this PR does / why we need it**:
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:)

**Which issue this PR fixes** 
related to bug #30818

**Special notes for your reviewer**:
None

**Release note**:
```release-note
NONE
```
2016-08-25 01:01:05 -07:00
better0332 524f0da769 fix deleteVolume
`ok` is not in same variable socpe
2016-08-25 15:26:18 +08:00
Kubernetes Submit Queue bb9523bd0f Merge pull request #31157 from pmorie/kubelet-move
Automatic merge from submit-queue

Kubelet code move: volume / util

Addresses some odds and ends that I apparently missed earlier.  Preparation for kubelet code-move ENDGAME.

cc @kubernetes/sig-node
2016-08-25 00:20:39 -07:00
mksalawa f4016bef7a Use heapster handler for pods from all namespaces. 2016-08-25 09:08:31 +02:00
Kubernetes Submit Queue bdeeb9db90 Merge pull request #31135 from xingzhou/bash_completion_bug
Automatic merge from submit-queue

Fixed two issues of kubectl bash 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-24 23:43:20 -07:00
Kubernetes Submit Queue c63f43b329 Merge pull request #31387 from hongchaodeng/docs
Automatic merge from submit-queue

etcd3 compactor: update docs

Minor fix/improvement on compactor docs.
2016-08-24 21:37:21 -07: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
Kubernetes Submit Queue b70a758980 Merge pull request #31371 from kubernetes/revert-30890-etcd3_v3client
Automatic merge from submit-queue

Revert "Enable v3 Client as the default on UTs"

Reverts kubernetes/kubernetes#30890

Fix flake problems (#31262)
2016-08-24 20:51:57 -07:00
Kubernetes Submit Queue de65e4c1e1 Merge pull request #31372 from freehan/mtufix
Automatic merge from submit-queue

fix #30376 that broken cross-build

ref: #30376
2016-08-24 19:25:45 -07:00
Anirudh 0e5a49f667 Petset hotlooping issue. 2016-08-24 19:21:47 -07:00
Anirudh 00e41888b0 Fixed integer overflow bug in rate limiter. 2016-08-24 18:55:28 -07:00
Janet Kuo 2b87b46a6f fixup 2016-08-24 17:45:35 -07:00
Janet Kuo 4bda41905c Update sj on UpdateStatus return value 2016-08-24 17:44:59 -07:00
Hongchao Deng 0b253b519e etcd3 compactor: update docs 2016-08-24 16:24:24 -07:00
Janet Kuo 1d620b545c Print to stderr when attach failed 2016-08-24 15:36:52 -07:00
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