gen-crd-api-reference-docs icon indicating copy to clipboard operation
gen-crd-api-reference-docs copied to clipboard

add support for kubebuilder v2 `kubebuilder:object:root` comment

Open M00nF1sh opened this issue 5 years ago • 5 comments

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.

M00nF1sh avatar Jul 09 '20 20:07 M00nF1sh

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

yindia avatar Jul 17 '20 19:07 yindia

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

ahmetb avatar Jul 17 '20 20:07 ahmetb

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

M00nF1sh avatar Jul 17 '20 21:07 M00nF1sh

@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

yindia avatar Jul 17 '20 21:07 yindia

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

ahmetb avatar Jul 17 '20 22:07 ahmetb