k3s/pkg/apis
Kubernetes Submit Queue cce1c9b41e Merge pull request #49192 from mfojtik/unify-clientgen-tags
Automatic merge from submit-queue (batch tested with PRs 49498, 49192)

Unify genclient tags and add more fine control on verbs generated

This will change the syntax of the existing `genclient` tags be like this:

```
// +genclient
// +genclient:noStatus
// +genclient:noVerbs
// +genclient:nonNamespaced
// +genclient:readonly
```

The first one indicates the client will be generated from the struct below and the other tags are basically options to the genclient (which justify why they should be prefixed with `genclient:`)

This also changes the `// +genclientstatus=false` to `// +genclient:noStatus` to follow the pattern and also changes the `// +noMethods=true` to `// +genclient:noVerbs` as we call the REST operations verbs so it will make it consistent with terminology.

In addition to existing options this patch also add two more to allow more fine-grained control on which verbs are going to be generated. This is extra useful for third-party projects (like OpenShift) where some resources does not implement full CRUD, but for example just "create" verb or "create" and "delete"...
To support that, you can use this syntax:

```
// +genclient:onlyVerbs=create,delete
// +genclient:skipVerbs=patch
```

The first one will generate only create and delete functions and second one will generate full CRUD without "patch" actions. This somehow overlaps with the existing "readonly" tag, but I want to keep that tag in place as it reads better in some cases ;-)
2017-07-25 02:43:13 -07:00
..
abac Update generated code 2017-07-18 09:28:49 +02:00
admission remove types.generated.go generated for internal API types 2017-07-19 22:06:11 -07:00
admissionregistration update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
apps update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
authentication update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
authorization update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
autoscaling update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
batch update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
certificates update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
componentconfig update things 2017-07-20 15:28:23 -07:00
extensions update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
imagepolicy update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
meta/v1 deepcopy: add interface deepcopy funcs 2017-07-18 09:28:47 +02:00
networking update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
policy update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
rbac update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
scheduling update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
settings update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
storage update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
OWNERS remove some people from OWNERS so they don't get reviews anymore 2017-07-13 10:02:21 -07:00