-
Notifications
You must be signed in to change notification settings - Fork 157
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
Added makefile command to autogen CRDs documentation #629
Conversation
✅ Deploy Preview for capsule-documentation ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated files must be committed, each commit must be atomic and ensuring all the auto-generated files are up to date.
Makefile
Outdated
@@ -78,6 +78,9 @@ manifests: controller-gen | |||
generate: controller-gen | |||
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." | |||
|
|||
apidoc: apidocs-gen | |||
$(APIDOCS_GEN) crdoc --resources config/crd/bases --output docs/content/general/references.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than pointing to docs/content/general/references.md
, couldn't we use a template to reference the resulting file in the references.md
file that is useful since providing further information about Capsule?
e.g.:
# Reference
Reference document for Capsule Operator configuration
## Custom Resource Definition
{{ .tenantCRDMarkdown }}
## Capsule Configuration
The Capsule configuration can be piloted by a Custom Resource definition named `CapsuleConfiguration`.
{{ .capsuleConfigurationCRDMarkdown }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, commit the file tenantCRDMarkdown.md
too since it seems generated, and don't drop the file docs/content/general/references.md
.
Since we're talking about generation of file, please, add also a CI check as we're doing here to detect uncommitted changes: since these are docs related, we could add another step just for it.
I reset the |
Absolutely, let's remove the CRD scheme from Remember to add it to the side menu, suddenly after |
The output rendered is not so superb: https://deploy-preview-629--capsule-documentation.netlify.app/docs/general/tenant-crd#capsuleconfiguration. Could we try to customize it a bit, by removing the |
…me style to improve readibility
I customized the template that originate the page and added some styling to improve table readibility |
I added a Makefile command to create a reference.md file into docs starting from CRDs from config/crd/base.
The tool chosen is a result of several trials since: