Document Antrea public interfaces #1287
Labels
kind/documentation
Categorizes issue or PR as related to a documentation.
kind/feature
Categorizes issue or PR as related to a new feature.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
priority/important-longterm
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
We should publish (on antrea.io) auto-generated documentation for Antrea's public interfaces.
These public interfaces include:
This is part of the effort to obtain a passing CII best practices badge: #989
Ideally, the auto-generated documentation should look like the one for the K8s API: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/
Some suggestions on how to generate the documentation:
The 1st solution requires running a K8s apiserver and connecting to it to retrieve the OpenAPI specs. It requires a complete validation schema for all the Antrea CRDs, which we do not have yet (but the plan is to reach that milestone by 0.11). I haven't looked at how it would work for APIServices. My guess would be that we would need to run the Antrea apiserver as well (so essentially we would need to deploy Antrea in a K8s cluster, just for the sake of generating the documentation...) and retrieve the OpenAPI specs through the aggregation layer. Not 100% sure what else would be needed for the OpenAPI specs to be served correcly.
The 2nd solution should work well for all the Antrea APIs. It may not be as flexible as generating a full-fledged OpenAPI spec (like swagger.json for K8s) but it could be a good place to start.
gen-crd-api-reference-docs
generates a HTML file for each API group, that we can add to the antrea.io website (it will pick up the CSS from the website). My plan is to prototype this solution first. The only issue is thatgen-crd-api-reference-docs
does not seem very well documented.The text was updated successfully, but these errors were encountered: