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

Autogenerate CRD docs #1715

Closed
matthchr opened this issue Aug 12, 2021 · 4 comments · Fixed by #2116
Closed

Autogenerate CRD docs #1715

matthchr opened this issue Aug 12, 2021 · 4 comments · Fixed by #2116
Assignees

Comments

@matthchr
Copy link
Member

We should look into using a tool like https://github.com/ahmetb/gen-crd-api-reference-docs to generate API documentation for the CRDs.

@matthchr
Copy link
Member Author

There's also this: https://github.com/crdsdev/doc

@matthchr
Copy link
Member Author

Also see: kubernetes-sigs/controller-tools#240

@matthchr
Copy link
Member Author

matthchr commented Aug 30, 2021

I tried to use gen-crd-api-reference-docs and wasn't above to get it to actually generate anything. It does seem to work for some projects (see cert-manager and knative), but it doesn't understand go modules I don't think, so there's some hoops you have to jump through to get it to actually output anything.

After fighting with it some I was able to get it to run, it just didn't find any modules:

~/work/github/azure-service-operator/hack/generated (master) $ /home/matthchr/go/bin/gen-crd-api-reference-docs -config ../../example-config.json -api-dir "./apis/microsoft.batch/v1alpha1api20210101" -template-dir ~/go/pkg/mod/github.com/ahmetb/gen-crd-api-reference-docs@v0.3.0/template/ -out-file docs.html -v=4

@matthchr
Copy link
Member Author

matthchr commented Feb 1, 2022

We could use the same tool that Golang itself uses and run it on bare types (generated from a custom pipeline stage) and then delete everything but the generated HTML...

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 a pull request may close this issue.

3 participants