summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Xu <xuchao@google.com>2015-11-05 15:44:20 -0800
committerChao Xu <xuchao@google.com>2015-11-05 15:44:20 -0800
commit3f40d2080709f696a506daf99af5bccdc2bd0f54 (patch)
tree3b6b303753689982df1ef3c40187ef102dc44913
parent342265e8c14392f135363c04b2a7bacbbc715068 (diff)
address timstclair's comments
-rw-r--r--adding-an-APIGroup.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/adding-an-APIGroup.md b/adding-an-APIGroup.md
index f6bf99a2..e5f08552 100644
--- a/adding-an-APIGroup.md
+++ b/adding-an-APIGroup.md
@@ -44,9 +44,9 @@ We plan on improving the way the types are factored in the future; see [#16062](
1. Create a folder in pkg/apis to hold you group. Create types.go in pkg/apis/`<group>`/ and pkg/apis/`<group>`/`<version>`/ to define API objects in your group;
-2. Create pkg/apis/`<group>`/{register.go, `<version>`/register.go} to register this group's API objects to the encoding/decoding scheme;
+2. Create pkg/apis/`<group>`/{register.go, `<version>`/register.go} to register this group's API objects to the encoding/decoding scheme (e.g., [pkg/apis/extensions/register.go](../../pkg/apis/extensions/register.go) and [pkg/apis/extensions/v1beta1/register.go](../../pkg/apis/extensions/v1beta1/register.go);
-3. Add a pkg/apis/`<group>`/install/install.go, which is responsible for adding the group to the `latest` package, so that other packages can access the group's meta through `latest.Group`. You need to import this `install` package in {pkg/master, pkg/client/unversioned, cmd/kube-version-change}/import_known_versions.go, if you want to make your group accessible to other packages in the kube-apiserver binary, binaries that uses the client package, or the kube-version-change tool.
+3. Add a pkg/apis/`<group>`/install/install.go, which is responsible for adding the group to the `latest` package, so that other packages can access the group's meta through `latest.Group`. You probably only need to change the name of group and version in the [example](../../pkg/apis/extensions/install/install.go)). You need to import this `install` package in {pkg/master, pkg/client/unversioned, cmd/kube-version-change}/import_known_versions.go, if you want to make your group accessible to other packages in the kube-apiserver binary, binaries that uses the client package, or the kube-version-change tool.
Step 2 and 3 are mechanical, we plan on autogenerate these using the cmd/libs/go2idl/ tool.
@@ -59,7 +59,8 @@ Step 2 and 3 are mechanical, we plan on autogenerate these using the cmd/libs/go
2. Generate files for Ugorji codec:
- 1. Touch types.generated.go in pkg/apis/`<group>`{/, `<version>`}, and run hack/update-codecgen.sh.
+ 1. Touch types.generated.go in pkg/apis/`<group>`{/, `<version>`};
+ 2. Run hack/update-codecgen.sh.
### Client (optional):