Commit Graph

2422 Commits (2e989a3c38d0dcf6e34c6a0974565d509e425a31)

Author SHA1 Message Date
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
saadali 92500a20d7 Attach detach controller business logic added
Split controller cache into actual and desired state of world.
Controller will only operate on volumes scheduled to nodes that
have the "volumes.kubernetes.io/controller-managed-attach" annotation.
2016-05-24 23:01:16 -07:00
Chao Xu 1665546d2d add finalizer logics to the API server and the garbage collector; handling DeleteOptions.OrphanDependents in the API server 2016-05-24 13:07:28 -07:00
Jess Frazelle aa8c72adaa
seccomp: add annotations and test for docker runtime
Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-05-24 12:25:21 -07:00
AdoHe 973774b0ba fix kubelet tls overwrite issue 2016-05-23 23:25:12 -04:00
Jordan Liggitt 29252acd1a Change rest storage Update interface to retrieve updated object
Add OldObject to admission attributes

Update resthandler Patch/Update admission plumbing
2016-05-23 21:09:26 -04:00
Abhishek Shah fcba7c3e5f added dns-port flag to have a custom DNS port for skydns to serve DNS requests on. updated imports 2016-05-23 14:54:00 -07:00
gmarek 08385b2c5f Make service-range flag in controller-manager optional 2016-05-23 09:37:53 +02:00
Madhusudan.C.S 3ee2b76554 Switch kube-dns to use external versioned API instead of the internal version. 2016-05-23 11:35:50 +05:30
Madhusudan.C.S 26028bce52 Handle federated service name lookups in kube-dns.
For the domain name queries that fail to match any records in the local
kube-dns cache, we check if the queried name matches the federation
pattern. If it does, we send a CNAME response to the federated name.

For more details look at the comments in the code.
2016-05-23 11:35:50 +05:30
k8s-merge-robot 8b0e9c5739 Merge pull request #24947 from hpcloud/hpe/vsphere-volume
Automatic merge from submit-queue

vSphere Volume Plugin Implementation

This PR implements vSphere Volume plugin support in Kubernetes (ref. issue #23932).
2016-05-22 20:40:14 -07:00
k8s-merge-robot 8e81025030 Merge pull request #25512 from colhom/fix-hyperkube-kubectl
Automatic merge from submit-queue

Fix hyperkube flag parsing

Hyperkube flag parsing was not playing nicely with kubectl command and sub-commands. This PR addresses that problem, and adds some tests which exercise hyperkube dispatching to nested cobra commands.

\cc @aaronlevy @kbrwn @mumoshu

fixes #24088

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-22 12:00:27 -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 82cb4c1758 Merge pull request #23930 from ArtfulCoder/vendor-skydns
Automatic merge from submit-queue

Use SkyDNS as a library for a more integrated kube DNS
2016-05-21 23:33:35 -07:00
k8s-merge-robot 4bb085c927 Merge pull request #25772 from derekwaynecarr/eviction-max-grace
Automatic merge from submit-queue

Add support for limiting grace period during soft eviction

Adds eviction manager support in kubelet for max pod graceful termination period when a soft eviction is met.

```release-note
Kubelet evicts pods when available memory falls below configured eviction thresholds
```

/cc @vishh
2016-05-21 12:43:45 -07:00
k8s-merge-robot 682c188fc8 Merge pull request #25738 from wojtek-t/default_protobuf
Automatic merge from submit-queue

Use protobufs by default to communicate with apiserver (still store JSONs in etcd)

@lavalamp @kubernetes/sig-api-machinery
2016-05-21 11:48:25 -07:00
Abitha Palaniappan 95c009dbdb Adding vSphere Volume support for vSphere Cloud Provider 2016-05-21 11:00:14 -07:00
k8s-merge-robot 346f965871 Merge pull request #25694 from cjcullen/authncache
Automatic merge from submit-queue

Cache Webhook Authentication responses

Add a simple LRU cache w/ 2 minute TTL to the webhook authenticator.

Kubectl is a little spammy, w/ >= 4 API requests per command. This also prevents a single unauthenticated user from being able to DOS the remote authenticator.
2016-05-21 10:48:38 -07:00
k8s-merge-robot 9c9bdb2494 Merge pull request #25502 from swagiaal/attach-interface-pvc
Automatic merge from submit-queue

Add support for PersistentVolumeClaim in Attacher/Detacher interface

The attach detach interface does not support volumes which are referenced through PVCs. This PR adds that support
2016-05-21 06:25:34 -07:00
Wojciech Tyczynski 0f881d6120 Use protobufs by default to communicate with apiserver 2016-05-21 11:38:32 +02:00
Abhishek Shah 3ada2170a3 pr feedback 2016-05-20 23:25:18 -07:00
Mike Danese fbf6bbc49a Merge pull request #25596 from derekparker/inotify
kubelet: Optionally, have kubelet exit if lock file contention is observed, using --exit-on-lock-contention flag
2016-05-20 16:40:10 -07:00
Abhishek Shah e5dd1c4c0a added cmd/kube-dns 2016-05-20 15:08:11 -07:00
derekwaynecarr 2a1d3faf08 kubelet support for max grace period during soft eviction 2016-05-20 11:30:08 -04: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
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
k8s-merge-robot d89d45a861 Merge pull request #25266 from smarterclayton/common_storage
Automatic merge from submit-queue

kube-apiserver options should be decoupled from impls

A few months ago we refactored options to keep it independent of the
implementations, so that it could be used in CLI tools to validate
config or to generate config, without pulling in the full dependency
tree of the master.  This change restores that by separating
server_run_options.go back to its own package.

Also, options structs should never contain non-serializable types, which
storagebackend.Config was doing with runtime.Codec. Split the codec out.

Fix a typo on the name of the etcd2.go storage backend.

Finally, move DefaultStorageMediaType to server_run_options.

@nikhiljindal as per my comment in #24454, @liggitt because you and I
discussed this last time
2016-05-19 06:13:38 -07:00
Clayton Coleman 5e4308f91d
Update use of Quantity in other classes 2016-05-19 08:41:43 -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
Derek Parker f307e97f87 kubelet: Add --exit-on-lock-contention flag
This patch adds the --exit-on-lock-contention flag, which must be used
in conjunction with the --lock-file flag. When provided, it causes the
kubelet to wait for inotify events for that lock file. When an 'open'
event is received, the kubelet will exit.
2016-05-18 16:21:47 -07:00
CJ Cullen 57f96a932f Add expiration LRU cache for webhook token authenticator. 2016-05-18 11:58:11 -07:00
Clayton Coleman 633683c08d
kube-apiserver options should be decoupled from impls
A few months ago we refactored options to keep it independent of the
implementations, so that it could be used in CLI tools to validate
config or to generate config, without pulling in the full dependency
tree of the master.  This change restores that by separating
server_run_options.go back to its own package.

Also, options structs should never contain non-serializable types, which
storagebackend.Config was doing with runtime.Codec. Split the codec out.

Fix a typo on the name of the etcd2.go storage backend.

Finally, move DefaultStorageMediaType to server_run_options.
2016-05-18 10:39:21 -04: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
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
Chao Xu c73406bcfe the garbage collector controller 2016-05-15 16:04:19 -07:00
k8s-merge-robot e10625cdcc Merge pull request #25033 from smarterclayton/use_upstream_conversion
Automatic merge from submit-queue

Conversions have kube-isms and are not portable for downstream

Some minor fixes to enable generators for OpenShift and others who need
to generate conversions on Kube API groups outside the core.

@deads2k
2016-05-15 04:54:54 -07:00
k8s-merge-robot 5df28fa18d Merge pull request #24647 from yifan-gu/rkt_gc
Automatic merge from submit-queue

rkt: Refactor GarbageCollect to enforce GCPolicy.

Previously, we uses `rkt gc` to garbage collect dead pods, which is very coarse, and can cause the dead pods to be removed too aggressively. 

This PR improves the garbage collection, now after one GC iteration:
- The deleted pods will be removed.
- If the number of containers exceeds gcPolicy.MaxContainers,
  then containers whose ages are older than gcPolicy.minAge will be removed.

cc @kubernetes/sig-node @euank @sjpotter 

Pending on #23887 for the Godep updates.

<!-- 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/24647)
<!-- Reviewable:end -->
2016-05-14 12:13:01 -07:00
k8s-merge-robot da3bd75db8 Merge pull request #20358 from nikhiljindal/federatedProxy
Automatic merge from submit-queue

federated api servers: Adding a discovery summarizer server

Ref https://github.com/kubernetes/kubernetes/issues/20229

The server reads a config file to get the list of federated servers and then surfaces the combined discovery information at `/api` and `/apis`.


cc @kubernetes/sig-api-machinery @lavalamp

<!-- 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/20358)
<!-- Reviewable:end -->
2016-05-14 05:55:33 -07:00
k8s-merge-robot 67eaa02bd1 Merge pull request #25453 from nikhiljindal/fedServerAuth
Automatic merge from submit-queue

Moving federation-apiserver to use genericapiserver.ServerRunOptions and deleting federation-apiserver options

The remaining params were related to authz and authn and one parameter for WatchCacheSize.
Have moved them to genericapiserver.ServerRunOptions and now federation-apiserver can just use genericapiserver.ServerRunOptions()


cc @jianhuiz @kubernetes/sig-cluster-federation
2016-05-14 03:24:34 -07:00
k8s-merge-robot 0165fd2f6f Merge pull request #25443 from nikhiljindal/tryingClientGen
Automatic merge from submit-queue

Adding Services to federation clientset

Commits:
1. Regenerate the client without any changes to client-gen
2. Update clientgen to add a parameter to specify generating client only for Services v1 object.
3. Regenerate federation_internalclientset
4. Regenerate federation_release_1_3


Second commit is the most important one. Other 3 commits are auto generated by running client-gen.
I have added a command line argument to client-gen that takes in a list of group/version/resource. If a group version is part of this list, then only the resources in this list are included in the client. For other group versions, the existing check of genclient=true in types.go is used.

Other alternatives considered were:
* Update genclient in types.go to mention the clientset name in which it should be included instead of just saying genclient=true (so Services will say genclient=core,federation while all other v1 resources will say genclient=core). This requires a code change in types.go to change a client set.
* Create another types.go which will only include Services and use that to generate federation clientset. This will lead to duplicate Service definition.


cc @caesarxuchao @lavalamp @jianhuiz @mfanjie @kubernetes/sig-cluster-federation 

<!-- 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/25443)
<!-- Reviewable:end -->
2016-05-14 00:20:28 -07:00
Jeff Lowdermilk 9a20ca2899 Merge pull request #25163 from derekwaynecarr/pod-eviction-grace-period-flag
Pod eviction grace period flag
2016-05-13 16:17:27 -07:00
Colin Hom fd1771e7ae Fix hyperkube flag parsing
hyperkube kubectl cobra subcommands now work as expected.

Add unit tests with hyperkube subcommands
2016-05-13 15:41:22 -07:00
Yifan Gu 9d5bcf4251 rkt: Add tests for GarbageCollect(). 2016-05-13 15:13:52 -07:00
nikhiljindal 73895c0418 Updating client-gen to support a user specified override on the resources to be included in generated client 2016-05-13 14:12:58 -07:00
nikhiljindal 65c1dc8b84 Adding a discovery summarizer server 2016-05-13 13:52:23 -07:00
Matt Liggett 2bc46d5085 It's 2016, yo. 2016-05-13 12:41:40 -07:00
derekwaynecarr d6354a54ad Add kubelet flag for eviction max pod grace period 2016-05-13 11:19:05 -04:00
Sami Wagiaalla 56ccd98db8 Add support for PersistentVolumeClaim in Attacher/Detacher interface
- Dereference PVCs in kubelet.
- Add getPersistentVolumebySpec to kubelet.
- Call getPersistentVolumebySpec from mount External volumes
- Add applyPVAnnotations to kubelet.
- Delete persistent_claim plugin.
2016-05-12 17:46:39 -04:00
derekwaynecarr 2c01edf9ea Add eviction-pressure-transition-period flag to kubelet 2016-05-12 17:33:00 -04:00
k8s-merge-robot 08440b5dcc Merge pull request #24836 from Clarifai/gpu-impl
Automatic merge from submit-queue

WIP v0 NVIDIA GPU support

```release-note
* Alpha support for scheduling pods on machines with NVIDIA GPUs whose kubelets use the `--experimental-nvidia-gpus` flag, using the alpha.kubernetes.io/nvidia-gpu resource 
```

Implements part of #24071 for  #23587

I am not familiar with the scheduler enough to know what to do with the scores. Mostly punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and docs

cc @erictune @davidopp @dchen1107 @vishh @Hui-Zhi @gopinatht
2016-05-12 14:04:15 -07:00
k8s-merge-robot f45bcc5ffb Merge pull request #24900 from ericchiang/rbac_types
Automatic merge from submit-queue

pkg/apis/rbac: Add Openshift authorization API types

This PR updates #23396 by adding the Openshift RBAC types to a new API group.

Changes from Openshift:

* Omission of [ResourceGroups](4589987883/pkg/authorization/api/types.go (L32-L104)) as most of these were Openshift specific. Would like to add the concept back in for a later release of the API.
* Omission of IsPersonalSubjectAccessReview as its implementation relied on Openshift capability.
* Omission of SubjectAccessReview and ResourceAccessReview types. These are defined in `authorization.k8s.io`

~~API group is named `rbac.authorization.openshift.com` as we omitted the AccessReview stuff and that seemed to be the lest controversial based on conversations in #23396. Would be happy to change it if there's a dislike for the name.~~ Edit: API groups is named `rbac`, sorry misread the original thread.

As discussed in #18762, creating a new API group is kind difficult right now and the documentation is very out of date. Got a little help from @soltysh but I'm sure I'm missing some things. Also still need to add validation and a RESTStorage registry interface. Hence "WIP".

Any initial comments welcome.

cc @erictune @deads2k @sym3tri @philips
2016-05-12 13:03:50 -07:00
nikhiljindal 5dffe4a969 Moving federation apiserver to use genericapiserver.ServerRunOptions 2016-05-11 23:42:55 -07:00
k8s-merge-robot 0ef4c6407b Merge pull request #24902 from cjcullen/webhookAuthn
Automatic merge from submit-queue

Webhook Token Authenticator

Add a webhook token authenticator plugin to allow a remote service to make authentication decisions.
2016-05-11 22:08:58 -07:00
k8s-merge-robot 4e57c80052 Merge pull request #24600 from pweil-/psp
Automatic merge from submit-queue

PSP admission

```release-note
Update PodSecurityPolicy types and add admission controller that could enforce them
```

Still working on removing the non-relevant parts of the tests but I wanted to get this open to start soliciting feedback.

- [x] bring PSP up to date with any new features we've added to SCC for discussion
- [x] create admission controller that is a pared down version of SCC (no ns based strategies, no user/groups/service account permissioning)
- [x] fix tests

@liggitt @pmorie - this is the simple implementation requested that assumes all PSPs should be checked for each requests.  It is a slimmed down version of our SCC admission controller

@erictune @smarterclayton
2016-05-11 21:26:45 -07:00
Paul Weil 4970f0c02d PSP admission 2016-05-11 18:07:36 -04:00
David Oppenheimer 4ae37df7b7 Remove myself from a bunch of OWNERS files, as I am too overloaded
to do so many code reviews right now.
2016-05-11 13:34:51 -07:00
k8s-merge-robot e0f7de94f5 Merge pull request #25279 from piosz/hpa-ga
Automatic merge from submit-queue

Move internal types of hpa from pkg/apis/extensions to pkg/apis/autoscaling

ref #21577

@lavalamp could you please review or delegate to someone from CSI team?
@janetkuo could you please take a look into the kubelet changes?

cc @fgrzadkowski @jszczepkowski @mwielgus @kubernetes/autoscaling
2016-05-11 13:19:42 -07:00
Clayton Coleman 4554889ae9
Conversions have kube-isms and are not portable for downstream
Some minor fixes to enable generators for OpenShift and others who need
to generate conversions on Kube API groups outside the core.
2016-05-11 14:04:03 -04:00
Eric Chiang 6a1f46895e pkg/apis: rbac types added 2016-05-11 12:01:06 +02:00
CJ Cullen eb3b0e78b4 Add a webhook token authenticator plugin. 2016-05-10 14:54:35 -07:00
Maciej Szulik 5ef870d4c7 Added JobTemplate, a preliminary step for ScheduledJob and Workflow 2016-05-10 21:48:39 +02:00
k8s-merge-robot 14b8f3350a Merge pull request #25008 from saad-ali/attachControllerSkeletonActual
Automatic merge from submit-queue

Introduce skeleton of new attach/detach controller

This PR introduces the skeleton of the new attach/detach controller for #20262
2016-05-10 04:04:29 -07:00
nikhiljindal 2ffa3b4586 Moving StorageFactory building logic to genericapiserver 2016-05-10 00:57:11 -07:00
David Oppenheimer c7343fc4fc Merge pull request #24853 from kevin-wangzefeng/pod-anti-affinity-admission-controller
Pod anti affinity admission controller
2016-05-10 00:13:22 -07:00
Rudi Chiarito 362c763fca WIP v0 NVIDIA GPU support
Implements part of #24071

I am not familiar with the scheduler enough to know what to do with the scores. Punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and user docs
2016-05-09 19:20:05 -04:00
saadali 214b4c28bc Skeleton of new attach detach controller 2016-05-09 11:34:11 -07:00
Kevin b7014561c1 Add admission controller to limit pod anti affinity topologykey to node level 2016-05-09 12:23:41 +00:00
k8s-merge-robot 2cf511b1f5 Merge pull request #24750 from derekwaynecarr/kubelet_eviction_flag_parsing
Automatic merge from submit-queue

Kubelet eviction flag parsers and tests

The first two commits are from https://github.com/kubernetes/kubernetes/pull/24559 that have achieved LGTM.  

The last commit is only part that is interesting, it adds the parsing logic to handle the flags, and reserves `pkg/kubelet/eviction` for eviction manager logic.
2016-05-09 04:15:04 -07:00
Piotr Szczesniak 212b459817 Move internal types of hpa from pkg/apis/extensions to pkg/apis/autoscaling 2016-05-09 09:18:13 +02:00
k8s-merge-robot fa95788e56 Merge pull request #24242 from thockin/godep_vendor_dir
Automatic merge from submit-queue

Move godeps to vendor/

This is a first-step towards glide support, maybe we don't want or need to take this, but it was easy to try.

This fails to compile, not sure why:

```
# k8s.io/kubernetes/pkg/apis/extensions/v1beta1
_output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go:2703: undefined: extensions.ClusterAutoscaler
_output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go:2703: undefined: ClusterAutoscaler
_output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go:2719: undefined: extensions.ClusterAutoscaler
_output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go:2719: undefined: ClusterAutoscaler
_output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go:2723: undefined: extensions.ClusterAutoscalerList
_output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go:2723: undefined: ClusterAutoscalerList
_output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go:3468: Convert_extensions_JobSpec_To_v1beta1_JobSpec redeclared in this block
	previous declaration at _output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go:328
_output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go:3845: Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus redeclared in this block
	previous declaration at _output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go:98
_output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go:4737: Convert_v1beta1_JobSpec_To_extensions_JobSpec redeclared in this block
	previous declaration at _output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go:380
_output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go:5186: Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus redeclared in this block
	previous declaration at _output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go:120
_output/local/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go:2723: too many errors
!!! Error in /home/thockin/tmp/godep-vendor/src/k8s.io/kubernetes/hack/lib/golang.sh:417
```
2016-05-08 22:20:09 -07:00
k8s-merge-robot 5dd087040b Merge pull request #24511 from pbx0/kubelet-symlink
Automatic merge from submit-queue

cluster/images/hyperkube: create symlink for each server

Add a kubelet symlink so that the hyperkube image can appear as a kubelet image. https://github.com/kubernetes/kubernetes/issues/24510
2016-05-08 21:31:23 -07:00
Tim Hockin 7aff0f1486 Rename codecgen "testdata" dir so ugorji works
Go mistreats "testdata" and can't find vendor/ dirs.
2016-05-08 20:32:09 -07:00
Tim Hockin 92567e1b06 Make go2idl handle vendor dirs 2016-05-08 20:30:38 -07:00
Tim Hockin cbf886c7f4 Convert everything to use vendor/ 2016-05-08 20:30:37 -07:00
k8s-merge-robot 5988080396 Merge pull request #23795 from mqliang/rc-ns-index
Automatic merge from submit-queue

add namespace index for cache

@wojtek-t 

Implement in this approach make the change of lister.go small, but we should replace all `NewInformer()` to `NewIndexInformer()`, even when someone not want to filter by namespace(eg. gc_controller and scheduler). Any suggestion?
2016-05-08 12:09:01 -07:00
k8s-merge-robot 8a04506546 Merge pull request #23009 from uluyol/c-pause
Automatic merge from submit-queue

Reimplement 'pause' in C - smaller footprint all around

Statically links against musl. Size of amd64 binary is 3560 bytes.

I couldn't test the arm binary since I have no hardware to test it on, though I assume we want it to work on a raspberry pi.

This PR also adds the gcc5/musl cross compiling image used to build the binaries.

@thockin
2016-05-08 09:29:32 -07:00
Clayton Coleman 123f6984d1
Always inline default functions on all packages 2016-05-07 11:49:46 -04:00
Matt Liggett c00fa39eee Define PodDisruption API types. 2016-05-06 17:24:53 -07:00
Robert Bailey 01c6b37422 Merge pull request #25054 from yujuhong/rm_tests
Remove redundant RC and service tests in integration.go
2016-05-06 15:05:32 -07:00
Robert Bailey 2f65d2e617 Merge pull request #24666 from smarterclayton/munge_upstream
mungedocs should not assume upstream remote
2016-05-06 13:37:35 -07:00
derekwaynecarr 725af223aa Add parsers for eviction thresholds 2016-05-06 12:06:03 -04:00
mqliang c10f43a2e5 implement AddIndexers for SharedIndexInformer 2016-05-06 21:23:18 +08:00
mqliang 9011207f18 add namespace index to rc and pod 2016-05-06 17:12:36 +08:00
Kevin 82ba4f077e implement inter pod topological affinity and anti-affinity 2016-05-06 06:46:23 +00:00
k8s-merge-robot 4a7ec6034f Merge pull request #23928 from caesarxuchao/cascading-deletion-API-changes
Automatic merge from submit-queue

API changes for Cascading deletion 

This PR includes the necessary API changes to implement cascading deletion with finalizers as proposed is in #23656. Comments are welcome.

@lavalamp @derekwaynecarr @bgrant0607 @rata @hongchaodeng
2016-05-05 19:46:40 -07:00
Patrick Baxter 4d35231bd6 cmd/hyperkube: add make-symlinks flag 2016-05-05 21:36:18 +00:00
Clayton Coleman e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
k8s-merge-robot f5e1e9a227 Merge pull request #24912 from bprashanth/petset_controller
Automatic merge from submit-queue

Petset controller

Took longer than I expected. Main parts of this pr are:
1. Identity generation based on petset spec (volumes are mapped per discussion in #18016)
2. Ensure that we create/delete pets in sequence
3. Ensuring that we create, wait for healthy, create; or delete, wait for terminationGrace, delete
4. Controller that watches apiserver and drives actual -> desired

PVCs are not deleted, yet.
2016-05-05 08:58:23 -07:00
k8s-merge-robot 085b172395 Merge pull request #24887 from nikhiljindal/runOptions
Automatic merge from submit-queue

Deleting duplicate code from federated-apiserver.Run()

This removes most of duplicate code from federated-apiserver.Run().
The code remaining is related to storage or authz and authn.
https://github.com/kubernetes/kubernetes/pull/24787 refactors the storage related code.
I am still figuring out authz and authn.

cc @jianhuiz
2016-05-05 06:50:56 -07:00
Chao Xu 4562a26d34 generated changes 2016-05-04 21:54:55 -07:00
Muhammed Uluyol f3690e2d5e
build/pause: write in C
Builds statically against glibc. References to the old pause
image have been updated.
2016-05-04 21:45:52 -04:00
Prashanth Balasubramanian 6bc3052551 PetSet alpha controller 2016-05-04 18:39:17 -07:00
k8s-merge-robot 93e3df8e55 Merge pull request #24789 from wojtek-t/use_proper_codec_in_client
Automatic merge from submit-queue

Use proper codec in client
2016-05-04 11:00:04 -07:00
Wojciech Tyczynski b4c83022e3 Add NegotiatedSerializer to config 2016-05-04 10:02:58 +02:00
Yu-Ju Hong a3d5a4f358 Remove redundant RC and service tests in integration.go 2016-05-03 17:13:10 -07:00
nikhiljindal 16c0e0a21c Deleting duplicate code from federated-apiserver 2016-05-03 14:04:09 -07:00
Clayton Coleman c4b192b67b
Protobuf generation should strip empty-imports
The imports are generated because the packages are in the search tree,
but nothing in the generated code needs them. For now, strip them.
2016-05-02 18:12:20 -04:00
k8s-merge-robot 8fba6de835 Merge pull request #24117 from XiaoningDing/federation-client
Automatic merge from submit-queue

Federation client for cluster

generate v1alpha1 and unversioned client for federation/clusters

#23653, requires #23847, #23998

@nikhiljindal @quinton-hoole @caesarxuchao
2016-05-02 01:41:08 -07:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
k8s-merge-robot 11298d02e0 Merge pull request #24455 from hongchaodeng/fl
Automatic merge from submit-queue

Provide flags to use etcd3 backed storage

ref: #24405

What's in this PR?
- Add a new flag "storage-backend" to choose "etcd2" or "etcd3". By default (i.e. empty), it's "etcd2".
- Take out etcd config code into a standalone package and let it create etcd2 or etcd3 storage backend given user input.
2016-04-29 08:49:04 -07:00
jianhuiz d169fa6864 generate v1alpha and unversioned clientset for federation/clusters 2016-04-28 16:27:22 -07:00
k8s-merge-robot 4a0e0826e5 Merge pull request #24220 from gmarek/metrics
Automatic merge from submit-queue

Generated clients can return their RESTClients, RESTClient can return its RateLimiter

cc @lavalamp @krousey @wojtek-t @smarterclayton @timothysc 

Ref. #22421
2016-04-27 19:25:38 -07:00
Hongchao Deng c0071a1595 add flags to enable etcd3 2016-04-28 09:48:16 +08:00
Clayton Coleman 4636af5b87
mungedocs should not assume upstream remote
The standard Git convention is "origin", not "upstream", so make it
flexible in the scripts for those who are set up differently.
2016-04-27 21:33:09 -04:00
gmarek 3171aac57c Generated clients can return their RESTClients, RESTClient can return its RateLimiter 2016-04-27 22:15:10 +02:00
k8s-merge-robot 3a19ad7908 Merge pull request #24559 from derekwaynecarr/eviction_flags
Automatic merge from submit-queue

Add kubelet flags for eviction threshold configuration

This PR just adds the flags for kubelet eviction and the associated generated code.

I am happy to tweak text, but we can also do that later at this point in the release.

Since this causes codegen, I wanted to stage this first.

/cc @vishh @kubernetes/sig-node
2016-04-27 10:25:48 -07:00
jianhuiz 3bdd4130cd add protobuf generation 2016-04-26 02:08:10 -07:00
jianhuiz fcb241d05c add api group 'federation' and 'cluster' object 2016-04-26 02:05:51 -07:00
k8s-merge-robot 293b0d0815 Merge pull request #23493 from soltysh/move_job_internals
Automatic merge from submit-queue

Move internal types of job from pkg/apis/extensions to pkg/apis/batch

This addressed the job part of #23216, this is still WIP. Will notify once finished. I'd like to have it in before starting working on ScheduledJob. 

@lavalamp @erictune fyi
2016-04-25 20:58:49 -07:00
k8s-merge-robot b04f6ffc48 Merge pull request #24646 from nikhiljindal/removeMasterDep
Automatic merge from submit-queue

Move SSHTunneler to genericapiserver and remove federated-apiserver's dependency on pkg/master

cc @jianhuiz
2016-04-25 19:50:37 -07:00
Maciej Szulik a3b4447305 Move internal types of job from pkg/apis/extensions to pkg/apis/batch 2016-04-25 11:03:54 +02:00
derekwaynecarr 3c9ab576c2 Add kubelet flags for eviction threshold config 2016-04-24 19:03:23 -04: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
nikhiljindal f9f1e21e08 Moving master.SSHTunneler to genericapiserver 2016-04-22 11:47:05 -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
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 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
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
deads2k 6670b73b18 make storage enablement, serialization, and location orthogonal 2016-04-21 08:18:55 -04:00
Wojciech Tyczynski d6896fa45a Allow setting content-type in binaries 2016-04-21 14:12:13 +02:00
Chao Xu 8537095415 use fully qualified resource in fake clients actions 2016-04-20 19:44:40 -07:00
Prashanth Balasubramanian 0ac10c6cc2 PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00
k8s-merge-robot 8a76a1bd36 Merge pull request #24234 from goltermann/vetclean
Automatic merge from submit-queue

Enable go vet.
2016-04-20 14:50:37 -07:00
k8s-merge-robot 6402b04cf3 Merge pull request #24395 from caesarxuchao/use-serializer
Automatic merge from submit-queue

client-gen: use serializer instead of codec for versioned client

For a versioned client, because the output of every client method is a versioned object, so it should use a serializer instead of a codec that does conversion.

@lavalamp @krousey
2016-04-20 10:48:41 -07:00
goltermann 3fa6c6f6d9 Enable vet 2016-04-20 09:48:24 -07:00
k8s-merge-robot 60afb8f005 Merge pull request #24454 from nikhiljindal/duplicateRun
Automatic merge from submit-queue

genericapiserver: Moving more flags to ServerRunOptions

Moving more apiserver flags to generic api server.

With this change, most of the Config is created in genericapiserver.NewConfig(). The plan is to move everything there.
I didnt touch Storage related params as they are being changed in https://github.com/kubernetes/kubernetes/pull/23208.
And I will handle authz and authn in another PR (need to figure out a few things).

cc @lavalamp @kubernetes/sig-api-machinery
2016-04-20 03:49:35 -07:00
k8s-merge-robot 8c170ff5ff Merge pull request #24498 from caesarxuchao/dot-deepcopy-gen
Automatic merge from submit-queue

Remove dot in generated deepcopy package name

ref https://github.com/kubernetes/kubernetes/pull/20573#issuecomment-212125061

cc @wojtek-t 

I tested with #20573 to verify hack/codegen.sh worked and the generated code compiled.
2016-04-20 01:09:37 -07:00
k8s-merge-robot 28f968aa1a Merge pull request #24505 from yujuhong/remove_test
Automatic merge from submit-queue

Remove disabled mirror pod test in cmd/integration

The new tests for mirror pods are being added in the node e2e suite.

This partially addresses #24440
2016-04-19 22:36:43 -07:00
CJ Cullen 760568796f Masquerade traffic from off-cluster going through kube-proxy. 2016-04-19 21:39:34 -07:00
Yu-Ju Hong 3e2901a09a Remove disabled mirror pod test in cmd/integration
The new tests for mirror pods are being added in the node e2e suite.
2016-04-19 16:38:12 -07:00
Chao Xu 2b0c849e83 remove dot in deepcopy package name 2016-04-19 14:01:41 -07:00
Chao Xu 4b5ef393c8 client-gen: use serializer instead of codec for versioned client 2016-04-19 13:42:07 -07:00
k8s-merge-robot 9187a7aeb3 Merge pull request #24416 from caesarxuchao/add-fake-testoutput
Automatic merge from submit-queue

Client-gen: Add fake clients to testoutput; fix the imports in fake clients

Start generating fake client in the testoutput, so that we can check the fake client is generated correctly under extreme conditions.

Fix the problem reported https://github.com/kubernetes/kubernetes/pull/20573#issuecomment-210556618, where the import names contain dots when the group name contains dots.

cc @deads2k
2016-04-19 12:08:02 -07:00
Chao Xu 442c079e63 generate the fake clients in testoutput 2016-04-19 10:55:19 -07:00
Chao Xu 79c3d6683c Client-gen: add fake clients to testoutput; in fake clients, fix the imports of packages that contains dots in the name 2016-04-19 10:55:01 -07:00
k8s-merge-robot db28f73c3b Merge pull request #24282 from goltermann/spelling
Automatic merge from submit-queue

Fix misspellings in comments
2016-04-19 03:47:07 -07:00
nikhiljindal 50a9aceabb Moving more logic to genericapiserver 2016-04-19 00:03:28 -07:00
deads2k f0c33d65b6 start sharing the pod cache and list/watch 2016-04-18 08:51:55 -04:00
k8s-merge-robot 62fd60565a Merge pull request #24048 from liggitt/apiserver-defaults
Automatic merge from submit-queue

Use correct defaults when binding apiserver flags

defaults should be set in the struct-creating function, then the current struct field value used as the default when binding the flag
2016-04-17 20:59:38 -07:00
k8s-merge-robot a275a045d1 Merge pull request #23914 from sky-uk/make-etcd-cache-size-configurable
Automatic merge from submit-queue

Make etcd cache size configurable

Instead of the prior 50K limit, allow users to specify a more sensible size for their cluster.

I'm not sure what a sensible default is here. I'm still experimenting on my own clusters. 50 gives me a 270MB max footprint. 50K caused my apiserver to run out of memory as it exceeded >2GB. I believe that number is far too large for most people's use cases.

There are some other fundamental issues that I'm not addressing here:
- Old etcd items are cached and potentially never removed (it stores using modifiedIndex, and doesn't remove the old object when it gets updated)
- Cache isn't LRU, so there's no guarantee the cache remains hot. This makes its performance difficult to predict. More of an issue with a smaller cache size.
- 1.2 etcd entries seem to have a larger memory footprint (I never had an issue in 1.1, even though this cache existed there). I suspect that's due to image lists on the node status.

This is provided as a fix for #23323
2016-04-17 00:06:31 -07:00
k8s-merge-robot 957ee1d50a Merge pull request #23819 from rrati/controller-manager-startup-delay
Automatic merge from submit-queue

Added optional delays to starting controller managers. #22669
2016-04-16 15:33:32 -07:00
k8s-merge-robot ff1da7674d Merge pull request #24268 from wojtek-t/remove_old_conversions_generator
Automatic merge from submit-queue

Remove old conversion generator
2016-04-15 04:25:19 -07:00
Wojciech Tyczynski 89e860e622 Remove old conversion generator 2016-04-15 12:07:57 +02:00
Daniel Smith 597e26bd22 Merge pull request #24119 from smarterclayton/upstream_flags
Move a kubelet flag default to the right place
2016-04-14 16:57:09 -07:00
goltermann c226c9435b Fix misspellings in comments.
https://goreportcard.com/report/k8s.io/kubernetes#misspell
2016-04-14 13:57:45 -07:00
k8s-merge-robot 5cc7c9565f Merge pull request #24059 from caesarxuchao/client-gen-dotted-group
Automatic merge from submit-queue

Client-gen: handle dotted group name, e.g., "authentication.k8s.io"

The client-gen used to assume the group name doesn't include dot, but it's not true, e.g., we have group `authentication.k8s.io`.

With this PR, Client-gen will use the full group name when creating directory (e.g., the client for the authentication group will be generated at pkg/client/clientset_generated/release_1_3/typed/`authentication.k8s.io`/v1/). However, because golang doesn't allow dot in variable/function names, so when the group name is used as part of variable/function name, client-gen extracts the part before the first dot (e.g., authentication).

This PR also changes the group name of the test group from `testgroup` to `testgroup.k8s.io` to verify if client-gen generates sane code.

cc @deads2k for #20573
2016-04-14 13:13:32 -07:00
Daniel Smith 490c68dbe3 Merge pull request #23768 from wojtek-t/conversions_with_framework_6
Migrate to new conversions generator - part 2
2016-04-14 11:30:21 -07:00
Chao Xu bc0662b3e9 generated changes 2016-04-14 10:04:59 -07:00
Chao Xu 08fc35018a Client-gen: handle dotted package name 2016-04-14 10:04:58 -07:00
Jordan Liggitt 6c1bcfa28d Use correct defaults when binding apiserver flags 2016-04-14 10:12:51 -04:00
k8s-merge-robot e121b562c5 Merge pull request #23262 from sttts/sttts-bash-completion-flag-equal
Automatic merge from submit-queue

Make kubectl bash-completion namespace and resource alias aware

![kubectl-completion](https://cloud.githubusercontent.com/assets/730123/13912456/94abf9a2-ef3d-11e5-9c8a-3df7058ea8f0.gif)

- filter resource listing by `--namespace` flag given before in the command line
```bash
$ kubectl get pod --namespace=kube-system <tab><tab>
kube-dns-v9-2wuzj   kube-dns-v9-llqxa
```
- add completion of `--namespace`
```bash
$ kubectl get pod --namespace=<tab><tab>
[*]         default      ingress      kube-system
```

- add support for plural nouns and aliases like `rc`
2016-04-14 04:26:40 -07:00
k8s-merge-robot 1965c3cdd0 Merge pull request #23635 from Clarifai/version
Automatic merge from submit-queue

Add version string to "Kubelet started" log message

Not logging versions considered harmful.
2016-04-14 00:48:11 -07:00
k8s-merge-robot df9f71fcd5 Merge pull request #23627 from ingvagabund/unit-test-for-negative-value-of-allocatable-resources
Automatic merge from submit-queue

Unit test for negative value of allocatable resources

Introduce unit test for checking resource quantities for kubelet's allocatable resources.

Covered values:

* negative quantity value: error expected
* invalid quantity unit: error expected
* valid quantity: error not expected

Running go test with -v, returned error are logged as well for more information:

```shell
=== RUN   TestValueOfAllocatableResources
--- PASS: TestValueOfAllocatableResources (0.00s)
    server_test.go:47: Returned err: "resource quantity for \"memory\" cannot be negative: -150G"
    server_test.go:47: Returned err: "unable to parse quantity's suffix"
PASS
ok          k8s.io/kubernetes/cmd/kubelet/app       0.020s
```
2016-04-14 00:48:10 -07:00
k8s-merge-robot 429228d403 Merge pull request #23953 from nikhiljindal/u8sServer
Automatic merge from submit-queue

moving genericapiserver command line flags to genericapiserver

cc @kubernetes/sig-api-machinery
2016-04-13 23:15:24 -07:00
k8s-merge-robot 20eccc24cd Merge pull request #24143 from goltermann/vetclean
Automatic merge from submit-queue

Final vet fixes; enabling vet checks in verify scripts.

Fixes #22523, #22524
2016-04-13 16:46:46 -07:00
Daniel Smith e99f05a9bb Merge pull request #23526 from tyangliu/generate-yaml-docs
Generate yaml docs for kubectl
2016-04-13 14:24:20 -07:00
goltermann a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00
nikhiljindal 8d7a8c6ae6 moving genericapiserver command line flags to genericapiserver 2016-04-13 13:28:18 -07:00
Tim St. Clair b0d3f32e88 Update test/e2e for test/e2e/framework refactoring 2016-04-13 10:50:17 -07:00
Robert Rati 83de3e9733 Added optional delays to starting controller managers. #22669 2016-04-13 09:52:28 -04:00
k8s-merge-robot f5e8e7453b Merge pull request #23806 from smarterclayton/streaming_watch
Automatic merge from submit-queue

Implement a streaming serializer for watch

Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).

@wojtek-t @lavalamp
2016-04-13 05:18:17 -07:00
k8s-merge-robot acf9492cb1 Merge pull request #23660 from goltermann/vetclean
Automatic merge from submit-queue

Additional go vet fixes

Mostly:
- pass lock by value
- bad syntax for struct tag value
- example functions not formatted properly
2016-04-12 06:22:16 -07:00
James Ravn 5bb0595260 Make deserialization cache size configurable
Instead of the default 50K entries, allow users to specify more sensible
sizes for their cluster.
2016-04-12 13:42:27 +01:00
Thomas Liu ad9f9d2ce0 Create cmd to generate kubectl yaml docs 2016-04-11 17:07:45 -07:00
Clayton Coleman 53b48fb414 Move a kubelet flag default to the right place
All defaults belong in the struct, not the flags
2016-04-11 19:30:37 -04:00
Clayton Coleman 3474911736 Implement a streaming serializer for watch
Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).
2016-04-11 11:22:05 -04:00
Wojciech Tyczynski 7448cc04e1 Switch to new generator 2016-04-11 08:04:45 +02:00
Wojciech Tyczynski cd2de7d4cd Merge pull request #23741 from wojtek-t/conversions_with_framework_5
Small improvements in conversion generator
2016-04-10 22:51:26 -07:00
Wojciech Tyczynski 6d954a1490 Merge pull request #23871 from smarterclayton/proto_timestamp
Implement a simpler unversioned.Time serialization
2016-04-10 22:47:49 -07:00
goltermann 696423e044 Vet fixes, mostly pass lock by value errors. 2016-04-06 11:27:40 -07:00
Chao Xu db518cf4ff Generated code 2016-04-06 10:17:48 -07:00
Chao Xu 027710baf5 client-gen now generates the "generated by" comment in doc.go 2016-04-05 15:24:31 -07:00
Clayton Coleman 529bd2bf98 Support protobuf.as=Message for aliasing
In order to allow a Go type to have a different internal representation,
provide the comment `// +protobuf.as=MESSAGENAME` which substitutes the
current message's members with the named message's members. Used by the
unversioned.Time type to have the same fields as unversioned.Timestamp
and to have an alternate serialization.
2016-04-04 23:00:35 -04:00
Wojciech Tyczynski 49d3c3962c Small improvements in conversion generator 2016-04-05 02:10:23 +02:00
gmarek 4788eefbe3 Remove explicit docker api version from HollowNodes 2016-04-04 20:39:09 +02:00
Dr. Stefan Schimanski 7e0bb885f1 Make kubectl bash completion namespace aware and add noun aliases
- add namespace filtering to bash completion
- add --namespace flag bash completion
- add bash completion noun aliases
- adapt to new cobra package structure
2016-04-03 16:25:56 +02:00
k8s-merge-robot 7d7ca5ab72 Merge pull request #23608 from caesarxuchao/mv-typed-clients
Automatic merge from submit-queue

Move typed clients into clientset folder

Move typed clients from `pkg/client/typed/` to `pkg/client/clientset_generated/${clientset_name}/typed`.

The first commit changes the client-gen, the last commit updates the doc, other commits are just moving things around.

@lavalamp @krousey
2016-04-02 19:31:40 -07:00
k8s-merge-robot c874d2809f Merge pull request #23436 from AdoHe/kubelet_cluster_dns
Automatic merge from submit-queue

update kubelet cluster-dns doc

refer #23320 for more detail. @thockin ptal.
2016-04-01 13:33:48 -07:00
Fabio Yeon bf07a6f5e1 Merge pull request #23452 from david-mcmahon/mungedocs
Add --norecurse bool to allow mungedocs to process kube root.
2016-04-01 12:06:56 -07:00
AdoHe 1b305ee3bd update kubelet cluster-dns doc 2016-04-01 11:34:34 -04:00
k8s-merge-robot f8ea3fab53 Merge pull request #23427 from wojtek-t/conversions_with_framework_4
Automatic merge from submit-queue

Migrate to the new conversion generator - part1

This PR contains two commits:
- few more fixes to the generator
- migration of the pkg/api/v1 to use the new generator

The second commit is big, but I reviewed the changes and they contain:
- conversions between types that we didn't even generating conversion between
- changes in how we handle maps/pointers/slices - previously we were explicitly referencing fields, now we are using "shadowing in, out" to make the code more generic
- lack of auto-generated method for ReplicationControllerSpec (because these types are different (*int vs int for Replicas) and a preexisting conversion already exists

Most of issues in the first commit (e.g. adding references to "in" and "out" for slices/maps/points) were discovered by our tests. So I'm pretty confident that this change is correct now.
2016-03-31 17:28:36 -07:00
David McMahon 37787ffe90 Add --norecurse bool to allow mungedocs to process kube root.
Run hack/after-build/update-generated-docs.sh on kube root with --norecurse and
--skip-munges=unversioned-warning.
2016-03-31 16:53:44 -07:00
Chao Xu 49559a3332 Generate the typed clients under the clientset folder 2016-03-31 15:28:45 -07:00
Clayton Coleman f2139b186c Add an experimental protobuf serializer
Provide a core protobuf serializer that can either write objects with
an envelope (a 4 byte prefix and a runtime.Object) or raw to a byte
array.
2016-03-31 10:41:11 -04:00
Janet Kuo c1596e6711 Update guestbook examples; replace RC concepts with Deployment 2016-03-30 14:16:52 -07:00
Jan Chaloupka 106c5f0b08 Introduce unit test for checking resource quantities for kubelet's allocatable resources.
Covered values:
- negative quantity value: error expected
- invalid quantity unit: error expected
- valid quantity: error not expected

Running go test with -v, returned error are logged as well for more information:

=== RUN   TestValueOfAllocatableResources
--- PASS: TestValueOfAllocatableResources (0.00s)
	server_test.go:47: negative quantity value: resource quantity for \"memory\" cannot be negative: -150G
	server_test.go:47: invalid quantity unit: unable to parse quantity's suffix
PASS
ok  	k8s.io/kubernetes/cmd/kubelet/app	0.020s
2016-03-30 19:58:21 +02:00
Rudi Chiarito 5b4f5de668 Add version string to "Kubelet started" log message 2016-03-30 12:57:10 -04:00
k8s-merge-robot 6226cbe6ca Merge pull request #23308 from yifan-gu/rkt_bump
Automatic merge from submit-queue

rkt: bump rkt version to 1.2.1

Upon bumping the rkt version, `--hostname` is supported. Also we now gets the configs from the rkt api service, so `stage1-image` is deprecated. 

cc @yujuhong @Random-Liu
2016-03-30 05:42:58 -07:00
k8s-merge-robot 2a690cc5e2 Merge pull request #23059 from luxas/auto_arch_pause
Automatic merge from submit-queue

Make kubelet use an arch-specific pause image depending on GOARCH

Related to: #22876, #22683 and #15140
@ixdy @pwittrock @brendandburns @mikedanese @yujuhong @thockin @zmerlynn
2016-03-29 23:27:42 -07:00
Chao Xu 0d37fbdff9 changes in client-gen 2016-03-29 14:49:12 -07:00
Wojciech Tyczynski 9ee8278e4a Fix remaining issues with conversion generator. 2016-03-29 09:49:27 +02:00
Yifan Gu d814d973ff rkt: Bump rkt required version. Get options from api service. 2016-03-28 17:06:14 -07:00
deads2k e8fb35d4d8 refactor resource overrides as positive logic interface 2016-03-28 09:24:49 -04:00
k8s-merge-robot 95e09e303f Merge pull request #22965 from caesarxuchao/delete-UID-precondition
Auto commit by PR queue bot
2016-03-26 09:36:28 -07:00
k8s-merge-robot e44ad7a083 Merge pull request #22735 from resouer/throttle-dev
Auto commit by PR queue bot
2016-03-26 06:44:48 -07:00
k8s-merge-robot f6fac0e4de Merge pull request #23443 from goltermann/vet2
Auto commit by PR queue bot
2016-03-25 23:43:44 -07:00
Chao Xu 3aa26565fc move fake discovery client to pkg/client/typed/discovery/fake 2016-03-25 16:02:08 -07:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
Lucas Käldström c6172e58cf Make kubelet use an arch-specific pause image depending on GOARCH 2016-03-25 23:45:59 +02:00