-
-
Notifications
You must be signed in to change notification settings - Fork 13
generated CRD reference docs: self-hosting crds.dev #328
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
Comments
There is also https://www.manifests.io/ which is just for the well known Kubernetes resources, but could be massaged to work how we wanted if we couldn't find a suitable alternative. |
Interesting! Thanks for posting |
UpdateI managed to turn the crds.dev docs code into a tool to statically generate docs for a predefined list of repositories and tags. How to hostThere are two ways to do it, either we host the generated pages with minor styling changes on a separate domain, or we generate something that we can integrate into our Antora docs. I think, hosting it under a separate subdomain is probably the better option. We have to do very little changes to the generated pages, which is easier for us. The Antora menu structure and table of contents doesn't make sense for the reference docs. It's fine to have a separate subdomain for this different type of documentation, and it's not uncommon. Actually, these code-level docs are often separated out. Also, it is not clear to me how we would handle the different API versions of the CRDs in Antora. So I think, Antora is just not the right tool for API docs. Next stepsA brainstormed list of things to do next
|
Update: It's now deployedThe docs are now deployed at: https://crds.stackable.tech/ The source for the template and which repos are generated are located in this repo: https://github.com/stackabletech/crddocs . The generator is included as a submodule, it is located in this repo: https://github.com/stackabletech/crddocs-generator Netlify is used to deploy. Whenever a commit to main is pushed into the |
Nice! Just a note, the dark-mode theme seems to work on the first page, but then it's light-mode for the rest. Edit: after browsing back to the main page, it is also in light-mode. |
Yeah I removed light mode because it was implemented with a cookie that the server was reading, and that didn't work well with static site generating. Sorry if you liked dark mode! 😬 |
Update
|
Update
Next steps
We're also waiting for kube-rs 0.88 for our |
I consider this ticket done now. I've made a new one to polish the actual documentation next: #500 |
Context
Currently our documentation does not contain any complete CRD reference. For Spark there is a manually maintained page. Such a reference would list all the CRD config options and what they are for, how they relate to other options, what the default is (if any) and if it is mandatory. This is an essential part of the documentation and completements tutorials, guides and conceptual page
Objective
The reference documentation for all our CRDs needs to be generated (maintaining it by hand is not feasible) and hosted. Whether this can be integrated into the existing Antora docs or whether it will be separate is not so important for now.
We need to control the generation and hosting though.
Ideally the docs would be static generated files.
Evaluated options so far
Various generators
#238. We found that a lot of the tools to generate docs were not well maintained or didn't work for Rust code.
crds.dev
@sbernauer found https://github.com/crdsdev/doc , which generates docs, i.e. https://doc.crds.dev/github.com/stackabletech/[email protected]
Next Steps
crds.dev
adoc
pages for antora, or just pregenerated HTML that we can host, possibly on a different subdomain (i.e.apidocs.stackable.tech
).build custom generator
Should we look into building our own generator? Would be interesting to spike this.
Upsides: we get more info in the Rust code than in the CRD: We know that there are common structs (i.e. S3Bucket) and we can generate docs for these structs specifically.
It would be cool to have such an open source tool for the community
Downside: probably a lot of work/more work than we think.
The text was updated successfully, but these errors were encountered: