Commit Graph

276 Commits (4db004972ad943b7f2db36e6039a3166b5e925df)

Author SHA1 Message Date
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
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
gmarek 3171aac57c Generated clients can return their RESTClients, RESTClient can return its RateLimiter 2016-04-27 22:15:10 +02: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
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
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 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
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
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
goltermann a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07: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
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
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 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
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
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
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 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
Chao Xu 31b425b3a1 add delete precondition 2016-03-25 11:21:39 -07:00
Wojciech Tyczynski 42e7ecda5a Fix bunch of issues with conversion generator. 2016-03-24 08:26:51 +01:00
Wojciech Tyczynski 7394721d5f Use preexisting conversions in generator 2016-03-23 08:40:54 +01:00
Wojciech Tyczynski f1248b9c82 Migrate to new conversion generator 2016-03-22 08:43:02 +01:00
Wojciech Tyczynski 04eb0d40bb Migrate everything to new deep-copy generator. 2016-03-17 15:22:18 +01:00
Wojciech Tyczynski 74d005f1cf Generate DeepCopies per directory. 2016-03-17 09:28:11 +01:00
k8s-merge-robot 76984d969e Merge pull request #22982 from wojtek-t/protobuf_cleanups
Auto commit by PR queue bot
2016-03-16 09:25:33 -07:00
k8s-merge-robot 460ece34d5 Merge pull request #22928 from caesarxuchao/print-client-gen-command
Auto commit by PR queue bot
2016-03-16 00:38:39 -07:00
Wojciech Tyczynski fe2287d0a2 Small cleanups in protobuf generator 2016-03-16 08:16:04 +01:00
k8s-merge-robot 2bb7960b61 Merge pull request #22738 from wojtek-t/build_protobufs_in_docker
Auto commit by PR queue bot
2016-03-15 16:56:26 -07:00
Wojciech Tyczynski 919afadbe7 Refactor import tracker 2016-03-15 16:02:18 +01:00
Chao Xu f5ed9b3cd9 ignore verify-only flag 2016-03-14 10:28:20 -07:00
Chao Xu ec02dfc9f0 generated changes 2016-03-14 10:28:20 -07:00
Chao Xu d83175571d include the client-gen arguments in the generated files 2016-03-14 10:28:20 -07:00
Jordan Liggitt d008283942 Tolerate multiple registered versions in a single group 2016-03-12 12:49:41 -05:00
Wojciech Tyczynski 0db2012039 Refactor assmebling proto files to avoid code duplication 2016-03-11 15:54:10 +01:00
Wojciech Tyczynski 62dc80c9a2 Fix package 2016-03-10 08:21:01 +01:00
Wojciech Tyczynski 454468f5c2 Remove dead code 2016-03-09 12:19:02 +01:00
Wojciech Tyczynski dcf292174e Refactor Rewrite functions 2016-03-09 12:19:02 +01:00
Wojciech Tyczynski 52798beef2 Generate protobuf-related files in Docker 2016-03-09 10:45:24 +01:00
Wojciech Tyczynski 525d14e0bc Fix gofmt errors 2016-03-08 09:46:47 +01:00
Kris dbde4fd798 Move the discovery client to its own package 2016-03-04 13:44:52 -08:00
Abhi Shah b25a48d605 Revert "Move discovery client to its own package" 2016-03-04 09:24:54 -08:00
Abhi Shah 627edd2588 Merge pull request #22016 from krousey/discbreak
Move discovery client to its own package
2016-03-04 09:17:46 -08:00
k8s-merge-robot d81d823ca5 Merge pull request #22393 from eparis/blunderbuss
Auto commit by PR queue bot
2016-03-02 18:51:56 -08:00
Eric Paris 5e5a823294 Move blunderbuss assignees into tree 2016-03-02 20:46:32 -05:00
Kris f22664159e Move the discovery client to its own package 2016-02-29 15:37:21 -08:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Madhusudan.C.S b69ec9faff Teach serde test to deal with autoscaling group's duality. 2016-02-25 15:05:28 -08:00
k8s-merge-robot 1820da67a2 Merge pull request #21436 from caesarxuchao/clientget-doc
Auto commit by PR queue bot
2016-02-19 11:38:29 -08:00
Chao Xu f255a723ac add client-gen readme 2016-02-19 10:43:17 -08:00
k8s-merge-robot eb45154996 Merge pull request #21348 from caesarxuchao/generate-fake-for-1-2
Auto commit by PR queue bot
2016-02-18 23:02:05 -08:00
Chao Xu ad46715f51 generate fake client for release_1_2 2016-02-17 16:10:02 -08:00
laushinka 7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
Chao Xu 97aecd002a remove underscore in imported pkg names 2016-02-16 10:54:51 -08:00
Chao Xu b165ba2e00 generator's changes to remove underscore from imported package names 2016-02-16 10:19:32 -08:00
Chao Xu e482501e8c rename file names 2016-02-16 10:08:51 -08:00
Jordan Liggitt dd5d98d80a regen codecs 2016-02-13 09:15:39 -05:00
Chao Xu 1c84552757 generate the versioned clientset 2016-02-10 17:22:46 -08:00
k8s-merge-robot 2ec49efd54 Merge pull request #19945 from Clarifai/fix-formatting
Auto commit by PR queue bot
2016-02-09 16:05:00 -08:00
Jordan Liggitt 545f6be573 Regenerate types.go 2016-02-08 17:19:15 -05:00
Chao Xu 184440f8ef rename release_1_2 to internalclientset 2016-02-05 14:02:28 -08:00
Chao Xu 1b047f8e67 rename legacy to core 2016-02-04 14:26:56 -08:00
k8s-merge-robot 65ebe19164 Merge pull request #20584 from caesarxuchao/release_1_2
Auto commit by PR queue bot
2016-02-03 19:46:27 -08:00
Chao Xu f9f5736b01 grep sed 2016-02-03 13:06:07 -08:00
derekwaynecarr 070dce1bec Fix DeleteCollection in FakeClient 2016-02-03 14:39:24 -05:00
Rudi Chiarito a0831a2378 Mass fix of Infof and co. missing the trailing "f", even when formatting placeholders are used 2016-02-03 11:34:59 -05:00
Wojciech Tyczynski 205e6899be Generate public deep-copy functions 2016-02-03 13:33:24 +01:00
k8s-merge-robot 843c11e06a Merge pull request #20452 from caesarxuchao/replace-client-kubelet
Auto commit by PR queue bot
2016-02-02 23:46:58 -08:00
Chao Xu cddd7b56a4 replace client with clientset in kubelet and other places 2016-02-02 20:28:45 -08:00
Chao Xu 66f5cd259d automatically generate the clientset 2016-02-02 16:06:43 -08:00
k8s-merge-robot 74c62aecc5 Merge pull request #20186 from lavalamp/import-boss
Auto commit by PR queue bot
2016-02-02 06:21:50 -08:00
k8s-merge-robot 2746b5e43d Merge pull request #20320 from caesarxuchao/add-discovery
Auto commit by PR queue bot
2016-02-01 14:35:27 -08:00
Clayton Coleman 8692d260f8 Use Parameter codec in request.VersionedParams() 2016-01-30 14:14:20 -05:00
Chao Xu 8531ef4979 change ingress and componentstatus plural form 2016-01-29 11:21:04 -08:00
Chao Xu dd357ed86a include DiscoveryClient in the generated clientset 2016-01-29 11:03:03 -08:00
Daniel Smith 46d12b185e Add 'import-boss': enforce go import restrictions. 2016-01-27 16:18:46 -08:00
k8s-merge-robot 67939eb933 Merge pull request #19958 from caesarxuchao/fix-resource-case
Auto commit by PR queue bot
2016-01-26 16:46:41 -08:00
k8s-merge-robot 3254df3a7c Merge pull request #19426 from smarterclayton/rewrite_tags
Auto commit by PR queue bot
2016-01-26 13:11:58 -08:00
Clayton Coleman 14a3aaf479 protobuf: During generation, copy protobuf tags back
The protobuf tags contain the assigned tag id, which then ensures
subsequent generation is consistently tagging (tags don't change across
generations unless someone deletes the protobuf tag).

In addition, generate final proto IDL that is free of gogoproto
extensions for ease of generation into other languages.

Add a flag --keep-gogoproto which preserves the gogoproto extensions in
the final IDL.
2016-01-26 11:41:21 -05:00
k8s-merge-robot d3b869ae14 Merge pull request #17922 from smarterclayton/split_codec
Auto commit by PR queue bot
2016-01-25 06:30:39 -08:00
nikhiljindal 0ab152ddf2 Adding an example apiserver 2016-01-22 11:52:16 -08:00
Clayton Coleman efe88e0818 Update client library to react to changes in Decoding 2016-01-22 13:27:24 -05:00
Clayton Coleman c1d932e44a Switch API objects to not register per version codecs
Remove Codec from versionInterfaces in meta (RESTMapper is now agnostic
to codec and serialization). Register api/latest.Codecs as the codec
factory and use latest.Codecs.LegacyCodec(version) as an equvialent to
the previous codec.
2016-01-22 01:10:21 -05:00
Chao Xu 0734248e42 Use lowercase names in individual typed clients 2016-01-21 15:01:47 -08:00
Chao Xu 030043b5be Ingress's plural 2016-01-21 15:01:47 -08:00
nikhiljindal 2ad642d370 Merge registered and latest and move to apimachinery 2016-01-21 14:42:21 -08:00
k8s-merge-robot 03ecde1277 Merge pull request #17535 from mesosphere/jdef_abspath_breaks_proxies
Auto commit by PR queue bot
2016-01-20 21:46:47 -08:00
Chao Xu ee6f03f55a Fix UpdateStatus 2016-01-20 21:15:07 -08:00
Chao Xu fb81b2278e client-gen now generates the fake client. 2016-01-19 17:27:17 -08:00
James DeFelice 75f487f7bf AbsPath should be compatible with proxy-prefixes:
- replace Config.Prefix with .Host and .APIPath
- Request .path promoted to .pathPrefix, .baseURL holds required prefix
2016-01-20 00:31:58 +00:00
Chao Xu 00b18446ac allow client-gen genereate typed client with only expansion methods 2016-01-14 12:13:01 -08:00
Chao Xu ec9771ccb6 add nonNamespaced comment tag; change the interface name 2016-01-14 10:46:08 -08:00
k8s-merge-robot ec78f3d5a9 Merge pull request #19349 from caesarxuchao/generate-updatestatus
Auto commit by PR queue bot
2016-01-13 16:51:33 -08:00
Chao Xu 5addb86f6a conditionally generate UpdateStatus method 2016-01-13 15:45:21 -08:00
k8s-merge-robot e7f29514ab Merge pull request #19307 from caesarxuchao/remove-namespaceifscoped
Auto commit by PR queue bot
2016-01-13 11:01:54 -08:00
k8s-merge-robot 9e66a8f134 Merge pull request #18855 from deads2k/gv-stop-reverse
Auto commit by PR queue bot
2016-01-13 01:37:31 -08:00
Chao Xu 64083a0576 Generate the clientset 2016-01-12 11:30:04 -08:00
Chao Xu 2e5da8b881 Merge pull request #19379 from caesarxuchao/manual-methods
client-gen: generate an interface which allows user to expand typed client's methods
2016-01-12 11:09:38 -08:00
Chao Xu a0489e8685 add expansion interface 2016-01-11 10:46:24 -08:00
k8s-merge-robot 9264340338 Merge pull request #17854 from smarterclayton/basic_proto
Auto commit by PR queue bot
2016-01-07 22:03:36 -08:00
Clayton Coleman b1e01875a1 go-to-protobuf: generate protobuf IDL and marshalers for Go structs 2016-01-06 21:09:20 -05:00
Chao Xu ea0086468c remove the use of NamespaceIfScoped from generated clients 2016-01-06 16:20:44 -08:00
Chao Xu f51da22bcf regenerate the typed clients 2016-01-05 16:20:46 -08:00
Chao Xu 4b1a1057b3 lowercase the names of the generated client files 2016-01-04 14:45:25 -08:00
deads2k e2d280a592 external versions no longer need reordering 2016-01-04 15:07:54 -05:00
Wojciech Tyczynski 5abdc2e944 Updage auto-generated files 2016-01-01 11:47:29 +01:00
Wojciech Tyczynski f9f840a1c6 Remove debug log 2015-12-30 14:42:02 +01:00
Wojciech Tyczynski baf97c9c5e First use of new deep-copy generator. 2015-12-29 18:06:09 +01:00
Wojciech Tyczynski 9d912e843b Update/verify client generator in scripts 2015-12-28 14:24:43 +01:00
Chao Xu ad484c79f7 pass runtime.Scheme as parameter to AddToScheme 2015-12-23 23:21:35 -08:00
Chao Xu 2b5b708b70 Refactor the API registration and installation 2015-12-23 22:44:25 -08:00
Clayton Coleman 6d4612c8d2 Remove redundant / complex client code 2015-12-22 14:29:15 -05:00
Wojciech Tyczynski ebc14e1a2e Regenerate clients 2015-12-21 11:12:25 +01:00
Wojciech Tyczynski b279227d83 Fix compile errors in DeleteCollection 2015-12-21 09:29:11 +01:00
k8s-merge-robot 730a6a1d55 Merge pull request #18685 from caesarxuchao/client-gen-output
Auto commit by PR queue bot
2015-12-18 10:55:05 -08:00
Chao Xu b61c9a4cf3 output of client-gen 2015-12-17 23:42:16 -08:00
Eric Tune ad97b9c728 Undo unintentional changes to goidl testdata
Introduced by #17940 due to bug.  Bug fixed by #18860.
2015-12-17 16:00:56 -08:00
Maciej Szulik 327c104460 Added ActiveDeadlineSeconds to jobs, allowing failing a job after
exceeding allowed time.
2015-12-17 15:26:42 +01:00
k8s-merge-robot cd59d1e59a Merge pull request #18700 from wojtek-t/fix_client_gen_script
Auto commit by PR queue bot
2015-12-16 23:57:08 -08:00
k8s-merge-robot b888fcc8ef Merge pull request #18743 from caesarxuchao/second-comment-blcok
Auto commit by PR queue bot
2015-12-16 13:57:36 -08:00
Wojciech Tyczynski 4473abf3b5 Update client-generator 2015-12-16 13:59:58 +01:00
k8s-merge-robot e309583ff1 Merge pull request #18473 from smarterclayton/change_runtime_object
Auto commit by PR queue bot
2015-12-16 04:24:22 -08:00