Skip to content

Commit

Permalink
Add API groups explanation to golang tutorial
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Berkhahn <[email protected]>
  • Loading branch information
jberkhahn committed Jun 9, 2022
1 parent 07b7a7f commit 16fc8c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/content/en/docs/building-operators/golang/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ cd $HOME/projects/memcached-operator
# so all API groups will be <group>.example.com
operator-sdk init --domain example.com --repo github.com/example/memcached-operator
```
API groups are are a mechanism to group portions of the Kubernetes API. You're probably already familiar with
some of the core Kubernetes API groups, such as `apps` or `rbac.authorization.k8s.io`. You should name your
domain to group your resource types in meaningful group(s), both for ease of understanding and because these
groups determine how access can be controlled to your resource types using RBAC. For more information, see [the core Kubernetes docs](https://kubernetes.io/docs/reference/using-api/#api-groups).

To learn about the project directory structure, see [Kubebuilder project layout][kubebuilder_layout_doc] doc.



#### A note on dependency management

`operator-sdk init` generates a `go.mod` file to be used with [Go modules][go_mod_wiki]. The `--repo=<path>` flag is required when creating a project outside of `$GOPATH/src`, as scaffolded files require a valid module path. Ensure you [activate module support][activate_modules] by running `export GO111MODULE=on` before using the SDK.
Expand Down

0 comments on commit 16fc8c5

Please sign in to comment.