Commit Graph

2426 Commits (17403585737bd45e239f7f5ea49d604be7cb3915)

Author SHA1 Message Date
jianhuiz 41b409b24e support included-types-overrides without version provided (group/type) 2016-07-21 14:00:35 -07:00
derekwaynecarr 2f4a4ea4cf Kubelet parses and validates eviction-minimum-reclaim flag 2016-07-21 16:46:12 -04:00
k8s-merge-robot 1cf3f1cf03 Merge pull request #29237 from ncdc/fixup-windows-term
Automatic merge from submit-queue

Fix Windows terminal handling

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

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

Use sharedPodInformer in ReplicaSet controller

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

add tokenreviews endpoint to implement webhook

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

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

Format apiserver options

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

Certificate signing controller for TLS bootstrap (alpha)

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

cc @mikedanese

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

Unable to have optional message slice

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

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

Remove GOMAXPROCS() calls because they are unnecessary


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

Documentation for it:

> func GOMAXPROCS(n int) int

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

A simple program to prove it's unnecessary:

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

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

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

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

Use Go canonical import paths

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

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

Make discovery summarizer call servers in parallel

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

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

Generate a better Stringer method for proto types

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

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

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

[GarbageCollector] Let the RC manager set/remove ControllerRef

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

TODO:

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

cc @lavalamp @gmarek
2016-07-15 04:40:40 -07:00
k8s-merge-robot d347435708 Merge pull request #19837 from mikedanese/kubelet-external
Automatic merge from submit-queue

kubelet external componentconfig
2016-07-15 03:59:50 -07:00
k8s-merge-robot ff998ab566 Merge pull request #28810 from smarterclayton/keep_proto_name
Automatic merge from submit-queue

Allow proto tag to define field name

When we introduce a new field for backwards compatibility, we may want
to specify a different protobuf field name (one that matches JSON) than
the automatic transformation applied to the struct field. This allows an
API field to define the name of its protobuf tag.

@wojtek-t hit this while adding protobuf to OpenShift - we have fields we
keep for backward compatibility that need to be assigned a field by name.
Has no impact on existing (already tagged) fields.
2016-07-15 03:17:33 -07:00
joe2far 88b6d4ad36 Fix broken warning image link in docs 2016-07-15 10:44:58 +01:00
Chao Xu 11a341de67 let RC manager utilize the GC 2016-07-14 19:59:31 -07:00
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
Michael Taufen 2e49f6b64a Make it build!
Update external KubeletConfiguration type
Add defaults for new KubeletConfiguration fields
Modify some defaults to match upstream settings
Add/rename some conversion functions
Updated codegen
Fixed typos
Mike Danese caught that s.NodeLabels wasn't allocated, fix on line 118
of cmd/kubelet/app/options/options.go.
Provide list of valid sources in comment for HostNetworkSources field
2016-07-14 18:38:58 -07:00
Mike Danese e070cb617a componentconfig: add external kubelet configuration type 2016-07-14 18:38:58 -07:00
Clayton Coleman 8c17b48824
Generate gogo stringer instead of proto stringer
Similar to %#v.
2016-07-14 12:43:33 -04:00
k8s-merge-robot bea382c124 Merge pull request #28932 from smarterclayton/fix_protobuf_error
Automatic merge from submit-queue

Fail correctly in go-to-protobuf

We need to return earlier.

@wojtek-t
2016-07-14 09:09:42 -07:00
k8s-merge-robot 03be7117a4 Merge pull request #28882 from gmarek/ratelimiter
Automatic merge from submit-queue

Allow switching rate limiter inside RateLimitedQueue

Ref. #28832
cc @davidopp  

```release-note
Deprecate deleting-pods-burst ControllerManager flag
```
2016-07-14 08:44:35 -07:00
k8s-merge-robot 50172148e4 Merge pull request #25273 from ncdc/exec-sigwinch
Automatic merge from submit-queue

Support terminal resizing for exec/attach/run

```release-note
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
```

Fixes #13585
2016-07-14 07:26:49 -07:00
gmarek f6b1c316e9 Allow switching rate limiter inside RateLimitedQueue 2016-07-14 15:38:14 +02:00
k8s-merge-robot 6558b30f11 Merge pull request #28931 from smarterclayton/fix_conversions
Automatic merge from submit-queue

genconversion=false should skip fields during conversion generation

Currently it only skips if the fields don't match, but that leaves no
way for callers to say "no really, ignore this field".

@wojtek-t @thockin *must* be able to ignore a non-convertible field (if the types are different but we still want the autogeneration of everything else)
2016-07-14 06:36:27 -07: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
k8s-merge-robot f27a8034fd Merge pull request #28911 from thockin/fix-gendocs-for-symlinks
Automatic merge from submit-queue

Don't panic if we hit a dangling symlink in mungedocs

I hit this because I have a dangling symlink, which would cause a panic.
2016-07-13 20:55:34 -07:00
Clayton Coleman 0d26c2efd4
Unable to have optional message slice
When making a message slice optional, we need to handle one more
conditional case in the rewriter.
2016-07-13 23:10:44 -04:00
Clayton Coleman c55f47c4c9
Fail correctly in go-to-protobuf
We need to return earlier.
2016-07-13 23:02:45 -04:00
Clayton Coleman f5975afc06
genconversion=false should skip fields during conversion generation
Currently it only skips if the fields don't match, but that leaves no
way for callers to say "no really, ignore this field".
2016-07-13 22:20:40 -04:00
k8s-merge-robot 6b6141f812 Merge pull request #28820 from caesarxuchao/patch-subresource
Automatic merge from submit-queue

[client-gen] Allow passing subresources in Patch method

Expand the Patch() method from:
```
Patch(name string, pt api.PatchType, data []byte)
```
to
```
Patch(name string, pt api.PatchType, data []byte, subresources ...string)
```

Continue on #27293. Fixes #26580.

cc @Random-Liu @lavalamp
2016-07-13 16:09:01 -07:00
Andy Goldstein 3b21a9901b Support terminal resizing for exec/attach/run
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
2016-07-13 17:06:16 -04:00
k8s-merge-robot b50e66c66e Merge pull request #28340 from ZTE-PaaS/zhangke-patch-007
Automatic merge from submit-queue

controller-manager support number of garbage collector workers to be configurable

The number of garbage collector workers of controller-manager is a fixed value 5 now, make it configurable should more properly
2016-07-13 12:54:15 -07:00
k8s-merge-robot 3dbc4db681 Merge pull request #28891 from wojtek-t/avoid_generator_annoying_logs
Automatic merge from submit-queue

Unify logging in generators and avoid annoying logs.

@thockin regarding our discussing in the morning

@lavalamp - FYI
2016-07-13 12:17:19 -07:00
Tim Hockin a8d394bfd4 Don't panic if we hit a dangling symlink in mungedocs 2016-07-13 11:50:26 -07:00
joe2far 5ead89b5bb Fixed several typos 2016-07-13 15:06:24 +01:00
Wojciech Tyczynski 16bf8c4008 Unify logging in generators and avoid annoying logs. 2016-07-13 15:06:44 +02:00
gmarek 5677a9845e Split NodeController rate limiters between zones 2016-07-13 14:09:19 +02:00
Ke Zhang d74010211a controller-manager support number of garbage collector workers to be configurable 2016-07-13 13:13:20 +08:00
Tim Hockin 9dd337d119 s/deep_copy/deepcopy/
Just a naming nit that was too hard to fixup-and-rebase.
2016-07-12 21:52:54 -07:00
Tim Hockin 58441e8775 Don't check in generated deep-copy code
This mostly takes the previously checked in files and removes them, and moves
the generation to be on-demand instead of manual.  Manually verified no change
in generated output.
2016-07-12 21:52:54 -07:00
k8s-merge-robot 708e753c72 Merge pull request #28679 from sttts/sttts-deepcopy-pointer-in
Automatic merge from submit-queue

Deepcopy: avoid struct copies and reflection Call

- make signature of generated deepcopy methods symmetric with `in *type, out *type`, avoiding copies of big structs on the stack
- switch to `in interface{}, out interface{}` which allows us to call them with without `reflect.Call`

The first change reduces runtime of BenchmarkPodCopy-4 from `> 3500ns` to around `2300ns`.

The second change reduces runtime to around `1900ns`.
2016-07-12 21:45:43 -07:00
Chao Xu c2fb39102b generated changes 2016-07-12 11:09:28 -07:00
Chao Xu dc2e12d2f8 manual changes to patch subresource 2016-07-12 11:09:27 -07:00
Dr. Stefan Schimanski 61cde63622 Switch to typeless generated deepcopy functions for less reflection 2016-07-12 18:05:43 +02:00
Dr. Stefan Schimanski 6049623a13 Turn first deepcopy parameter into a pointer 2016-07-12 18:05:43 +02:00
lojies 77c6176157 modify Failure to failed 2016-07-12 19:11:24 +08:00
Clayton Coleman 68bfba29b9
Allow proto tag to define field name
When we introduce a new field for backwards compatibility, we may want
to specify a different protobuf field name (one that matches JSON) than
the automatic transformation applied to the struct field. This allows an
API field to define the name of its protobuf tag.
2016-07-11 22:14:20 -04:00
k8s-merge-robot 6462f82243 Merge pull request #28697 from Random-Liu/fix-kube-proxy-panic
Automatic merge from submit-queue

Prevent kube-proxy from panicing when sysfs is mounted as read-only.

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

This PR:
* Checks the permission of sysfs before setting conntrack hashsize, and returns an error "readOnlySysFSError" if sysfs is readonly. As I know, this is the only place we need write permission to sysfs, CMIIW.
* Update a new node condition 'RuntimeUnhealthy' with specific reason, message and hit to the administrator about the remediation.

I think this should be an acceptable fix for now.
Node problem detector is designed to integrate with different problem daemons, but **the main logic is in the problem detection phase**. After the problem is detected, what node problem detector does is also simply updating a node condition.

If we let kube-proxy pass the problem to node problem detector and let node problem detector update the node condition. It looks like an unnecessary hop. The logic in kube-proxy won't be different from this PR, but node problem detector will have to open an unsafe door to other pods because the lack of authentication mechanism.

It is a bit hard to test this PR, because we don't really have a bad docker in hand. I can only manually test it:
* If I manually change the code to let it return `"readOnlySysFSError`, the node condition will be updated:
```
  NetworkUnavailable 	False 	Mon, 01 Jan 0001 00:00:00 +0000 	Fri, 08 Jul 2016 01:36:41 -0700 	RouteCreated 			RouteController created a route
  OutOfDisk 		False 	Fri, 08 Jul 2016 01:37:36 -0700 	Fri, 08 Jul 2016 01:34:49 -0700 	KubeletHasSufficientDisk 	kubelet has sufficient disk space available
  MemoryPressure 	False 	Fri, 08 Jul 2016 01:37:36 -0700 	Fri, 08 Jul 2016 01:34:49 -0700 	KubeletHasSufficientMemory 	kubelet has sufficient memory available
  Ready 		True 	Fri, 08 Jul 2016 01:37:36 -0700 	Fri, 08 Jul 2016 01:35:26 -0700 	KubeletReady 			kubelet is posting ready status. WARNING: CPU hardcapping unsupported
  RuntimeUnhealthy 	True 	Fri, 08 Jul 2016 01:35:31 -0700 	Fri, 08 Jul 2016 01:35:31 -0700 	ReadOnlySysFS 			Docker unexpectedly mounts sysfs as read-only for privileged container (docker issue #24000). This causes the critical system components of Kubernetes not properly working. To remedy this please restart the docker daemon.
  KernelDeadlock 	False 	Fri, 08 Jul 2016 01:37:39 -0700 	Fri, 08 Jul 2016 01:35:34 -0700 	KernelHasNoDeadlock 		kernel has no deadlock
Addresses:		10.240.0.3,104.155.176.101
```
* If not, the node condition `RuntimeUnhealthy` won't appear.
* If I run the permission checking code in a unprivileged container, it did return `readOnlySysFSError`.

I'm not sure whether we want to mark the node as `Unscheduable` when this happened, which only needs few lines change. I can do that if we think we should.

I'll add some unit test if we think this fix is acceptable.

/cc @bprashanth @dchen1107 @matchstick @thockin @alex-mohr 

Mark P1 to match the original issue.
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-10 23:42:43 -07:00
Random-Liu 4246853211 Prevent kube-proxy from panicing when sysfs is mounted as read-only.
Send a node event when this happens and hint to the administrator
about the remediation.
2016-07-10 22:32:51 -07:00
Clayton Coleman 29046db6ff
Name check for go-to-protobuf in wrong spot 2016-07-08 11:31:39 -04:00
k8s-merge-robot 5504c58ce2 Merge pull request #28607 from derekwaynecarr/default_eviction
Automatic merge from submit-queue

Enable memory eviction by default

```release-note
Enable memory based pod evictions by default on the kubelet.  

Trigger pod eviction when available memory falls below 100Mi.
```

See: https://github.com/kubernetes/kubernetes/issues/28552

/cc @kubernetes/rh-cluster-infra @kubernetes/sig-node
2016-07-08 04:46:37 -07:00
Tim Hockin 355794c303 Log errors or fail if conversion fail to generate
This fixes PodSpec to generate cleanly.  No other types only half-generate (so
now we Fatalf), though several fail to generate at all (only Errorf for now).
2016-07-07 22:09:08 -07:00
Tim Hockin f63f168b51 Comment and simplify a bit of conversion
There are ample opportunities to optimize and streamline here.  For example,
there's no reason to have a function to convert IntStr to IntStr. Removing the
function does generate the right assignment, but it is unclear whether the
registered function is needed or not.  I opted to leave it alone for now.
Another example is Convert_Slice_byte_To_Slice_byte, which just seems silly.
2016-07-07 22:09:08 -07:00
Tim Hockin 291b51ec50 Use file tags to generate conversions
This drives conversion generation from file tags like:
  // +conversion-gen=k8s.io/my/internal/version
.. rather than hardcoded lists of packages.

The only net change in generated code can be explained as correct.  Previously
it didn't know that conversion was available.
2016-07-07 22:09:08 -07:00
Tim Hockin 80490e0a55 go2idl: Allow generators to AddDir() at runtime
This is used subsequently to simplify the conversion generation, so each
package can declare what peer-packages it uses, and have those imported
dynamically, rather than having one mega list of packages to import and not
really being clear why, for any given list item.
2016-07-07 22:09:08 -07:00
Tim Hockin 7fa1e87d66 Simplify convertible check - same type is OK
This is to clarify the code.  No actual effect at the moment, but I manually
verified this in the case of identical types.
2016-07-07 22:09:08 -07:00
Tim Hockin ed59210f04 Renames for clarity in conversion-gen
This is to clarify the intent of the code for new readers (me).
2016-07-07 22:09:08 -07:00
Tim Hockin ab16ccc158 go2idl: don't mutate a map being iterated
This was causing us to process packages we didn't really want, which was only
visible when debugging was enabled.
2016-07-07 22:09:08 -07:00
Tim Hockin 96c0284e91 go2idl: clarify comments wrt get-or-create
This is just comment clarity.
2016-07-07 22:09:08 -07:00
k8s-merge-robot 42805f53b0 Merge pull request #28578 from thockin/dont-checkin-generated-code-prep-1
Automatic merge from submit-queue

Prep for not checking in generated, part 1/2

This PR is extracted from #25978 - it is just the deep-copy related parts.  All the Makefile and conversion stuff is excluded.

@wojtek-t this is literally branched, a bunch of commits deleted, and a very small number of manual fixups applied.  If you think this is easier to review (and if it passes CI) you can feel free to go over it again. I will follow this with a conversion-related PR to build on this.

Or if you prefer, just close this and let the mega-PR ride.

@lavalamp
2016-07-07 21:25:10 -07:00
Tim Hockin 82b2d2c87b Clarify copyable vs in-bounds
This make it clearer where "is copyable" is needed and where "is in bounds" is
needed.  No effect on generated code.
2016-07-07 16:49:46 -07:00
Tim Hockin 1ba6f5df9e go2idl: Allow ... pkg specs
This is closer to standard Go semantics and obsoletes our custom --recursive
flag.
2016-07-07 16:49:46 -07:00
Tim Hockin dc10f10e48 Recreate the opt-in/opt-out logic for deepcopy
This is the last piece of Clayton's #26179 to be implemented with file tags.
All diffs are accounted for.  Followup will use this to streamline some
packages.

Also add some V(5) debugging - it was helpful in diagnosing various issues, it
may be helpful again.
2016-07-07 16:49:46 -07:00
Tim Hockin 28af54138d Use file tags to generate deep-copies
This drives most of the logic of deep-copy generation from tags like:
  // +deepcopy-gen=package
..rather than hardcoded lists of packages.  This will make it possible to
subsequently generate code ONLY for packages that need it *right now*, rather
than all of them always.

Also remove pkgs that really do not need deep-copies (no symbols used
anywhere).
2016-07-07 16:49:46 -07:00
Tim Hockin 4c4c6fc40e go2idl: Add an 'output basename' option
This will be used when generated files are no longer checked in.  I include it
as a standalone commit for ease of review.
2016-07-07 16:49:46 -07:00
Tim Hockin ec79eee289 go2idl: remove comma-processing for comment-tags
It's simpler and clearer without them, and it leaves room for per-use-case
parsing of the tag lines.  If anything we should be splitting on whitespace.
2016-07-07 16:49:46 -07:00
Tim Hockin 052847f4ed go2idl: Track doc.go file-comments
Previously we just tracked comments on the 'package' declaration.  Treat all
file comments as one comment-block, for simplicity.  Can be revisited if
needed.
2016-07-07 16:49:46 -07:00
Tim Hockin 4a00a0fd6d go2idl: Allow multiple values for a comment-tag
This means that tags like:
  // +foo=bar
  // +foo=bat
..will produce []string{"bar", "bat"}.  This is needed for later commits which
will want to use this to make code generation more self contained.
2016-07-07 16:49:46 -07:00
Tim Hockin b01ac4726f go2idl: Consistently handle comments as []string
This makes subsequent comment-tag PRs more consistent.
2016-07-07 16:49:46 -07:00
Tim Hockin 57c3196914 Add support for manually defined DeepCopy methods
In bringing back Clayton's PR piece-by-piece this was almost as easy to
implement as his version, and is much more like what I think we should be
doing.

Specifically, any time which defines a .DeepCopy() method will have that method
called preferentially.  Otherwise we generate our own functions for
deep-copying.  This affected exactly one type - resource.Quantity.  In applying
this heuristic, several places in the generated code were simplified.

To achieve this I had to convert types.Type.Methods from a slice to a map,
which seems correct anyway (to do by-name lookups).
2016-07-07 16:49:46 -07:00
Tim Hockin be481060ea Re-add constraints to deep-copy
This re-institutes some of the rolled-back logic from previous commits. It
bounds the scope of what the deepcopy generator is willing to do with regards
to generating and calling generated functions.
2016-07-07 16:49:46 -07:00
Tim Hockin e18b2f3a2e Revert Clayton's #26179 so I can recreate it
His PR cam during the middle of this development cycle, and it was easier to
burn it down and recreate it than try to patch it into an existing series and
re-test every assumption.  This behavior will be re-introduced in subsequent
commits.
2016-07-07 16:49:46 -07:00
Tim St. Clair 656ce4b623 Fix mungedocs TOC generation
Fix TOC links in the presence duplicate headers.
2016-07-07 13:30:55 -07:00
k8s-merge-robot 715d2f2358 Merge pull request #26611 from ZJU-SEL/clean-up-dup
Automatic merge from submit-queue

clean up dup code for kubelet

`RunKubelet` is called elsewhere, hence we should keep it that way.
Fixes #25345
2016-07-07 13:21:53 -07:00
k8s-merge-robot 4da14c8a64 Merge pull request #28204 from thockin/cleanup-third_party
Automatic merge from submit-queue

Cleanup third party (pt 2)

Move forked-and-hacked golang code to the forked/ directory.  Remove ast/build/parse code that is now in stdlib.  Remove unused shell2junit
2016-07-07 12:13:14 -07:00
k8s-merge-robot 8601530bdd Merge pull request #28460 from wojtek-t/remove_cmd_integration
Automatic merge from submit-queue

Remove cmd/integration test

Fix #24440

After few cleanup PRs:
https://github.com/kubernetes/kubernetes/pull/27182
https://github.com/kubernetes/kubernetes/pull/27535
https://github.com/kubernetes/kubernetes/pull/26016

The only things that are being tested here is:
- starting master components without any verification (so if it didn't start, it will still work :P)
- checking if kubelet is starting containers from http manifest.

The latter is already tested in:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/config/http_test.go#L54

So the test is now useless, at the same time, significantly increasing time spent on integration tests.

@lavalamp @mikedanese @spxtr @fejta
2016-07-07 11:36:19 -07:00
derekwaynecarr 4e6a52d872 Enable memory eviction by default 2016-07-07 11:47:16 -04:00
Maciej Kwiek ee6f50ec34 Make discovery summarizer call servers in parallel 2016-07-07 16:10:27 +02:00
k8s-merge-robot 0c696dc95b Merge pull request #27848 from liubin/fix-typos
Automatic merge from submit-queue

fix some typos

Just a minor typos fix.


Signed-off-by: bin liu <liubin0329@gmail.com>
2016-07-06 23:36:49 -07:00
k8s-merge-robot de0e6de82b Merge pull request #28430 from smarterclayton/fix_empty_deep_copy
Automatic merge from submit-queue

WIP - Handle map[]struct{} in DeepCopy

Deep copy was not properly handling the empty struct case we use for Sets.

@lavalamp I need your expertise when you have some time - the go2idl parser is turning sets.String into the following tree:

    type:         sets.String           kind: Alias
      underlying: map[string]sets.Empty kind: Map
        key:      string                kind: Builtin
        elem:     set.Empty             kind: Struct
                                              ^
                                              should be Alias

Looking at tc.Named, I'm not sure what the expected outcome would be and why you flatten there.
2016-07-04 04:34:54 -07:00
Wojciech Tyczynski 3686e55d37 Remove cmd/integration test 2016-07-04 13:07:12 +02:00
bin liu 426fdc431a Merge branch 'master' into fix-typos 2016-07-04 11:20:47 +08:00
Clayton Coleman 6eb04ae592 Handle map[]struct{} special 2016-07-03 00:44:25 -04:00
Clayton Coleman 534075f828
Deep copy should always use existing functions that are not ignored
While testing this fix in OpenShift it was discovered that the
PackageConstraint was overly aggressive - types that declare a public
copy function should always return true.  PackageConstraint is intended
to limit packages where we might generate deep copy function, rather
than to prevent external packages from being consumed.
2016-07-03 00:12:13 -04:00
Clayton Coleman 903a2db90a
Make generated build tag parameterizable for go2idl
Downstream generators that want to reuse the upstream generated types
need to be able to define a different ignore tag (so that they can see
the already generated types).
2016-07-03 00:12:10 -04:00
saadali 0dd17fff22 Reorganize volume controllers and manager 2016-07-01 18:50:25 -07:00
Matt Liggett bf13785149 Add version and flag logging to kube-dns. 2016-07-01 11:31:27 -07:00
k8s-merge-robot ab37fbf4c2 Merge pull request #28258 from vishh/28231
Automatic merge from submit-queue

[kubelet] Allow opting out of automatic cloud provider detection in kubelet. By default kubelet will auto-detect cloud providers

fixes #28231
2016-06-30 12:27:26 -07:00
k8s-merge-robot f2ddd60eb9 Merge pull request #26755 from david-mcmahon/fix-headers
Automatic merge from submit-queue

Remove "All rights reserved" from all the headers.

cc @thockin @zmerlynn @brendanburns
2016-06-29 18:46:07 -07:00
k8s-merge-robot d8d5ab29a5 Merge pull request #26756 from hongchaodeng/cli
Automatic merge from submit-queue

Change client default value of qps and burst to constant
2016-06-29 18:11:18 -07:00
Vishnu Kannan ea789e8612 Allow opting out of automatic cloud provider detection in kubelet
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-06-29 18:04:29 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot e7f7a49bac Merge pull request #26016 from hongchaodeng/phantom
Automatic merge from submit-queue

scheduler: change phantom pod test from integration into unit test

This is an effort for #24440.

Why this PR?
- Integration test is hard to debug. We could model the test as a unit test similar to [TestSchedulerForgetAssumedPodAfterDelete()](132ebb091a/plugin/pkg/scheduler/scheduler_test.go (L173)). Currently the test is testing expiring case, we can change that to delete.
- Add a test similar to TestSchedulerForgetAssumedPodAfterDelete() to test phantom pod.
- refactor scheduler tests to share the code between TestSchedulerNoPhantomPodAfterExpire() and TestSchedulerNoPhantomPodAfterDelete()
- Decouple scheduler tests from scheduler events: not to use events
2016-06-29 12:09:49 -07:00
k8s-merge-robot 7f3da674f7 Merge pull request #26680 from olegshaldybin/fake-clientset-registry
Automatic merge from submit-queue

Track object modifications in fake clientset

Fake clientset is used by unit tests extensively but it has some
shortcomings:

- no filtering on namespace and name: tests that want to test objects in
  multiple namespaces end up getting all objects from this clientset,
  as it doesn't perform any filtering based on name and namespace;

- updates and deletes don't modify the clientset state, so some tests
  can get unexpected results if they modify/delete objects using the
  clientset;

- it's possible to insert multiple objects with the same
  kind/name/namespace, this leads to confusing behavior, as retrieval is
  based on the insertion order, but anchors on the last added object as
  long as no more objects are added.

This change changes core.ObjectRetriever implementation to track object
adds, updates and deletes.

Some unit tests were depending on the previous (and somewhat incorrect)
behavior. These are fixed in the following few commits.
2016-06-29 06:04:33 -07:00
Tim Hockin 8c42c08363 move forked golang code to a common dir with LICENSE 2016-06-28 22:57:45 -07:00
Tim Hockin b0a4b22e61 Remove no-longer-needed forked go/ast code 2016-06-28 22:57:14 -07:00
Tim Hockin 2950373959 Move hacked golang reflect code to forked/ dir 2016-06-28 22:34:10 -07:00
Hongchao Deng 55d3597456 change default value of QPS and burst to constant 2016-06-28 21:45:35 -07:00
nikhiljindal 7fcf8daf6b Moving federation/v1alpha1 to federation/v1beta1 2016-06-28 17:12:58 -07:00
k8s-merge-robot 32eccd413f Merge pull request #25562 from gtank/certificates-api-v9
Automatic merge from submit-queue

TLS bootstrap API group (alpha)

This PR only covers the new types and related client/storage code- the vast majority of the line count is codegen. The implementation differs slightly from the current proposal document based on discussions in design thread (#20439). The controller logic and kubelet support mentioned in the proposal are forthcoming in separate requests.

I submit that #18762 ("Creating a new API group is really hard") is, if anything, understating it. I've tried to structure the commits to illustrate the process.

@mikedanese @erictune @smarterclayton @deads2k

```release-note-experimental
An alpha implementation of the the TLS bootstrap API described in docs/proposals/kubelet-tls-bootstrap.md.
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-28 13:25:22 -07:00
Oleg Shaldybin e722a41c40 Format apiserver options
Trivial change, code formatting only: it was really hard to read
apiserver options definition, formatted to follow the same pattern
throughout.
2016-06-28 12:34:22 -07:00
George Tankersley f8f7e7e3c7 codegen: add certificates group to generators 2016-06-28 12:05:41 -07:00
Oleg Shaldybin d445d4082d Regenerate clientsets 2016-06-28 10:59:54 -07:00
Oleg Shaldybin 10e75946a2 Track object modifications in fake clientset
Fake clientset is used by unit tests extensively but it has some
shortcomings:

- no filtering on namespace and name: tests that want to test objects in
  multiple namespaces end up getting all objects from this clientset,
  as it doesn't perform any filtering based on name and namespace;

- updates and deletes don't modify the clientset state, so some tests
  can get unexpected results if they modify/delete objects using the
  clientset;

- it's possible to insert multiple objects with the same
  kind/name/namespace, this leads to confusing behavior, as retrieval is
  based on the insertion order, but anchors on the last added object as
  long as no more objects are added.

This change changes core.ObjectRetriever implementation to track object
adds, updates and deletes.

Some unit tests were depending on the previous (and somewhat incorrect)
behavior. These are fixed in the following few commits.
2016-06-28 10:59:54 -07:00
Clayton Coleman 1c8b928908
Handle aliases correctly in deepcopy/conversion 2016-06-27 21:42:02 -07:00
Clayton Coleman 5f9e7a00b8
Add optional slice and map support to protobuf
Specifying // +protobuf.nullable=true on a Go type that is an alias of a
map or slice will generate a synthetic protobuf message with the type
name that will serialize to the wire in a way that allows the difference
between empty and nil to be recorded.

For instance:

    // +protobuf.nullable=true
    types OptionalMap map[string]string

will create the following message:

    message OptionalMap {
      map<string, string> Items = 1
    }

and generate marshallers that use the presence of OptionalMap to
determine whether the map is nil (rather than Items, which protobuf
provides no way to delineate between empty and nil).
2016-06-27 21:42:02 -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 d195829083 Merge pull request #27881 from ronnielai/disk-check
Automatic merge from submit-queue

Modifying the default container GC policy parameters

- Marked container GC policy to be deprecated in the future
- Changed the default values for container GC policy per the [eviction proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/kubelet-eviction.md)
2016-06-26 10:23:22 -07:00
k8s-merge-robot 93037844c1 Merge pull request #27293 from caesarxuchao/add-patch-to-clientset
Automatic merge from submit-queue

[client-gen]Add Patch to clientset

* add the Patch() method to the clientset. 
* I have to rename the existing Patch() method of `Event` to PatchWithEventNamespace() to avoid overriding.
* some minor changes to the fake Patch action.

cc @Random-Liu since he asked for the method
@kubernetes/sig-api-machinery 

ref #26580 

```release-note
Add the Patch method to the generated clientset.
```
2016-06-25 19:15:11 -07: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 07d24e4557 Merge pull request #28004 from mikedanese/fix-nil
Automatic merge from submit-queue

return nil from NewClientConfig instead of empty struct

This is a go convention and fixes an nil pointer in kubelet when passing in bad command line options:

```
I0624 04:12:33.333246   25404 plugins.go:141] Loaded network plugin "kubenet"
E0624 04:12:33.333390   25404 runtime.go:58] Recovered from panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:52
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:40
/usr/local/go/src/runtime/asm_amd64.s:472
/usr/local/go/src/runtime/panic.go:443
/usr/local/go/src/runtime/panic.go:62
/usr/local/go/src/runtime/sigpanic_unix.go:24
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service.go:132
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/kubelet.go:254
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/client/cache/listwatch.go:80
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:262
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:204
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:86
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:87
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:49
```
cc @caesarxuchao @lavalamp
2016-06-24 15:15:08 -07:00
Mike Danese 3162197c23 autogenerated 2016-06-23 22:15:03 -07:00
Mike Danese 135c6899e9 return nil from NewClientConfig instead of empty struct 2016-06-23 22:13:42 -07:00
nikhiljindal 61f43c5924 Updating KubeDNS to try a local service first for federation query 2016-06-23 17:50:12 -07:00
Ron Lai 095e04d562 Marking container gc policy deprecated in the future and changing the default value 2016-06-22 13:32:13 -07:00
bin liu fd27cd47f7 fix some typos
Signed-off-by: bin liu <liubin0329@gmail.com>
2016-06-22 18:14:26 +08:00
Matt Liggett 62c052bb6b Report validation errors when command-line flag parsing fails.
Before this, I was stumped with

 invalid argument "federation=kubernetes-federation.test." for --federations=federation=kubernetes-federation.test.: federation not a valid federation name

but now

  invalid argument "federation=kubernetes-federation.test." for --federations=federation=kubernetes-federation.test.: "kubernetes-federation.test." not a valid domain name: ["must match the regex [a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* (e.g. 'example.com')"]
2016-06-21 16:02:36 -07:00
Hongchao Deng fadde38df6 integration.go: remove scheduler phantom pod test 2016-06-21 09:55:09 -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
k8s-merge-robot 27c0d8cf7c Merge pull request #27535 from wojtek-t/move_integration_tests_2
Automatic merge from submit-queue

Migrate most of remaining tests from cmd/integration to test/integration to use framework

Ref #25940

Built on top of https://github.com/kubernetes/kubernetes/pull/27182 - only the last commit is unique
2016-06-21 00:45:06 -07:00
k8s-merge-robot 6a7fd0560c Merge pull request #27586 from colhom/federation-hyperkube
Automatic merge from submit-queue

Add federation api and cm servers to hyperkube

\cc @nikhiljindal @quinton-hoole 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-20 21:47:33 -07:00
Wojciech Tyczynski fe14beb980 Move Patch, AtomicPut and MasterService tests to test/integration. 2016-06-20 20:50:25 +02:00
k8s-merge-robot a19728c3a1 Merge pull request #27182 from wojtek-t/move_integration_tests
Automatic merge from submit-queue

Migrate some integration tests from cmd/integration to test/integration to use framework

Ref #25940
2016-06-20 11:48:28 -07:00
gmarek 9bbcb5e3b8 Remove dependency on test/integration from kubemark 2016-06-20 16:20:51 +02:00
markturansky 16ec36c591 added toggle to disable dynamic provisioning 2016-06-20 01:15:23 -04:00
k8s-merge-robot 076bf81b8b Merge pull request #23473 from AdoHe/kubelet_tls_overwrite
Automatic merge from submit-queue

fix kubelet tls overwrite issue

@lavalamp apply the same thing to kubelet. @dchen1107 ptal.

<!-- 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/23473)
<!-- Reviewable:end -->
2016-06-17 23:20:03 -07:00
Random-Liu 3cc9ca3988 Add timeout for rkt requests. 2016-06-17 18:18:41 -07:00
Random-Liu 52ebd4ecf1 Add runtime-request-timeout kubelet flag. 2016-06-17 18:18:41 -07:00
k8s-merge-robot 1a89f1acba Merge pull request #26995 from mikedanese/integration-dead-code
Automatic merge from submit-queue

delete a bunch of dead code in cmd/integration

this command should just go away
2016-06-17 11:24:21 -07:00
Chao Xu a29f6aa8ae add Patch to clientsets 2016-06-17 10:30:58 -07:00
k8s-merge-robot 622535d15e Merge pull request #27606 from kubernetes/revert-27526-revert-27422-burst
Automatic merge from submit-queue

Change default value of deleting-pods-burst to 1

Let's try again.

cc @davidopp 

Reverts kubernetes/kubernetes#27526
2016-06-17 03:06:26 -07:00
Marek Grabowski 90358531e4 Revert "Revert "Change default value of deleting-pods-burst to 1"" 2016-06-17 09:57:24 +02:00
Colin Hom 8b2d1f313a Add federation api and cm servers to hyperkube 2016-06-16 18:01:47 -07:00
derekwaynecarr de95be0a76 Fix typo in kubelet help 2016-06-16 15:48:23 -04:00
Piotr Szczesniak 8d36ab9994 Revert "Change default value of deleting-pods-burst to 1" 2016-06-16 09:52:17 +02:00
Daniel Smith 5617360d39 Merge pull request #27221 from david-mcmahon/updatedocs
Update the latestReleaseBranch to release-1.3 in the munger.
2016-06-15 14:43:06 -07:00
gmarek aec5dfbd6d Change default value of deleting-pods-burst to 1 2016-06-15 11:22:58 +02:00
David McMahon 261b6453e4 Update the latestReleaseBranch to release-1.3 in the munger. 2016-06-13 12:24:17 -07:00
Dawn Chen 9ee6809586 Revert "Update the latestReleaseBranch to release-1.3 in the munger."
This reverts commit 3beed6e1aa.
2016-06-10 16:46:11 -07:00
David McMahon 3beed6e1aa Update the latestReleaseBranch to release-1.3 in the munger. 2016-06-10 14:55:46 -07:00
Wojciech Tyczynski 67ddac041f Move SelfLink test 2016-06-10 14:26:14 +02:00
Wojciech Tyczynski 43485a4eef Move APIVersions test 2016-06-10 14:24:08 +02:00
Chao Xu 91de14cf13 rename the gc for terminated pods to "podgc" 2016-06-07 22:10:34 -07:00
Mike Danese dffaece97c delete a bunch of dead code in cmd/integration 2016-06-07 13:31:09 -07:00
Clayton Coleman 460726c67d
Use inline assignment on string alias deep copies 2016-06-06 17:18:22 -04:00
Clayton Coleman 0181ac61da
DeepCopy should only generate types in k8s.io/kubernetes
Also make generation more selective (require opt in) to prevent lots of
unnecessary generated deep copies.
2016-06-06 17:18:22 -04:00
k8s-merge-robot c1392ec51a Merge pull request #26747 from freehan/kubenetdir
Automatic merge from submit-queue

pass NetworkPluginDir to kubenet

to unblock GCI kubenet integration #26379

cc: @andyzheng0831
2016-06-03 15:38:09 -07:00
Minhan Xia e9f8c70eaf pass NetworkPluginDir to kubenet 2016-06-03 10:22:49 -07:00
Saad Ali 9dbe943491 Attach/Detach Controller Kubelet Changes
This PR contains Kubelet changes to enable attach/detach controller control.
* It introduces a new "enable-controller-attach-detach" kubelet flag to
  enable control by controller. Default enabled.
* It removes all references "SafeToDetach" annoation from controller.
* It adds the new VolumesInUse field to the Node Status API object.
* It modifies the controller to use VolumesInUse instead of SafeToDetach
  annotation to gate detachment.
* There is a bug in node-problem-detector that causes VolumesInUse to
  get reset every 30 seconds. Issue https://github.com/kubernetes/node-problem-detector/issues/9
  opened to fix that.
2016-06-02 16:47:11 -07:00
dalanlan 0c567fe3f6 fix #25345 2016-06-01 11:24:39 +08:00
Chao Xu f32f3966d6 add DirectCodec; use it in release_1_3 clientset 2016-05-31 10:14:24 -07:00
Piotr Szczesniak 22dc21d703 Removed metrics api group 2016-05-31 09:48:39 +02:00
k8s-merge-robot 8a29f67fc1 Merge pull request #26524 from luxas/fix_test_typo
Automatic merge from submit-queue

Fix comment typos in #25972

@ixdy
2016-05-30 12:29:02 -07:00
k8s-merge-robot 9aeeef1d81 Merge pull request #26414 from jsafrane/reduce-sync-period
Automatic merge from submit-queue

Reduce volume controller sync period

fixes #24236 and most probably also fixes #25294.
Needs #25881! With the cache, binder is not affected by sync period. Without the cache, binding of 1000 PVCs takes more than 5 minutes (instead of ~70 seconds).

15 seconds were chosen by fair 2d10 roll :-)
2016-05-30 05:54:51 -07:00
Lucas Käldström 46525a7d19 Fix comment typos in #25972 2016-05-30 15:37:49 +03:00
Jan Safranek 2aa9f1dd8f Reduce volume controller sync period 2016-05-30 09:59:31 +02:00
Dr. Stefan Schimanski a79a420fde Move shell completion generation into 'kubectl completion' command 2016-05-30 07:23:36 +02:00
k8s-merge-robot 0fc573296d Merge pull request #26169 from victorgp/master
Automatic merge from submit-queue

Setting TLS1.2 minimum because TLS1.0 and TLS1.1 are vulnerable

TLS1.0 is known as vulnerable since it can be downgraded to SSL
https://blog.varonis.com/ssl-and-tls-1-0-no-longer-acceptable-for-pci-compliance/

TLS1.1 can be vulnerable if cipher RC4-SHA is used, and in Kubernetes it is, you can check it with
`
openssl s_client -cipher RC4-SHA -connect apiserver.k8s.example.com:443
`

https://www.globalsign.com/en/blog/poodle-vulnerability-expands-beyond-sslv3-to-tls/

Test suites like Qualys are reporting this Kubernetes issue as a level 3 vulnerability, they recommend to upgrade to TLS1.2 that is not affected, quoting Qualys:

`
RC4 should not be used where possible. One reason that RC4 was still being used was BEAST and Lucky13 attacks against CBC mode ciphers in
SSL and
TLS. However, TLSv 1.2 or later address these issues.
`
2016-05-29 13:24:46 -07:00
Chao Xu b3df629432 add gc and its enablement flag to kube-controller-manager 2016-05-28 14:12:33 -07:00
Clayton Coleman 51e155fc11
Conversions should generate inline copies 2016-05-28 08:52:08 -04:00
k8s-merge-robot 04bdd37bc4 Merge pull request #25972 from luxas/remove_arch_constants
Automatic merge from submit-queue

Use pause image depending on the server's platform when testing

Removed all pause image constant strings, now the pause image is chosen by arch. Part of the effort of making e2e arch-agnostic.

The pause image name and version is also now only in two places, and it's documented to bump both
Also removed "amd64" constants in the code. Such constants should be replaced by `runtime.GOARCH` or by looking up the server platform

Fixes: #22876 and #15140
Makes it easier for: #25730
Related: #17981

This is for `v1.3`
@ixdy @thockin @vishh @kubernetes/sig-testing @andyzheng0831 @pensu
2016-05-28 04:48:59 -07:00
k8s-merge-robot 74b20cccc6 Merge pull request #25813 from rrati/kubelet-pods-per-core
Automatic merge from submit-queue

Added pods-per-core to kubelet. #25762

Added --pods-per-core to kubelet

#25762
2016-05-28 03:08:28 -07:00
k8s-merge-robot a5222574d4 Merge pull request #25614 from justinsb/feature/flag-configure-cloud-routes
Automatic merge from submit-queue

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 23:52:51 -07:00
Alex Robinson d577550dd0 Merge pull request #26054 from gmarek/flags
Make service-range flag in controller-manager optional
2016-05-27 14:26:15 -07: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
Robert Rati 2d487f7c06 Added pods-per-core to kubelet. #25762 2016-05-27 07:10:13 -04:00
Alex Mohr edda837142 Merge pull request #25599 from caesarxuchao/orphaning-finalizer
Add orphaning finalizer logic to GC
2016-05-26 13:19:19 -07:00
Alex Mohr 6f919dc6fc Merge pull request #25634 from ericchiang/rbac_api_group
Add RBAC authorization API group and authorizer
2016-05-26 12:36:53 -07:00
Alex Mohr 4357b8a0a6 Merge pull request #25324 from jfrazelle/add-seccomp
Add Seccomp to Annotations
2016-05-26 10:50:06 -07:00
Lucas Käldström 79ca1911e1 Removed all pause image constant strings, now the pause image is chosen by arch. Part of the effort of making e2e arch-agnostic 2016-05-26 19:16:43 +03:00
Abhi Shah 965e8dce12 Merge pull request #26114 from ArtfulCoder/dnsport
Add dnsmasq as a DNS cache in kube-dns pod
2016-05-26 08:13:58 -07:00
k8s-merge-robot 6a1abc1505 Merge pull request #26001 from dchen1107/docker
Automatic merge from submit-queue

Attempt 2: Bump GCE containerVM to container-v1-3-v20160517 (Docker 1.11.1) again.

Workaround the issue of small root_maxkeys on the debian based container-vm image, and bump our image to the new alpha version for docker 1.11.1 validation. 

ref: #23397 #25893

cc/ @vishh @timstclair
2016-05-26 01:33:13 -07:00
k8s-merge-robot bda0dc88aa Merge pull request #25457 from saad-ali/expectedStateOfWorldDataStructure
Automatic merge from submit-queue

Attach Detach Controller Business Logic

This PR adds the meat of the attach/detach controller proposed in #20262.

The PR splits the in-memory cache into a desired and actual state of the world.
2016-05-26 00:41:54 -07:00
Eric Chiang ef40aa9572 pkg/master: enable certificates API and add rbac authorizer 2016-05-25 14:24:47 -07:00
Eric Chiang a3467a06cb client-gen: allow doc comment to override API group name 2016-05-25 14:16:45 -07:00
Dawn Chen a8ac041c44 Config the root_maxkeys and root_maxbytes if the existing values
are smaller than the default ones.
2016-05-25 11:47:56 -07:00
Dawn Chen 303d5a16cb Config root_maxkeys to 1000000, root_maxbytes to 25000000 2016-05-25 11:47:56 -07:00
Victor Garcia d3f3e6c969 Setting TLS1.2 minimum because TLS1.0 and TLS1.1 are vulnerable
Adding comments to explain what is wrong with each version
2016-05-25 18:14:20 +02:00