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 support for kubebuilder v2 kubebuilder:object:root comment #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

M00nF1sh
Copy link

@M00nF1sh M00nF1sh commented Jul 9, 2020

The kubebuilder V2 adds +kubebuilder:object:root comment instead of +genclient comment to public types.
BTW, the +kubebuilder:object:root is in ListTypes, while +genclient don't appear in ListTypes, this PR will filter out listTypes if only +kubebuilder:object:root presents.

Copy link

@fawadkhaliq fawadkhaliq left a comment

Choose a reason for hiding this comment

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

nice!

@yindia
Copy link

yindia commented Jul 17, 2020

@fawadkhaliq @M00nF1sh I tried your branch on my kuberbuilder api but it's not working

@ahmetb
Copy link
Owner

ahmetb commented Jul 17, 2020

Thank you. We also need to make sure this doesn't break compat for existing projects (listed in readme).

@M00nF1sh
Copy link
Author

@fawadkhaliq @M00nF1sh I tried your branch on my kuberbuilder api but it's not working

@evalsocket, u still need to create a doc.go contain same content(without import and var) of your groupversion_info.go.
the 'doc.go' requirement is from the k8s library this gen-crd-api-reference relies on.

@yindia
Copy link

yindia commented Jul 17, 2020

@M00nF1sh Thanks...You made my day. If you add a doc for kube builder then it would be great for everyone. @ahmetb I tested it and it's working fine for operator-sdk also

@ahmetb
Copy link
Owner

ahmetb commented Jul 17, 2020

@evalsocket Can you also please validate this with one of the projects listed in README.md?

Sadly, I can't just merge this because "it works for you". Removing //+genclient most likely will have breaking consequences. Also please don't bother clicking "Approve" on the code, it doesn't mean anything for a repo that you aren't an owner on (or asked to review).

Right now to me, my priorities aren't at Kubebuilder v2 or Operator SDK. This project has existing users and keeping those working is my top priority.

ironcladlou added a commit to ironcladlou/hypershift that referenced this pull request Nov 10, 2021
This commit updates API documentation on the Go types and also improves
the generated API documentation to include only the public types, as well
as other minor small fixes for readability.

Note that the `+gencopy` comments added to the API types are to work around
an issue[1] in the upstream docs generation code which doesn't yet understand
the `+kubebuilder:object:root` tag. This is necessary to make the generator
understand which types are "public" (e.g. HostedCluster and NodePool).

[1] ahmetb/gen-crd-api-reference-docs#26
ironcladlou added a commit to ironcladlou/hypershift that referenced this pull request Nov 10, 2021
This commit updates API documentation on the Go types and also improves
the generated API documentation to include only the public types, as well
as other minor small fixes for readability.

Note that the `+gencopy` comments added to the API types are to work around
an issue[1] in the upstream docs generation code which doesn't yet understand
the `+kubebuilder:object:root` tag. This is necessary to make the generator
understand which types are "public" (e.g. HostedCluster and NodePool).

[1] ahmetb/gen-crd-api-reference-docs#26
ironcladlou added a commit to ironcladlou/hypershift that referenced this pull request Nov 10, 2021
This commit updates API documentation on the Go types and also improves
the generated API documentation to include only the public types, as well
as other minor small fixes for readability.

Note that the `+gencopy` comments added to the API types are to work around
an issue[1] in the upstream docs generation code which doesn't yet understand
the `+kubebuilder:object:root` tag. This is necessary to make the generator
understand which types are "public" (e.g. HostedCluster and NodePool).

[1] ahmetb/gen-crd-api-reference-docs#26
ironcladlou added a commit to ironcladlou/hypershift that referenced this pull request Nov 10, 2021
This commit updates API documentation on the Go types and also improves
the generated API documentation to include only the public types, as well
as other minor small fixes for readability.

Note that the `+gencopy` comments added to the API types are to work around
an issue[1] in the upstream docs generation code which doesn't yet understand
the `+kubebuilder:object:root` tag. This is necessary to make the generator
understand which types are "public" (e.g. HostedCluster and NodePool).

[1] ahmetb/gen-crd-api-reference-docs#26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants