Commit Graph

1395 Commits (ee9cded79a8a5a597efcef7404bc32a003f8ea37)

Author SHA1 Message Date
Michael Taufen e52718bbc6 Clean up API
Move SystemReserved and KubeReserved into KubeletConfiguration struct
Convert int64 to int32 for some external type fields so they match internal ones
tLS* to tls* for JSON field names
Fix dependency on removed options.AutoDetectCloudProvider
Change floats in KubeletConfiguration API to ints
2016-07-14 18:40:11 -07:00
Mike Danese e070cb617a componentconfig: add external kubelet configuration type 2016-07-14 18:38:58 -07:00
gmarek f6b1c316e9 Allow switching rate limiter inside RateLimitedQueue 2016-07-14 15:38:14 +02:00
k8s-merge-robot ae990defcf Merge pull request #26956 from joe2far/fix-typos
Automatic merge from submit-queue

Fixed several typos
2016-07-14 04:13:15 -07:00
Daniel Smith 78c02cd052 Stop eating panics 2016-07-13 11:12:59 -07:00
joe2far 5ead89b5bb Fixed several typos 2016-07-13 15:06:24 +01:00
gmarek 5677a9845e Split NodeController rate limiters between zones 2016-07-13 14:09:19 +02:00
Tim Hockin faeef5c4ae Use make as the main build tool
This allows us to start building real dependencies into Makefile.

Leave old hack/* scripts in place but advise to use 'make'.  There are a few
rules that call things like 'go run' or 'build/*' that I left as-is for now.
2016-07-12 21:52:00 -07:00
k8s-merge-robot 72f6493376 Merge pull request #27349 from resouer/delete
Automatic merge from submit-queue

Generates DELETE pod update operations

fixes #27105

Generates DELETE pod update operations  to make the code and log more intuitive.

1. main refactoring is in `kubelet/config`
2. kubelet will log if it received DELETE, just like other OPs

cc @Random-Liu :)
2016-07-12 01:04:35 -07:00
Harry Zhang 0d5dddcb71 Add DELETE event type
Signed-off-by: Harry Zhang <harryz@hyper.sh>

Combine delete with update
2016-07-12 14:08:01 +08:00
Klaus Ma b361f40009 Enable km to use local km in agent. 2016-07-07 23:39:11 +08:00
saadali 0dd17fff22 Reorganize volume controllers and manager 2016-07-01 18:50:25 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Jordan Liggitt f45d9dc2f8 Convert service account token controller to use a work queue 2016-06-27 13:01:24 -04:00
k8s-merge-robot 601173c2fe Merge pull request #26916 from caesarxuchao/podgc
Automatic merge from submit-queue

rename the gc for terminated pods to "podgc"

to avoid name collision with the [generic garbage collector](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/garbagecollector/garbagecollector.go)
2016-06-25 12:24:07 -07:00
k8s-merge-robot a9678fa4f3 Merge pull request #26716 from justinclayton/patch-1
Automatic merge from submit-queue

remove DCOS section from README.md

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

As far as I can tell, as of DCOS 1.7, the Kubernetes-Mesos framework is no longer available in the DCOS Universe. This PR reflects that change so as not to cause confusion.
2016-06-24 13:56:39 -07:00
k8s-merge-robot ee35555cb6 Merge pull request #27570 from Random-Liu/add-runtime-request-timeout-flag
Automatic merge from submit-queue

Add runtime-request-timeout kubelet flag.

XRef #23563.

Addresses https://github.com/kubernetes/kubernetes/issues/27388#issuecomment-226570083.

Add a new kubelet flag `runtime-request-timeout`, and set to 2 minutes by default.
Now the flag only affects dockertools, rkt may also want to set request timeout according to the flag. @yifan-gu 

This PR also removed the timeout for all long running operations to avoid issues like #27588 and #26122.

@yujuhong @rrati 
/cc @kubernetes/sig-node 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-21 01:26:54 -07:00
markturansky 16ec36c591 added toggle to disable dynamic provisioning 2016-06-20 01:15:23 -04:00
Random-Liu 52ebd4ecf1 Add runtime-request-timeout kubelet flag. 2016-06-17 18:18:41 -07:00
k8s-merge-robot c538106450 Merge pull request #24916 from mesosphere/jdef_fix_23822
Automatic merge from submit-queue

MESOS: fix race condition in contrib/mesos/pkg/queue/delay

attempt to fix #23822

/cc @ihmccreery
2016-06-17 03:06:22 -07:00
Chao Xu 91de14cf13 rename the gc for terminated pods to "podgc" 2016-06-07 22:10:34 -07:00
Justin Clayton b6130ca7b3 remove DCOS section from README.md
As far as I can tell, as of DCOS 1.7, the Kubernetes-Mesos framework is no longer available in the DCOS Universe. This PR reflects that change so as not to cause confusion.
2016-06-02 10:03:53 -06:00
Dr. Stefan Schimanski 9e25d9f614 Run hack/update-generated-docs.sh 2016-05-30 07:28:48 +02:00
Dr. Stefan Schimanski a79a420fde Move shell completion generation into 'kubectl completion' command 2016-05-30 07:23:36 +02:00
Justin Santa Barbara b754393630 kube-controller-manager: Add configure-cloud-routes option
This allows kube-controller-manager to allocate CIDRs to nodes (with
allocate-node-cidrs=true), but will not try to configure them on the
cloud provider, even if the cloud provider supports Routes.

The default is configure-cloud-routes=true, and it will only try to
configure routes if allocate-node-cidrs is also configured, so the
default behaviour is unchanged.

This is useful because on AWS the cloud provider configures routes by
setting up VPC routing table entries, but there is a limit of 50
entries.  So setting configure-cloud-routes on AWS would allow us to
continue to allocate node CIDRs as today, but replace the VPC
route-table mechanism with something not limited to 50 nodes.

We can't just turn off the cloud-provider entirely because it also
controls other things - node discovery, load balancer creation etc.

Fix #25602
2016-05-27 09:42:20 -04:00
k8s-merge-robot 50524c78a1 Merge pull request #20672 from brendandburns/dump
Automatic merge from submit-queue

Add a 'kubectl clusterinfo dump' option

Ref: #3500 

@bgrant0607 @smarterclayton @jszczepkowski 

Usage:
```
  # Dump current cluster state to stdout
  kubectl clusterinfo dump
  
  # Dump current cluster state to /tmp
  kubectl clusterinfo dump --output-directory=/tmp
  
  # Dump all namespaces to stdout
  kubectl clusterinfo dump --all-namespaces
  
  # Dump a set of namespaces to /tmp
  kubectl clusterinfo dump --namespaces default,kube-system --output-directory=/tmp
```

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/20672)
<!-- Reviewable:end -->
2016-05-24 14:24:17 -07:00
k8s-merge-robot 39f0c6ba25 Merge pull request #24719 from bprashanth/kubectl_tls
Automatic merge from submit-queue

Add a kubectl create secret tls command

A somewhat hasty implementation that enables progress along: https://github.com/kubernetes/kubernetes/issues/20176#issuecomment-177409516, https://github.com/kubernetes/kubernetes/issues/24669, https://github.com/kubernetes/kubernetes/issues/20176#issuecomment-198142836 if associated parties have spare cycles. @kubernetes/kubectl

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24719)
<!-- Reviewable:end -->
2016-05-22 09:40:42 -07:00
k8s-merge-robot 6224f44717 Merge pull request #25771 from sjpotter/fs-info
Automatic merge from submit-queue

kubelet/cadvisor: Refactor cadvisor disk stat/usage interfaces.

basically

1) cadvisor struct will know what runtime the kubelet is, passed in via additional argument to New()

2) rename cadvisor wrapper function to DockerImagesFsInfo() to ImagesFsInfo() and have linux implementation choose a label based on the runtime inside the cadvisor struct

2a) mock/fake/unsupported modified to take the same additional argument in New()

3) kubelet's wrapper for the cadvisor wrapper is renamed in parallel

4) make all tests use new interface
2016-05-22 03:08:59 -07:00
k8s-merge-robot 3ef05dc53e Merge pull request #25069 from vincepii/master
Automatic merge from submit-queue

Heredoc fix on k8sm ha document

Fix for a missing delimiter on a heredoc in contrib/mesos/docs/ha.md.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-21 18:30:06 -07:00
k8s-merge-robot d06fe0caf7 Merge pull request #25638 from caseydavenport/cd-network-policy-api
Automatic merge from submit-queue

Add NetworkPolicy API Resource

API implementation of https://github.com/kubernetes/kubernetes/pull/24154

Still to do:
- [x] Get it working (See comments)
- [x] Make sure user-facing comments are correct.
- [x] Update naming in response to #24154
- [x] kubectl / client support
- [x] Release note.

```release-note
Implement NetworkPolicy v1beta1 API object / client support.
```

Next Steps:
- UTs in separate PR.
- e2e test in separate PR.
- make `Ports` + `From` pointers to slices (TODOs in code - to be done when auto-gen is fixed)

CC @thockin 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-21 08:51:28 -07:00
k8s-merge-robot f935507235 Merge pull request #19242 from mqliang/node-controller
Automatic merge from submit-queue

add CIDR allocator for NodeController

This PR:

* use pkg/controller/framework to watch nodes and	reduce lists when allocate CIDR for node
* decouple the cidr allocation logic from monitoring status logic

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/19242)
<!-- Reviewable:end -->
2016-05-20 09:45:05 -07:00
k8s-merge-robot 2c471bce4e Merge pull request #25509 from janetkuo/kubectl-set-image
Automatic merge from submit-queue

Add 'kubectl set image'

```release-note
Add "kubectl set image" for easier updating container images (for pods or resources with pod templates). 
```

**Usage:**
```
kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N
```
**Example:**
```console 
# Set a deployment's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox'.
$ kubectl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1

# Update all deployments' nginx container's image to 'nginx:1.9.1'
$ kubectl set image deployments nginx=nginx:1.9.1 --all

# Update image of all containers of daemonset abc to 'nginx:1.9.1'
$ kubectl set image daemonset abc *=nginx:1.9.1

# Print result (in yaml format) of updating nginx container image from local file, without hitting the server 
$ kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml
```

I abandoned the `--container=xxx --image=xxx` flags in the [deploy proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/deploy.md#kubectl-set) since it's much easier to use with just KEY=VALUE (CONTAINER_NAME=CONTAINER_IMAGE) pairs. 

Ref #21648 
@kubernetes/kubectl @bgrant0607 @kubernetes/sig-config 


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-20 07:13:45 -07:00
mqliang 17d5a302bb make podcidr mask size configurable 2016-05-20 20:44:40 +08:00
mqliang cf7a3475f3 Don't allow node controller to allocate into service CIDR range 2016-05-20 20:44:40 +08:00
Casey Davenport 47248f3698 v1beta1 NetworkPolicy API definition and client support 2016-05-19 19:02:54 -07:00
Daniel Smith 5448400b1c Merge pull request #25243 from smarterclayton/explore_quantity
Provide an int64 version of Quantity that is much faster
2016-05-19 16:56:48 -07:00
Shaya Potter ae08ef38d7 kubelet/cadvisor: Refactor cadvisor disk stat/usage interfaces 2016-05-19 11:13:47 -07:00
Clayton Coleman 5e4308f91d
Update use of Quantity in other classes 2016-05-19 08:41:43 -04:00
Robert Rati e388c137bb Separate sync and list functionality in the reflector. #23394 2016-05-19 07:41:24 -04:00
k8s-merge-robot c63ac4e664 Merge pull request #24331 from jsafrane/devel/refactor-binder
Automatic merge from submit-queue

Refactor persistent volume controller

Here is complete persistent controller as designed in https://github.com/pmorie/pv-haxxz/blob/master/controller.go

It's feature complete and compatible with current binder/recycler/provisioner. No new features, it *should* be much more stable and predictable.

Testing
--
The unit test framework is quite complicated, still it was necessary to reach reasonable coverage (78% in `persistentvolume_controller.go`). The untested part are error cases, which are quite hard to test in reasonable way - sure, I can inject a VersionConflictError on any object update and check the error bubbles up to appropriate places, but the real test would be to run `syncClaim`/`syncVolume` again and check it recovers appropriately from the error in the next periodic sync. That's the hard part.

Organization
---
The PR starts with `rm -rf kubernetes/pkg/controller/persistentvolume`. I find it easier to read when I see only the new controller without old pieces scattered around.
[`types.go` from the old controller is reused to speed up matching a bit, the code looks solid and has 95% unit test coverage].

I tried to split the PR into smaller patches, let me know what you think.

~~TODO~~
--

* ~~Missing: provisioning, recycling~~.
* ~~Fix integration tests~~
* ~~Fix e2e tests~~

@kubernetes/sig-storage

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24331)
<!-- Reviewable:end -->

Fixes #15632
2016-05-19 03:06:46 -07:00
Janet Kuo 4332472bde Add 'kubectl set image' 2016-05-18 21:23:17 -07:00
Kevin 52fb89ff73 implement taints and tolerations 2016-05-18 15:06:23 +00:00
Vincenzo Pii c79188570e Heredoc fix on k8sm ha document
Squashed commits
2016-05-18 14:53:20 +02:00
k8s-merge-robot e4e6e46197 Merge pull request #24799 from thockin/validation_pt8-2
Automatic merge from submit-queue

Make IsValidLabelValue return error strings

Part of the larger validation PR, broken out for easier review and merge.  Builds on previous PRs in the series.
2016-05-18 04:08:15 -07:00
k8s-merge-robot 48c90f15c5 Merge pull request #24509 from caesarxuchao/primitive-gc
Automatic merge from submit-queue

Adding garbage collector controller

Adding the propagator and garbage processor of the gc.

Design doc is at https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/garbage-collection.md

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24509)
<!-- Reviewable:end -->
2016-05-18 03:14:25 -07:00
Jan Safranek 79b91b9ee0 Refactor persistent volume initialization
There should be only one initialization function, shared by the real
controller and unit tests.
2016-05-18 10:06:51 +02:00
Jan Safranek 514d595881 provisioning: Implement provisioner 2016-05-18 10:06:51 +02:00
Tim Hockin 66d0d87829 Make IsValidLabelValue return error strings 2016-05-17 21:36:10 -07:00
Jan Safranek 71aa892a86 Implement volume controller skeleton.
This is a simple controller that watches changes of PersistentVolumes and
PersistentVolumeClaims.
2016-05-17 15:14:02 +02:00
Prashanth Balasubramanian daa8e29c5b Add a kubectl create secret tls command 2016-05-16 22:38:56 -07:00