diff options
| author | Tim Hockin <thockin@google.com> | 2016-06-06 23:42:16 -0700 |
|---|---|---|
| committer | Tim Hockin <thockin@google.com> | 2016-07-07 22:09:08 -0700 |
| commit | b35f3aa8f56de69e8a0c241c28b8e4bd8bedd94e (patch) | |
| tree | 4cd79df418df7756bd0485eb72c141fc51cb7791 | |
| parent | 3bc5017e01c48bca76c1310836df9be953ad8248 (diff) | |
Use file tags to generate conversions
This drives conversion generation from file tags like:
// +conversion-gen=k8s.io/my/internal/version
.. rather than hardcoded lists of packages.
The only net change in generated code can be explained as correct. Previously
it didn't know that conversion was available.
| -rw-r--r-- | adding-an-APIGroup.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/adding-an-APIGroup.md b/adding-an-APIGroup.md index 63c4e2a2..cefa8564 100644 --- a/adding-an-APIGroup.md +++ b/adding-an-APIGroup.md @@ -79,9 +79,10 @@ cmd/libs/go2idl/ tool. 2. Make sure your pkg/apis/`<group>`/`<version>` directory has a doc.go file with the comment `// +k8s:deepcopy-gen=package,register`, to catch the attention of our generation tools. - 3. Make sure your pkg/apis/`<group>`/`<version>` directory has a doc.go file - with the comment `// +genconversion=true`, to catch the attention of our - gen-conversion script. + 3. Make sure your `pkg/apis/<group>/<version>` directory has a doc.go file + with the comment `// +k8s:conversion-gen=<internal-pkg>`, to catch the + attention of our generation tools. For most APIs the only target you + need is `k8s.io/kubernetes/pkg/apis/<group>` (your internal API). 4. Run hack/update-all.sh. 2. Generate files for Ugorji codec: |
