Commit Graph

134 Commits

Author SHA1 Message Date
Kubernetes Submit Queue
caead74171 Merge pull request #45184 from DirectXMan12/feature/metrics-client-gen-tweaks
Automatic merge from submit-queue (batch tested with PRs 46801, 45184, 45930, 46192, 45563)

Tweak client-gen to support metrics API

This PR adds support to client-gen for readonly APIs as well as for customizing the resource name used for a given type.

This is required to support the clients generated for `k8s.io/metrics/pkg/apis/metrics`.

cc @caesarxuchao 

Currently based on #45180

**Release note**:
```release-note
NONE
```
2017-06-02 18:05:50 -07:00
Kubernetes Submit Queue
8214f7bb29 Merge pull request #45839 from caesarxuchao/client-gen-vendor
Automatic merge from submit-queue

let client-gen understand vendor

This is extracted from #44784, where we move external api types to k8s.io/api. After the move, the types will locate at vendor/k8s.io/api/xxx. However, gengo index the parsed package using the import path, which is stripped of  the vendor/ prefix, so we'll need to strip the vendor/ prefix as necessary in client-gen.

This PR doesn't produce any change to the generated clientset yet since all types are still in the kubernetes repo.
2017-05-18 17:45:35 -07:00
Chao Xu
bd6a9604dc generated 2017-05-16 20:40:04 -07:00
Chao Xu
9288025c28 let client-gen understand vendor 2017-05-16 20:29:38 -07:00
Andy Goldstein
84da322766 client-gen: honor groupName overrides in customArgs
If there is a comment of the form "// +groupName=somegroup" or
"// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as
the name of the group in customArgs.GroupVersions and
customArgs.GroupVersionToInputPath.
2017-05-15 16:52:09 -04:00
Solly Ross
1cbc825fb9 [client-gen] Support Read-Only APIs
This commit adds support for read-only APIs to client-gen.
If the tag `// +readonly=true` is used, only the {Get,List,Watch}
client methods will be generated.
2017-05-10 13:33:18 -04:00
Solly Ross
392b8da1d0 [client-gen] Allow overriding the resource name
This commit allows client-gen to generate clients where the resource
name does not directly correspond to the type name.

The tag `// +resourceName=<name>` can be used to override the resource
name.
2017-05-10 13:33:17 -04:00
Chao Xu
bbb94e42c1 remove registry from testing/fixture.go; update client-gen to not use
registry in the generated clients
2017-05-04 11:30:51 -07:00
Mike Danese
a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Dr. Stefan Schimanski
b621774095 Update bazel 2017-02-28 15:28:30 +01:00
Dr. Stefan Schimanski
ee8ce696d6 client-gen: create private registry for fake clientset 2017-02-28 15:25:10 +01:00
Kubernetes Submit Queue
e5c2d716d9 Merge pull request #41887 from liggitt/watch-verb
Automatic merge from submit-queue (batch tested with PRs 39855, 41433, 41567, 41887, 41652)

Use watch param instead of deprecated /watch/ prefix

Reopen of https://github.com/kubernetes/kubernetes/pull/41722 after reverted in https://github.com/kubernetes/kubernetes/pull/41774

Required https://github.com/kubernetes/kubernetes/pull/41797 to merge first

cc @deads2k @wojtek-t
2017-02-23 09:36:35 -08:00
Dr. Stefan Schimanski
595f4ed2cb Update generated files 2017-02-22 19:03:25 +01:00
Dr. Stefan Schimanski
92c36bed4a client-set: use clientset internal scheme 2017-02-22 19:03:25 +01:00
Dr. Stefan Schimanski
49c536baee client-gen: general cleanup 2017-02-22 19:03:25 +01:00
Jordan Liggitt
7b6ef2cedc
Switch watch prefixes to params 2017-02-22 08:54:08 -05:00
Eric Chiang
58dde796ec client-go: don't import client auth provider packages 2017-02-21 09:26:03 -08:00
Wojciech Tyczynski
a21b08d00f Revert "Use watch param instead of deprecated /watch/ prefix" 2017-02-21 08:37:51 +01:00
Jordan Liggitt
f950171003
Switch watch prefixes to params 2017-02-19 23:51:58 -05:00
Jordan Liggitt
4b3462456a
Stop including full arguments list in generated clients
Including custom arguments means adding any new group/version results in a diff of all generates clients in all groups/versions
2017-01-31 11:13:37 -05:00
deads2k
9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
deads2k
2734f8f892 move dynamic and discovery clients 2017-01-26 08:37:06 -05:00
Clayton Coleman
1a49fc3283
client-gen should use metav1.DeleteOptions 2017-01-24 13:15:26 -05:00
deads2k
5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Clayton Coleman
93e7c60ae0
Generators should reference metav1.ListOptions (informer,client,fake) 2017-01-23 16:53:18 -05:00
deads2k
9c6a522882 mechanical results of client auth plugin 2017-01-20 08:05:18 -05:00
deads2k
32a2c2d05c remove old restclient 2017-01-20 07:56:35 -05:00
deads2k
c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
deads2k
26c46971f2 move PatchType to apimachinery 2017-01-17 08:32:05 -05:00
deads2k
05eb75612f replace global registry in apimachinery with global registry in k8s.io/kubernetes 2017-01-12 15:14:07 -05:00
Kubernetes Submit Queue
931bccf907 Merge pull request #38666 from tanshanshan/empty-check
Automatic merge from submit-queue (batch tested with PRs 39475, 38666, 39327, 38396, 39613)

Add checking the nil value 

**What this PR does / why we need it**:

Add checking the nil value.

Thanks.

**Special notes for your reviewer**:
2017-01-11 09:14:52 -08:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
tanshanshan
7d4b594c64 check nil 2017-01-11 11:35:36 +08:00
Jeff Grafton
20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Maciej Szulik
e0ecb09fda Fix variable name conflict in clientset generation 2016-12-17 00:07:24 +01:00
Mike Danese
c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Wojciech Tyczynski
31a5333548 Update client generator 2016-12-09 09:42:00 +01:00
Jordan Liggitt
da15bd9260
Update client status generator to not use json tags 2016-12-08 21:58:01 -05:00
Clayton Coleman
a43960da3b Move GroupVersion* to pkg/runtime/schema 2016-11-23 21:03:36 -06:00
Chao Xu
850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Mike Danese
3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Jan Chaloupka
6079053407 Update clientset generator to use RESTClient interface instead of the RESTClient data type 2016-10-21 10:13:51 +02:00
Michal Fojtik
aea9b486a0 clientgen: allow to pass custom apiPath when generating client sets 2016-10-06 11:27:29 +02:00
Chao Xu
75cc05de82 manual changes to let client-gen use versioned options 2016-10-04 20:39:29 -07:00
Chao Xu
e17e0b19ab remove special clientrepo code from main repository gcp plugin
rename plugin/pkg/client/auth/plugins.go package name to auth

add the plugin import line in client-gen

update import_known_versions for release_1_5 clientset

change copy.sh
2016-09-26 15:40:29 -07:00
Daniel Smith
e67cf8a264 gofmt 2016-09-22 13:42:46 -07:00
Daniel Smith
2709f07c71 rewrite import paths 2016-09-22 13:42:46 -07:00
Kubernetes Submit Queue
e8fbcb1669 Merge pull request #32654 from soltysh/sj_clientset
Automatic merge from submit-queue

Switch ScheduledJob controller to use clientset

**What this PR does / why we need it**:
This is part of #25442. I've applied here the same fix I've applied in the manual client in #29187, see the 1st commit for that (@caesarxuchao we've talked about it in #29856).

@deads2k as promised 
@janetkuo ptal
2016-09-16 05:03:57 -07:00
Maciej Szulik
d0236f1761 Create generated client set based on be GroupVersion passed in the
config
2016-09-14 11:27:29 +02:00
guangxuli
faf2d2c4b1 add break may be better in the loop 2016-09-13 15:41:48 +08:00