Commit Graph

381 Commits

Author SHA1 Message Date
Joe Finney
8ce98ba3d4 Make one of the go2idl unit tests pass in a sandbox. 2016-12-21 16:01:11 -08:00
Kubernetes Submit Queue
7e1cacaa91 Merge pull request #38440 from justinsb/conversion_gen_safe_at_some_speeds
Automatic merge from submit-queue

conversion-gen: add --skip-unsafe flag

We should expose the SkipUnsafe option, for legacy compatability, so
that conversion-go can be used in other projects, and for platforms
where unsafe is not available.

Make unsafe code generation the default though, and have the help text
hint that the resulting code is sub-optimal.
2016-12-18 09:16:16 -08:00
Maciej Szulik
e0ecb09fda Fix variable name conflict in clientset generation 2016-12-17 00:07:24 +01:00
Chao Xu
03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Mike Danese
c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Jordan Liggitt
4536388909
Update bazel 2016-12-09 16:26:06 -05:00
Jordan Liggitt
fcf5bbccd6
Fix references from serializable types to use v1.ObjectMeta 2016-12-09 16:26:04 -05:00
Jordan Liggitt
711986876b
Remove generated codecs for internal types 2016-12-09 16:26:04 -05:00
Jordan Liggitt
d5afb71cf4
Remove json serialization annotations from internal types 2016-12-09 16:26:03 -05:00
Wojciech Tyczynski
aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski
cff55e5894 Autogenerate clients 2016-12-09 09:42:01 +01:00
Wojciech Tyczynski
31a5333548 Update client generator 2016-12-09 09:42:00 +01:00
Justin Santa Barbara
dd351db799 conversion-gen: add --skip-unsafe flag
We should expose the SkipUnsafe option, for legacy compatability, so
that conversion-go can be used in other projects, and for platforms
where unsafe is not available.

Make unsafe code generation the default though, and have the help text
hint that the resulting code is sub-optimal.
2016-12-09 02:33:22 -05:00
Jordan Liggitt
da15bd9260
Update client status generator to not use json tags 2016-12-08 21:58:01 -05:00
deads2k
8ae8bf02a4 regenerate informers 2016-12-07 07:54:04 -05:00
deads2k
97854b8de5 update informer generator 2016-12-07 07:48:24 -05:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Clayton Coleman
138267c876
Switch generator logic to use pkg/apis/meta/v1 2016-12-03 18:57:30 -05:00
Kubernetes Submit Queue
f3d463f114 Merge pull request #37643 from ncdc/informer-gen
Automatic merge from submit-queue (batch tested with PRs 35300, 36709, 37643, 37813, 37697)

Add generated informers

Add informer-gen and the informers it generates. We'll do follow-up PRs to convert everything currently using the hand-written informers to the generated ones.

TODO:

- [x] switch to `GroupVersionResource`
- [x] finish godoc

@deads2k @caesarxuchao @sttts @liggitt
2016-12-03 08:55:57 -08:00
Andy Goldstein
3bc87f9338 Add generated informers 2016-11-30 09:17:12 -05:00
Clayton Coleman
3dde81f8d0
Remove references to v1/internal ExportOptions 2016-11-27 23:21:06 -05:00
Clayton Coleman
35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Clayton Coleman
a43960da3b Move GroupVersion* to pkg/runtime/schema 2016-11-23 21:03:36 -06:00
mbohlool
71c07650ea All omitempty fields should be optional 2016-11-20 00:16:33 -08:00
mbohlool
02631bb7ff OpenAPI Bugfix: []byte should be treated as integer array 2016-11-17 21:22:02 -08:00
Andy Goldstein
9154db0542 Update lister-gen
- Remove "zz_generated." prefix from generated lister file names
- Add support for expansion interfaces
2016-11-03 20:37:41 -04:00
Marcin
26acced6d8 Add policy api version v1beta1 and disable v1alpha1 2016-11-03 13:26:27 +01:00
Janet Kuo
c15b9470f5 Replace apps/v1alpha1 with apps/v1beta1 and manually remove generated apps/v1alpha1 files
Manually remove generated apps/v1alpha1 types, protobuf, and api-reference doc files
Manually remove apps/v1alpha1 folder from 1.5 generated client
2016-11-02 15:16:23 -07:00
Mike Danese
667c5cc007 add imports of internal apigroup 2016-11-01 15:12:28 -07:00
Kubernetes Submit Queue
1fa8369074 Merge pull request #35639 from ncdc/lister-gen
Automatic merge from submit-queue

Add tooling to generate listers

Add lister-gen tool to auto-generate listers. So far this PR only demonstrates replacing the manually-written `StoreToLimitRangeLister` with the generated `LimitRangeLister`, as it's a small and easy swap.

cc @deads2k @liggitt @sttts @nikhiljindal @lavalamp @smarterclayton @derekwaynecarr  @kubernetes/sig-api-machinery @kubernetes/rh-cluster-infra
2016-11-01 09:29:06 -07:00
Andy Goldstein
13abf36c60 Update bazel build files 2016-10-31 11:13:44 -04:00
Andy Goldstein
f85ac9023a Add lister-gen 2016-10-31 11:13:43 -04:00
Clayton Coleman
96f8a14e35
Explore alternative unsafe copy 2016-10-31 10:59:01 -04:00
Kubernetes Submit Queue
8a202eddfe Merge pull request #35733 from mikedanese/set-gen
Automatic merge from submit-queue

bazel: implement set-gen as a bazel genrule

cc @caesarxuchao who is the gengo master until @lavalamp is back.
2016-10-30 08:43:41 -07: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
Andy Goldstein
e7068751ed Update bazel 2016-10-28 11:08:27 -04:00
Andy Goldstein
72cec547cd Convert - to _ for protobuf package names
Convert - to _ for protobuf package names to allow protobuf code generation
support for go packages that have - in their names.
2016-10-28 11:08:13 -04:00
Janet Kuo
e9927664cf Remove unnecessary dependency in client-gen 2016-10-27 17:25:10 -07:00
Mike Danese
5dc7554ab2 bazel: implement set-gen as a bazel genrule 2016-10-27 15:16:30 -07:00
Clayton Coleman
168f5e0dca
Default to safe conversions 2016-10-26 12:21:27 -04:00
Clayton Coleman
d089eda524
Generate unsafe conversions
This reverts commit 50bcdb9677.
2016-10-26 12:21:27 -04:00
Wojciech Tyczynski
50bcdb9677 Revert "Generate unsafe conversions"
This reverts commit 2b1790cc5f.
2016-10-26 10:21:45 +02:00
Clayton Coleman
2b1790cc5f
Generate unsafe conversions 2016-10-25 19:28:41 -04:00
Mike Danese
df713b478c fix tests by declaring testdata 2016-10-21 17:32:32 -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
Clayton Coleman
f294175d60
Make defaulting optional during conversion generation
Set the Kubernetes default to "no defaulting"
2016-10-18 21:07:34 -04:00
Clayton Coleman
1c49fc57ed
Create a generator for defaulters
Given an object that wishes to have a top level defaulter, traverse the
object looking for nested fields that have defaulters and generate a
single function for that type that invokes all defaulters. The function
will have the name `SetObjectDefaults_NAME`.

Types use `// +k8s:defaulter-gen=true` to indicate they wish a defaulter
generated. If a function already exists with the desired name
`SetObjectDefaults_NAME` then no generation will occur. At a package
level, authors can bulk select the types to generate by setting the
value of the comment to the name of a field - all objects with that
field name without `// +k8s:defaulter-gen=false` defined on the type
will get a defaulter.

Because the defaulting behavior from conversions happens recursively,
all defaulters are expected to be invoked. We call these defaulters
"non-covering" (other defaulters may be invoked beneath them). The
defaulters we generate, by comparison, are "covering" - no nested
defaulters should be invoked. To distinguish between these two types, we
introduce the `// +k8s:defaulter-gen=covers` comment on a defaulter
function which will instruct the generator that the function should
terminate recursion.

This sets the stage for future defaulter generation from comments by
subsuming our existing generators
2016-10-18 21:07:32 -04:00
mbohlool
c1096211d0 Support optional tag in OpenAPI generator 2016-10-17 08:52:13 -07:00