Commit Graph

11673 Commits (c5df0bf23e54838cbd5b78cea819423cd7adf4ee)

Author SHA1 Message Date
k8s-merge-robot 4f9e8729bf Merge pull request #23800 from resouer/image-refactor
Automatic merge from submit-queue

Refactor image related functions to use docker engine-api

ref #23563 

Hopes can do some help, cc @Random-Liu 

If it's ok, will add more work here.
2016-04-23 20:01:41 -07:00
k8s-merge-robot 30891c7f3f Merge pull request #24496 from euank/rkt-finished-at
Automatic merge from submit-queue

rkt: Return `FinishedAt` for pod

This is implemented via touching a file on stop as a hook in the systemd
unit. The ctime of this file is then used to get the `finishedAt` time
in the future.
In addition, this changes the `startedAt` and `createdAt` to use the api
server's results rather than the annotations it previously used.

It's possible we might want to move this into the api in the future.

Fixes #23887


I did the following manual testing:
```
$ cat ./examples/output/exit-output.yml 
apiVersion: v1
kind: Pod
metadata:
  labels:
    name: exit
  name: exit-output
spec:
  restartPolicy: Never
  containers:
    - name: exit
      image: busybox
      command: ["sh", "-c", "echo Exiting in 60; sleep 60; echo goodbye"]
$ kubectl create -f ./examples/exit/exit-output.yaml
$ # wait
$ kubectl describe pod exit-output | grep State -A 4
    State:		Terminated
      Reason:		Completed
      Exit Code:	0
      Started:		Tue, 19 Apr 2016 13:23:13 -0700
      Finished:		Tue, 19 Apr 2016 13:24:13 -0700
$ kubectl logs exit-output
Exiting in 60
goodbye
```

I double checked as well that the file at `/var/lib/kubelet/pods/$id/finished-$id` existed and looked as expected.

This is related to https://github.com/coreos/rkt/issues/1789#issuecomment-207111814 and follows https://github.com/kubernetes/kubernetes/pull/24367 + https://github.com/coreos/rkt/issues/2445

cc @jonboulle @iaguis @yifan-gu @kubernetes/sig-node
2016-04-23 18:29:07 -07:00
k8s-merge-robot 0d4b039d87 Merge pull request #24474 from deads2k/fix-version-registration
Automatic merge from submit-queue

stop changing the root path of the root webservice

We shouldn't mutate the root path of the root webservice (see usage).  Just write the path we want.
2016-04-23 17:51:56 -07:00
k8s-merge-robot ea15d792a1 Merge pull request #24470 from deads2k/shared-cache-02
Automatic merge from submit-queue

update controllers watching all pods to share an informer

This plumbs the shared pod informer through the various controllers to avoid duplicated watches.
2016-04-23 17:18:47 -07:00
k8s-merge-robot f583174d76 Merge pull request #24421 from deads2k/fix-admission
Automatic merge from submit-queue

let admission plugins indicate they want nothing

An admission plugin can return `nil, nil` for construction.  This is useful for dealing with cases where the `config` passed to you effectively means, "no work".  The calling code already handles this.

@derekwaynecarr
2016-04-23 12:04:19 -07:00
k8s-merge-robot de9c1a2a51 Merge pull request #24247 from sdminonne/service_loadbalancer_quotas
Automatic merge from submit-queue

Adding loadBalancer services to quota system

@derekwaynecarr follow up to #22154.
2016-04-23 10:22:45 -07:00
Harry Zhang a3939473d3 Refactor PullImage RemoveImage methods
Refactor image remove
2016-04-23 10:33:47 -04:00
Harry Zhang 3918eee5bf Refactor InspectImage method 2016-04-23 16:37:15 +08:00
Harry Zhang 7ecb44fe16 Refactor list image to use new api 2016-04-23 16:37:15 +08:00
k8s-merge-robot 2ec908083b Merge pull request #24674 from gmarek/maxpods
Automatic merge from submit-queue

Enforce --max-pods in kubelet admission; previously was only enforced in scheduler

This is an ugly hack - I spent some time trying to understand what one NodeInfo has in common with the other one, but at some point decided that I just don't have time to do that.

Fixes #24262
Fixes #20263

cc @HaiyangDING @lavalamp
2016-04-22 23:00:20 -07:00
Euan Kemp a6718f5969 rkt: Implement pod `FinishedAt`
This is implemented via touching a file on stop as a hook in the systemd
unit. The ctime of this file is then used to get the `finishedAt` time
in the future.
In addition, this changes the `startedAt` and `createdAt` to use the api
server's results rather than the annotations it previously used.

It's possible we might want to move this into the api in the future.

Fixes #23887
2016-04-22 15:34:55 -07:00
gmarek e0712f7e57 Fix MaxPods feature in scheduler 2016-04-22 22:49:50 +02:00
k8s-merge-robot aa4da07157 Merge pull request #24631 from goltermann/spell
Automatic merge from submit-queue

Fix a few typos in comments
2016-04-22 09:45:46 -07:00
k8s-merge-robot 88a68e99f3 Merge pull request #24390 from smarterclayton/byte_slice
Automatic merge from submit-queue

Default conversion for byte slices is incorrect

Nil slices are getting allocated, which is incorrect and changes
behavior in some cases.

   []byte(nil) -> []byte(nil)

@wojtek-t
2016-04-22 07:07:32 -07:00
k8s-merge-robot 66dc446ba0 Merge pull request #24347 from derekwaynecarr/fix_configmap
Automatic merge from submit-queue

Fix ConfigMapList.Items to not use omitempty

Fixes https://github.com/kubernetes/kubernetes/issues/24335
2016-04-22 04:07:44 -07:00
k8s-merge-robot 10e697d1f9 Merge pull request #24638 from hongchaodeng/w
Automatic merge from submit-queue

etcd3/watcher: cancelling context shouldn't return error

Fixes #24528
2016-04-22 01:50:18 -07:00
k8s-merge-robot 495251b983 Merge pull request #24166 from gmarek/client
Automatic merge from submit-queue

All clients under ClientSet share one RateLimiter.

Currently we create a rate limiter for each client in client set. It makes the reasoning about rate limiting behavior much harder. This PR changes this behavior and now all clients in the set share single rate limiter. Ref. #24157

cc @lavalamp @wojtek-t
2016-04-21 22:31:23 -07:00
Hongchao Deng b0f4517e65 etcd3/watcher: cancelling context shouldn't return error 2016-04-22 12:23:04 +08:00
k8s-merge-robot 06c2db4fe2 Merge pull request #23907 from Random-Liu/all-but-image-related-functions
Automatic merge from submit-queue

Kubelet: Refactor all but image related functions in DockerInterface

For #23563.
Based on #23699 and #23844.

Only last 3 commits are new. This PR refactored all functions except image related functions, including:
* CreateExec
* StartExec
* InspectExec
* AttachToContainer
* Logs
* Info
* Version

@kubernetes/sig-node
2016-04-21 20:57:38 -07:00
k8s-merge-robot f4beccf000 Merge pull request #23066 from cjcullen/clientplugin
Automatic merge from submit-queue

Client auth provider plugin framework

Allows client plugins to modify the underlying transport to, for example, add custom authorization headers.
2016-04-21 17:30:28 -07:00
k8s-merge-robot 06160b6abe Merge pull request #22023 from mkulke/rackspace-improvements
Automatic merge from submit-queue

Rackspace improvements (OpenStack Cinder)

This adds PV support via Cinder on Rackspace clusters. Rackspace Cloud Block Storage is pretty much vanilla OpenStack Cinder, so there is no need for a separate Volume Plugin. Instead I refactored the Cinder/OpenStack interaction a bit (by introducing a CinderProvider Interface and moving the device path detection logic to the OpenStack part).

Right now this is limited to `AttachDisk` and `DetachDisk`. Creation and deletion of Block Storage is not in scope of this PR.

Also the `ExternalID` and `InstanceID` cloud provider methods have been implemented for Rackspace.
2016-04-21 16:38:13 -07:00
k8s-merge-robot e3dab39df0 Merge pull request #21304 from tobad357/iscsi-mpio-support
Automatic merge from submit-queue

Add mpio support for iscsi

This allows the iscsi volume to check if a iscsi device belongs to a mpio device
If it does belong to the device then we make sure we mount the mpio device instead of
the raw device. 
The code is based on the current FibreChannel volume support for mpio

example
/dev/disk/by-path/iqn-example.com.2999 -> /dev/sde
Then we check
/sys/block/[dm-X]/slaves/xx
until we find the [dm-X] containing /dev/sde and mount it

Additional work that can be done in future
1. Add multiple portal support to iscsi
2. Move the FibreChannel volume provider to use the code that has been extracted
2016-04-21 15:40:50 -07:00
goltermann dddc6cb6c8 Fix a few spellings. 2016-04-21 15:16:42 -07:00
k8s-merge-robot 34fc7f0401 Merge pull request #24461 from wojtek-t/enable_components_to_use_protobufs
Automatic merge from submit-queue

Allow components to use protobufs while talking to apiserver.
2016-04-21 12:46:17 -07:00
k8s-merge-robot 72e51dacfe Merge pull request #24034 from AdoHe/log_spam
Automatic merge from submit-queue

remove log spam from nodecontroller

@thockin @quinton-hoole ptal.
2016-04-21 12:11:05 -07:00
k8s-merge-robot 9d4eee63ab Merge pull request #24589 from derekwaynecarr/fix_shm
Automatic merge from submit-queue

docker daemon complains SHM size must be greater than 0

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

I am hitting this on Fedora 23 w/ docker 1.9.1 using systemd cgroup-driver.

```
$ docker version
Client:
 Version:         1.9.1
 API version:     1.21
 Package version: docker-1.9.1-9.gitee06d03.fc23.x86_64
 Go version:      go1.5.3
 Git commit:      ee06d03/1.9.1
 Built:           
 OS/Arch:         linux/amd64

Server:
 Version:         1.9.1
 API version:     1.21
 Package version: docker-1.9.1-9.gitee06d03.fc23.x86_64
 Go version:      go1.5.3
 Git commit:      ee06d03/1.9.1
 Built:           
 OS/Arch:         linux/amd64
```

Not sure why I am on the only one hitting it right now, but putting this out here for comment.

/cc @kubernetes/sig-node @kubernetes/rh-cluster-infra @smarterclayton
2016-04-21 12:11:03 -07:00
Random-Liu d981fee2ee Refactor Info and Version. 2016-04-21 12:02:50 -07:00
k8s-merge-robot 145917368a Merge pull request #24398 from caesarxuchao/fqresource-fake-client
Automatic merge from submit-queue

Make fake client actions use fully qualified resource

The output of a versioned clientset is version object. The fake client used to assume only internal objects will be returned. This PR removes this assumption by making fake actions initialized with a fully qualified resource instead of a resource string.

We have to regenerate fake clients in release_1_2 clientset to let it compile. For the test fakes, we are breaking the backwards compatibility promise.

Part of #24155.
2016-04-21 10:45:32 -07:00
gmarek b76bed0cc9 All clients under ClientSet share one RateLimiter. 2016-04-21 18:48:22 +02:00
derekwaynecarr cbf1cb81a9 SHM size must be greater than 0 2016-04-21 11:45:28 -04:00
Clayton Coleman 9ec92559e5 Merge pull request #24594 from wojtek-t/fix_protobuf_verifier
Fix verification script for proto-generation
2016-04-21 11:31:09 -04:00
k8s-merge-robot 85de6acadc Merge pull request #23208 from deads2k/fix-version-override
Automatic merge from submit-queue

make storage enablement, serialization, and location orthogonal

This allows a caller (command-line, config, code) to specify multiple separate pieces of config information regarding storage and have them properly composed at runtime.  The information provided is exposed through interfaces to allow alternate implementations, which allows us to change the expression of the config moving forward.  I also fixed up the types to be correct as I moved through.

The same options still exist, but they're composed slightly differently
 1. specify target etcd servers per Group or per GroupResource
 1. specify storage GroupVersions per Groups or per GroupResource
 1. specify etcd prefixes per GroupVersion or per GroupResource
 1. specify that multiple GroupResources share the same location in etcd
 1. enable GroupResources by GroupVersion or by GroupResource whitelist or GroupResource blacklist

The `storage.Interface` is built per GroupResource by:
 1. find the set of possible storage GroupResource based on the priority list of cohabitators
 1. choose a GroupResource from the set by looking at which Groups have the resource enabled
 1. find the target etcd server, etcd prefix, and storage encoding based on the GroupResource

The API server can have its resources separately enabled, but for now I've kept them linked.

@liggitt I think we need this (or something like it) to be able to go from config to these interfaces.  Given another round of refactoring, we may be able to reshape these to be more forward driving.

@smarterclayton this is important for rebasing and for a seamless 1.2 to 1.3 migration for us.
2016-04-21 08:24:29 -07:00
Wojciech Tyczynski 3f06755566 Regenerate protobuf files 2016-04-21 16:22:52 +02:00
deads2k 60fe17d338 update resource quota controller for shared informers 2016-04-21 08:20:39 -04:00
deads2k 8c4e3af1a3 switch job controller to shared informer 2016-04-21 08:20:39 -04:00
deads2k 8b707016f9 convert daemonset controller to SharedInformer 2016-04-21 08:20:39 -04:00
k8s-merge-robot 0a5d57a383 Merge pull request #24079 from hongchaodeng/comp
Automatic merge from submit-queue

etcd3 store: provide compactor util

What's this PR?
- Provides a util to compact keys in etcd.

Reason:
We want to save the most recent 10 minutes event history. It should be more than enough for slow watchers. It is not number based, so it can tolerate event bursts too. We do not want to save longer since the current storage API cannot take advantage of the multi-version key yet. We might keep a longer history in the future.
2016-04-21 05:19:54 -07:00
deads2k 6670b73b18 make storage enablement, serialization, and location orthogonal 2016-04-21 08:18:55 -04:00
Wojciech Tyczynski 31e2f8e485 Regenerate files 2016-04-21 14:12:13 +02:00
Wojciech Tyczynski d6896fa45a Allow setting content-type in binaries 2016-04-21 14:12:13 +02:00
k8s-merge-robot 767fa6913d Merge pull request #24118 from smarterclayton/proxy_args
Automatic merge from submit-queue

Allow Proxy to be initialized with store
2016-04-21 04:42:43 -07:00
k8s-merge-robot 09adffb318 Merge pull request #23317 from aanm/removing-ipv4-enforcement
Automatic merge from submit-queue

Remove requirement that Endpoints IPs be IPv4

Signed-off-by: André Martins <aanm90@gmail.com>

Release Note: The `Endpoints` API object now allows IPv6 addresses to be stored.  Other components of the system are not ready for IPv6 yet, and many cloud providers are not IPv6 compatible, but installations that use their own controller logic can now store v6 endpoints.
2016-04-21 03:34:50 -07:00
kulke ba4d74f3c7 Added Block Storage support to Rackspace provider, improved Node discovery. 2016-04-21 10:31:37 +02:00
derekwaynecarr fd04ff1bd1 Generated artifacts for ConfigMapList change 2016-04-21 02:07:45 -04:00
derekwaynecarr 155c1a4465 ConfigMapList.Items should not be omitempty 2016-04-21 02:07:45 -04:00
Clayton Coleman 6ab9cfcc39 Generate protobuf marshallers for new apps group 2016-04-21 01:39:50 -04:00
Chao Xu 8537095415 use fully qualified resource in fake clients actions 2016-04-20 19:44:40 -07:00
k8s-merge-robot f8d4f6157f Merge pull request #24570 from hongchaodeng/w
Automatic merge from submit-queue

watcher test: print more info for debugging

ref: #24528

This will print out more info to dig out the root cause.
2016-04-20 19:01:10 -07:00
Prashanth Balasubramanian 0ac10c6cc2 PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00
k8s-merge-robot cee4273e43 Merge pull request #24374 from smarterclayton/proto_default_on
Automatic merge from submit-queue

Enable protobuf compilation by default

Enables protobuf compilation, build verification checks, and generates all initial code.

kubectl is now 47M on OSX, build time from clean on a 2014 MBP (4 core) on Go 1.6 is ~150s.

@wojtek-t
2016-04-20 18:27:26 -07:00