-
Notifications
You must be signed in to change notification settings - Fork 158
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 CRD Documentation #1342 #1727
Conversation
When the command |
@Kartik-Garg let's not commit gen-crd-api-reference-docs binary to the repo. |
We use different image for docs build - https://github.com/kanisterio/kanister/tree/master/docker/docs-build. Sorry for the confusion. We should add the binary in this build image |
First we need to decide when do we want to run this comment. And if this needs to be included in the public facing docs. Depending on that we can decide on the right docker image to add this binary. |
Since the crd_documentation tool does not have the latest release, we can not add it to the docs-build, because we will also have to run |
makes sense, so I have created a new target called crd_docs , so when |
@PrasadG193
Test Plan (manual testing) :
|
Thanks a lot @Kartik-Garg for adding the Makefile target to build the docs. |
@pavannd1 does it make sense to add API docs section in docs.kanister.io and move this doc there? Something like - https://argocd-operator.readthedocs.io/en/latest/reference/api.html/ |
ba127a9
to
1cfa671
Compare
a477e7d
to
6b01269
Compare
cff3be8
to
e239ca7
Compare
e239ca7
to
ee64103
Compare
49a0d20
to
b374bda
Compare
Added the command in make docs now so when make docs command is ran, the API CRD documentation is also created automatically with "API.md" name, created a folder called template which contains all the necessary files (template files, place-holder go file, json file and executable binary file) which are used/needed in the creating of the API CRD documentation Signed-off-by: Kartik-Garg <[email protected]>
Added the command in make docs now so when make docs command is ran, the API CRD documentation is also created automatically with "API.md" name, created a folder called template which contains all the necessary files (template files, place-holder go file, json file and executable binary file) which are used/needed in the creating of the API CRD documentation Signed-off-by: Kartik-Garg <[email protected]>
Co-authored-by: kale-amruta <[email protected]>
Added tool to create CRD documentation to the docker build file, so we dont have to explicitly add exec binary to our project Signed-off-by: Kartik-Garg <[email protected]>
As per the suggestion from the PR comment, removed executable binary from this folder, also removed .json file which was not required Signed-off-by: Kartik-Garg <[email protected]>
Added a new target for creating on crd documentaion called as crd_docs and also added new command for it which is run inside the container image build Signed-off-by: Kartik-Garg <[email protected]>
Removed unwanted space Co-authored-by: Prasad Ghangal <[email protected]>
Improved the spacing as per the suggestion. Co-authored-by: Prasad Ghangal <[email protected]>
Removed the template folder, updated API.md file, Made alignment changes Signed-off-by: Kartik-Garg <[email protected]>
Modified space in makefile Signed-off-by: Kartik-Garg <[email protected]>
Added new required files for the API CRD documentation tool and made changes in the docker build and the makefile command to run the target to generate the documentation. Changed config file name. Signed-off-by: Kartik-Garg <[email protected]>
b374bda
to
7aa4771
Compare
@Kartik-Garg |
@viveksinghggits The documentation would be generated every time we run the |
@Kartik-Garg |
Yes |
Let's add this workflow here so that people are aware https://github.com/kanisterio/kanister/blob/master/CONTRIBUTING.md#contributing-code |
Just another sub heading maybe, stating what to do when you update api types. I am assuming it's just the api types that we are concerned about here, right? |
I would rather prefer adding a subheading under to https://github.com/kanisterio/kanister/blob/master/CONTRIBUTING.md#contributing-code.
Update wording and grammar please 😄 . |
Added steps to create the documentation when changes are made in Kanister API Types as well. Signed-off-by: Kartik-Garg <[email protected]>
Thanks a lot! @viveksinghggits |
Looks good. Thanks @Kartik-Garg 🚀 |
Change Overview
Created CRD documentation using https://github.com/ahmetb/gen-crd-api-reference-docs/ , in response to the issue #1342 , added template folder, which contains files, which are used by the auto CRD generator tool, to create the CRD documentation, the documentation is named as "API.md" .
Signed-off-by: Kartik-Garg [email protected]
Plan of action :
/path/to/gen-crd-api-reference-docs \ -config "/path/to/example-config.json" \ -api-dir "github.com/knative/build/pkg/apis/build/v1alpha1" \ -out-file docs.html
Pull request type
Please check the type of change your PR introduces:
Issues
Test Plan