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

Auto-generate docs for NGF CRDs #1754

Closed
pleshakov opened this issue Mar 21, 2024 · 4 comments · Fixed by #1884
Closed

Auto-generate docs for NGF CRDs #1754

pleshakov opened this issue Mar 21, 2024 · 4 comments · Fixed by #1884
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request refined Requirements are refined and the issue is ready to be implemented. size/medium Estimated to be completed within a week
Milestone

Comments

@pleshakov
Copy link
Contributor

Currently, NGF has only one CRD.
The doc for it is here https://github.com/nginxinc/nginx-gateway-fabric/blob/8612c42d8badb8e13b1baf675821350e27395c23/site/content/how-to/configuration/control-plane-configuration.md , visualized https://docs.nginx.com/nginx-gateway-fabric/how-to/configuration/control-plane-configuration/

Note how that doc describes each field of the resource.

As we add more CRDs, it will become tedious to write and maintain docs for fields. Especially considering that the source of truth (the fields + documentation for them) for documentation is go code https://github.com/nginxinc/nginx-gateway-fabric/blob/8612c42d8badb8e13b1baf675821350e27395c23/apis/v1alpha1/nginxgateway_types.go , so we will need to keep the docs in sync with the go files.

Find a way to generate docs for CRDs based on the source code.

Notes:
Example of auto-generated docs in the Gateway API -- https://gateway-api.sigs.k8s.io/reference/spec/

@pleshakov pleshakov added the enhancement New feature or request label Mar 21, 2024
@kate-osborn
Copy link
Contributor

Gateway API uses: https://github.com/ahmetb/gen-crd-api-reference-docs, but this is no longer maintained. There's another project that does the same thing here: https://github.com/elastic/crd-ref-docs

@kate-osborn
Copy link
Contributor

@mpstefan I think we should add this to the 1.3 milestone because we will add a few new CRDs that need documentation.

@mpstefan mpstefan added this to the v1.3.0 milestone Apr 1, 2024
@mpstefan mpstefan added release-engineering Relates to all release engineering tasks documentation Improvements or additions to documentation refined Requirements are refined and the issue is ready to be implemented. size/medium Estimated to be completed within a week and removed release-engineering Relates to all release engineering tasks labels Apr 1, 2024
@lucacome lucacome assigned lucacome and unassigned lucacome Apr 4, 2024
@lucacome lucacome self-assigned this Apr 25, 2024
@lucacome lucacome mentioned this issue Apr 25, 2024
6 tasks
@jputrino
Copy link

@lucacome @pleshakov @mpstefan -- The solution in #1884 is not in line with the tooling or format in which we (NGINX) present this information to our users. We need to discuss this and make sure solution is in line with the docs standards (ideally before work is begun).

@lucacome - Apologies, but please close your PR. We cannot sign off on publishing the API documentation in the format generated by the tooling selected.

@lucacome
Copy link
Member

@jputrino @ADubhlaoich How do we move forward with this?

@sindhushiv sindhushiv added the blocked Blocked by other issue label May 23, 2024
@sindhushiv sindhushiv removed the blocked Blocked by other issue label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request refined Requirements are refined and the issue is ready to be implemented. size/medium Estimated to be completed within a week
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants