Skip to content

Add API groups explanation to golang tutorial#5842

Merged
jmrodri merged 2 commits into
operator-framework:masterfrom
jberkhahn:explain_group
Oct 7, 2022
Merged

Add API groups explanation to golang tutorial#5842
jmrodri merged 2 commits into
operator-framework:masterfrom
jberkhahn:explain_group

Conversation

@jberkhahn

Copy link
Copy Markdown
Contributor

Fix #5738

@openshift-ci openshift-ci Bot requested review from fabianvf and jmrodri June 8, 2022 23:54
@jberkhahn jberkhahn added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 8, 2022
@jberkhahn jberkhahn removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 9, 2022
Comment thread website/content/en/docs/building-operators/golang/tutorial.md Outdated
Comment thread website/content/en/docs/building-operators/golang/tutorial.md Outdated
@laxmikantbpandhare

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 25, 2022
@camilamacedo86

Copy link
Copy Markdown
Contributor

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 27, 2022

@camilamacedo86 camilamacedo86 left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread website/content/en/docs/building-operators/golang/tutorial.md
Comment thread website/content/en/docs/building-operators/golang/tutorial.md
@asmacdo asmacdo self-requested a review August 8, 2022 18:34
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 8, 2022
Signed-off-by: Jonathan Berkhahn <jaberkha@us.ibm.com>
Comment on lines +40 to +44
`--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).

@camilamacedo86 camilamacedo86 Aug 9, 2022

Copy link
Copy Markdown
Contributor

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.

Suggested change
`--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.

c/c @varshaprasad96 @asmacdo

@jmrodri jmrodri modified the milestones: v1.23.0, v1.24.0 Aug 11, 2022
@asmacdo asmacdo modified the milestones: v1.24.0, v1.25.0 Sep 21, 2022
Comment on lines +43 to +44
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).

@varshaprasad96 varshaprasad96 Sep 21, 2022

Copy link
Copy Markdown
Member

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.

Suggested change
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).

@laxmikantbpandhare laxmikantbpandhare left a comment

Copy link
Copy Markdown
Member

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.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 21, 2022
…golang tutorial

Signed-off-by: Jonathan Berkhahn <jaberkha@us.ibm.com>
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 26, 2022

@varshaprasad96 varshaprasad96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 27, 2022
@jmrodri jmrodri dismissed camilamacedo86’s stale review October 7, 2022 18:23

We all agreed we can merge this.

@jmrodri

jmrodri commented Oct 7, 2022

Copy link
Copy Markdown
Member

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 7, 2022
@jmrodri jmrodri merged commit 3fc75c9 into operator-framework:master Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explain context of "group" when initializing a project

6 participants