Closed randomvariable closed 2 years ago
I'm wondering if we can leverage https://doc.crds.dev/ here in some way?
I used the one I did as it's used in knative. The CAPA ones do actually currently link out to docs.crds.dev for the CAPI CRDs at the moment. Didn't see a neat way to output a file in a way that mdbook would render it with the latter.
I'm wondering if we can leverage https://doc.crds.dev/ here in some way?
I was chatting with @hasheddan a while back about this, we ended up in https://github.com/kubernetes-sigs/controller-tools/issues/240 which would be great to integrate with.
Very cool.
Maybe I can do the CLI reference docs first then?
@randomvariable @vincepri I am planning on ramping up on https://github.com/kubernetes-sigs/controller-tools/issues/240 very soon and will try to get this usable for y'all ASAP :)
/milestone Next
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
Would it make sense to add to a link to https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api
in our book in the meantime?
Yes. I do point users at CRD docs sometimes.
I wonder if we can embed those references?
Apologies for the delay on https://github.com/kubernetes-sigs/controller-tools/issues/240 folks. @vincepri are you thinking something along the lines of an iframe
embed? Happy to update https://doc.crds.dev to accommodate any use-case y'all need :)
Something like that? We could also embed the html directly, but have no idea if that's actually going to work
Coming back to this, would be good to get this in, as per CII best practices, which I'm reviewing for the security self assessment:
The project MUST provide reference documentation that describes the external interface (both input and output) of the software produced by the project. [documentation_interface]
The documentation of an external interface explains to an end-user or developer how to use it. This would include its application program interface (API) if the software has one. If it is a library, document the major classes/types and methods/functions that can be called. If it is a web application, define its URL interface (often its REST interface). If it is a command-line interface, document the parameters and options it supports. In many cases it's best if most of this documentation is automatically generated, so that this documentation stays synchronized with the software as it changes, but this isn't required. The project MAY use hypertext links to non-project material as documentation. Documentation MAY be automatically generated (where practical this is often the best way to do so). Documentation of a REST interface may be generated using Swagger/OpenAPI. Code interface documentation MAY be generated using tools such as JSDoc (JavaScript), ESDoc (JavaScript), pydoc (Python), devtools (R), pkgdown (R), and Doxygen (many). Merely having comments in implementation code is not sufficient to satisfy this criterion; there needs to be an easy way to see the information without reading through all the source code. If the project does not produce software, choose "not applicable" (N/A). .
Including a direct link to https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api in the sidebar would be a quick win. Embedding it in an iframe which also looks good via mdbook isn't (at least not for me)
Yup, I think that'll suffice tbh.
Note: It's not a quick win to add it to the sidebar as mdbook doesn't allow external links there. It would be a quick-win to add a page which only contains a link :/
Oh yeah, I'm doing some dodgy stuff with the sidebar in the CAPA repo.
I've figured out a solution that doesn't involve running gen-crd-api-reference-docs that is super slow and doesn't support go modules, which is essentially to read the openapi specs from the YAML and construct a OpenAPI v3 doc which you can display with some OSS JavaScript. I'll PR soon.
/assign
/lifecycle active
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
I think we still want to address this in some way.
User Story
As a user, I want to read the API spec of Cluster API without having to deploy it and use
kubectl explain
Detailed Description
Upstream the CRD and CLI reference doc generation from CAPA
CRD output: https://cluster-api-aws.sigs.k8s.io/crd/cluster-api-aws.html
CLI output: https://cluster-api-aws.sigs.k8s.io/clusterawsadm/clusterawsadm.html
Generation code is: CLI doc generator: https://github.com/kubernetes-sigs/cluster-api-provider-aws/tree/master/docs/book/cmd/clusterawsadmdocs
The Makefile contains the following: CRD doc generation Bit of hackery to assemble a SUMMARY.md (mdbook won't run plugins on the sidebar by design, so you have to construct it): https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/master/docs/book/Makefile
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
/kind documentation