Skip to content
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

Merged
merged 2 commits into from
Oct 7, 2022

Conversation

jberkhahn
Copy link
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
@laxmikantbpandhare
Copy link
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
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
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a 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

@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
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).
Copy link
Contributor

@camilamacedo86 camilamacedo86 Aug 9, 2022

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).
Copy link
Member

@varshaprasad96 varshaprasad96 Sep 21, 2022

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

Copy link
Member

@laxmikantbpandhare laxmikantbpandhare left a 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.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 21, 2022
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 26, 2022
Copy link
Member

@varshaprasad96 varshaprasad96 left a comment

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
Copy link
Member

jmrodri commented Oct 7, 2022

/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