Commit Graph

99 Commits (8cbbbac27d427668a655fd704c6db17904520e42)

Author SHA1 Message Date
Kubernetes Submit Queue bee221cca9 Merge pull request #51638 from mfojtik/client-gen-custom-methods
Automatic merge from submit-queue (batch tested with PRs 51805, 51725, 50925, 51474, 51638)

Allow custom client verbs to be generated using client-gen

This change will allow to define custom verbs for resources using the following new tag:

```
// +genclient:method=Foo,verb=create,subresource=foo,input=Bar,output=k8s.io/pkg/api.Blah
```

This will generate client method `Foo(bar *Bar) (*api.Blah, error)` (format depends on the particular verb type)

With this change we can add `UpdateScale()` and `GetScale()` into all scalable resources. Note that intention of this PR is not to fix the Scale(), but that is used as an example of this new capability.
Additionally this will also allow us to get rid of `// +genclient:noStatus` and fix guessing of the "updateStatus" subresource presence based on the existence of '.Status' field.
Basically you will have to add following into all types you want to generate `UpdateStatus()` for:

```
// +genclient:method=UpdateStatus,verb=update,subresource=status
```

This allows further extension of the client without writing an expansion (which proved to be pain to maintain and copy...). Also allows to customize native CRUD methods if needed (input/output types).

```release-note
NONE
```
2017-09-03 11:10:09 -07:00
Michal Fojtik 7d2be1c521
generate UpdateScale and GetScale verbs for scalable resources 2017-09-01 14:25:46 +02:00
Lucas Käldström e1cff67aa6
autogenerated code 2017-08-27 18:32:14 +03:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Dr. Stefan Schimanski 3b310d8989 Update generated code 2017-08-06 15:32:28 +02:00
Eric Chiang baa536fbca generated
Commands run:

	./hack/update-codegen.sh
2017-08-02 10:27:36 -07:00
shashidharatd 71d3ba308f Remove federation internal clienset 2017-07-26 06:22:30 +05:30
Michal Fojtik e6be341a64
regenerate clients 2017-07-24 22:35:19 +02:00
Michal Fojtik dad4ee3108
regenerate clients to pickup updated genclient:noStatus comment 2017-07-24 22:05:21 +02:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu e185f7e277 run hack/update-codegen.sh 2017-06-22 11:30:58 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Chao Xu 5f5a70f65f generated clientset changes
propagate to client-go
update-bazel.sh
2017-05-04 11:30:51 -07:00
FengyunPan 7d4c66c5b5 Cleanup storeToClusterConditionLister
ClusterConditionPredicate() has been deleted,
storeToClusterConditionLister will be unused.
2017-04-27 11:51:26 +08:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Dr. Stefan Schimanski fc6d87c0a2 Update client 2017-02-28 15:34:34 +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
Jordan Liggitt 4202489a89
regenerate clients 2017-02-22 08:54:13 -05:00
Eric Chiang 163f37f775 *: update codegen and bazel 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 029cf08e6f
regenerate clients 2017-02-19 23:51:59 -05:00
Jordan Liggitt aa4a3e1613
Regenerate clients 2017-01-31 11:16:27 -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
deads2k b0b156b381 make tools/cache authoritative 2017-01-25 08:29:45 -05:00
Clayton Coleman 7b1c715496
generated: Move references to metav1.*Options 2017-01-24 13:41:48 -05:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Clayton Coleman 9009c1ac14
generated: informer,client 2017-01-23 17:52:47 -05:00
Irfan Ur Rehman b41ae3f2fb [Federation] Expose autoscaling apis through federation api server 2017-01-22 12:40:45 +05:30
deads2k 9c6a522882 mechanical results of client auth plugin 2017-01-20 08:05:18 -05:00
deads2k c587b8a21e re-run client-gen 2017-01-20 08:02:36 -05:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
deads2k f31ecdd0f7 generated changes 2017-01-17 08:32:05 -05:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -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
Jeff Grafton fae627dd65 Update generated for 2017 2017-01-01 23:11:09 -08:00
Maciej Szulik cdec94523e Remove extensions/v1beta1 Job - generated changes 2016-12-17 00:07:25 +01:00
jianhuiz 13b76697a3 add generated federation clientsets for batch/Job 2016-12-15 11:38:16 -08:00
Chao Xu 6709b7ada2 run hack/update-codegen.sh
run hack/verify-gofmt.sh
update bazel
2016-12-14 12:39:49 -08:00
Chao Xu 28c2ed2c8d manually update import_known_versions.go 2016-12-14 12:39:49 -08:00
Chao Xu c81057be2c move federation_release_1_5 to federation_clientset 2016-12-14 12:39:49 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00