-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API groups explanation to golang tutorial #5842
Conversation
/lgtm |
/hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to shape this/improve a little this one. See: #5842 (comment)
/hold
cc48528
to
4ec025c
Compare
Signed-off-by: Jonathan Berkhahn <[email protected]>
4ec025c
to
ac46d56
Compare
`--domain` will be used as the prefix of the API group your custom resources will be created in. | ||
API groups 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) and [the Kubebuilder docs](https://book.kubebuilder.io/cronjob-tutorial/gvks.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@jberkhahn
I do not agree with the above text added in the PR. On top of that, after we all spoke about that, I think it should be a note and we might make it a little less verbose.
`--domain` will be used as the prefix of the API group your custom resources will be created in. | |
API groups 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) and [the Kubebuilder docs](https://book.kubebuilder.io/cronjob-tutorial/gvks.html). | |
**Note:** By following the [Operators pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) you will check in this tutorial that is possible to extend the Kubernetes API and create your own APIs. These APIs will be grouped by via the [ApiGroup](https://kubernetes.io/docs/reference/using-api/#api-groups). Then, the value informed via the `--domain` flag will be the subdomain of your API(s) (_i.e. the K8s ApiGroup `events.k8s.io` is the API group `events` grouped by `k8s.io` subdomain_). Then, this value should be meaningful to your organization and project. |
PS.: As we spoke in order we are able to track the detailed info related to this one ( mainly the motivations for this PR), the task #5979 was created.
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) and [the Kubebuilder docs](https://book.kubebuilder.io/cronjob-tutorial/gvks.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jberkhahn IMO mentioning RBAC isn't necessary since that's not the only thing for which we have groups
for.
Rest looks good, we can merge it.
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) and [the Kubebuilder docs](https://book.kubebuilder.io/cronjob-tutorial/gvks.html). | |
domain to group your resource types in meaningful group(s). For more information, see [the core Kubernetes docs](https://kubernetes.io/docs/reference/using-api/#api-groups) and [the Kubebuilder docs](https://book.kubebuilder.io/cronjob-tutorial/gvks.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Once the last comment of Varsha got addressed.
…golang tutorial Signed-off-by: Jonathan Berkhahn <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
We all agreed we can merge this.
/hold cancel |
Fix #5738