Commit Graph

145 Commits (4db004972ad943b7f2db36e6039a3166b5e925df)

Author SHA1 Message Date
deads2k 32920b5617 add subjectaccessreviews resource 2016-08-05 11:20:56 -04:00
deads2k 60dd4a5d26 interesting changes to add tokenreviews endpoint to implement webhook 2016-08-03 08:37:45 -04:00
Chao Xu 81858d755e add validateListType to pkg/api/meta/schema_test.go 2016-08-02 15:47:24 -07:00
jianhuiz 41b409b24e support included-types-overrides without version provided (group/type) 2016-07-21 14:00:35 -07:00
Wojciech Tyczynski 4d0d115690 Revert "add tokenreviews endpoint to implement webhook" 2016-07-21 09:40:35 +02:00
deads2k 2c4a9f2e8d interesting changes to add tokenreviews endpoint to implement webhook 2016-07-20 15:11:56 -04: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
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
Wojciech Tyczynski 16bf8c4008 Unify logging in generators and avoid annoying logs. 2016-07-13 15:06:44 +02: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
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
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
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -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
Hongchao Deng 55d3597456 change default value of QPS and burst to constant 2016-06-28 21:45:35 -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
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
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
Chao Xu a29f6aa8ae add Patch to clientsets 2016-06-17 10:30:58 -07:00
Chao Xu f32f3966d6 add DirectCodec; use it in release_1_3 clientset 2016-05-31 10:14:24 -07:00
Eric Chiang a3467a06cb client-gen: allow doc comment to override API group name 2016-05-25 14:16:45 -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
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
Matt Liggett 2bc46d5085 It's 2016, yo. 2016-05-13 12:41:40 -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
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
Chao Xu 4562a26d34 generated changes 2016-05-04 21:54:55 -07:00
Wojciech Tyczynski b4c83022e3 Add NegotiatedSerializer to config 2016-05-04 10:02:58 +02: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
jianhuiz d169fa6864 generate v1alpha and unversioned clientset for federation/clusters 2016-04-28 16:27:22 -07:00
gmarek 3171aac57c Generated clients can return their RESTClients, RESTClient can return its RateLimiter 2016-04-27 22:15:10 +02: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
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
gmarek b76bed0cc9 All clients under ClientSet share one RateLimiter. 2016-04-21 18:48:22 +02:00
Chao Xu 8537095415 use fully qualified resource in fake clients actions 2016-04-20 19:44:40 -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
Chao Xu 4b5ef393c8 client-gen: use serializer instead of codec for versioned client 2016-04-19 13:42:07 -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
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
goltermann a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00