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 CRD Documentation #1342

Closed
ihcsim opened this issue Mar 30, 2022 · 9 comments · Fixed by Kartik-Garg/kanister#1 or #1727
Closed

Auto-generate CRD Documentation #1342

ihcsim opened this issue Mar 30, 2022 · 9 comments · Fixed by Kartik-Garg/kanister#1 or #1727

Comments

@ihcsim
Copy link
Contributor

ihcsim commented Mar 30, 2022

Use a tool like https://github.com/ahmetb/gen-crd-api-reference-docs/ to auto-generate the CRD documentation, to avoid deviation between the code and the doc. Update the Makefile docs target to include the new command.

@github-actions
Copy link
Contributor

This issue is marked as stale due to inactivity. Add a new comment to reactivate it.

@github-actions github-actions bot added the stale label May 30, 2022
@ihcsim
Copy link
Contributor Author

ihcsim commented May 30, 2022

The styling of the current rst docs isn't compatible with that generated by the api-reference-docs tool. To be revisit after we move to GitHub Pages.

The generated output can be saved into a file named API.md.

@github-actions github-actions bot removed the stale label May 31, 2022
@github-actions
Copy link
Contributor

This issue is marked as stale due to inactivity. Add a new comment to reactivate it.

@Kartik-Garg
Copy link
Contributor

@ihcsim I am willing to contribute, can I take it up?

@PrasadG193
Copy link
Contributor

Hey @Kartik-Garg,
Thanks for showing interest. Please feel free to reach out to us if you need help.

@Kartik-Garg
Copy link
Contributor

Kartik-Garg commented Nov 7, 2022

Hey @PrasadG193 , I have created the PR : #1727
regarding this issue, can you please have a look at it?
thank you!

@github-actions
Copy link
Contributor

This issue is marked as stale due to inactivity. Add a new comment to reactivate it.

@github-actions github-actions bot added the stale label Jan 10, 2023
@github-actions
Copy link
Contributor

This issue is closed due to inactivity. Feel free to reopen it, if it's still relevant.

@Kartik-Garg
Copy link
Contributor

Kartik-Garg commented Feb 10, 2023

@PrasadG193 @ihcsim @viveksinghggits Can we get this issue reopened please, work on PR is completed and it's updated.

@PrasadG193 PrasadG193 reopened this Feb 14, 2023
@mergify mergify bot closed this as completed in #1727 Feb 22, 2023
mergify bot pushed a commit that referenced this issue Feb 22, 2023
* created documentation

* Auto-generation of API CRD documentation

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]>

* Auto-Generation of API CRD documentation

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]>

* Deleting the directory

* adding template folder for internal PR

* Update Makefile

Co-authored-by: kale-amruta <[email protected]>

* Modifying dokcer build image

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]>

* Removing executable binary and json from template folder

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]>

* Changes in makefile

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]>

* Update Makefile

Removed unwanted space

Co-authored-by: Prasad Ghangal <[email protected]>

* Update Makefile

Improved the spacing as per the suggestion.

Co-authored-by: Prasad Ghangal <[email protected]>

* Making it more tidy

Removed the template folder, updated API.md file, Made alignment changes

Signed-off-by: Kartik-Garg <[email protected]>

* Modifying makefile alignement

Modified space in makefile

Signed-off-by: Kartik-Garg <[email protected]>

* Made changes in the Dockerfile build and makfile

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]>

* Changes in CONTRIBUTING.md

Added steps to create the documentation when changes are made in Kanister API Types as well.

Signed-off-by: Kartik-Garg <[email protected]>

---------

Signed-off-by: Kartik-Garg <[email protected]>
Signed-off-by: Kartik-Garg <[email protected]>
Co-authored-by: kale-amruta <[email protected]>
Co-authored-by: Prasad Ghangal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment