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

Discussion: state of helm-docs for generating sectioned documentation #547

Open
jessebot opened this issue Mar 30, 2024 · 2 comments · May be fixed by #633
Open

Discussion: state of helm-docs for generating sectioned documentation #547

jessebot opened this issue Mar 30, 2024 · 2 comments · May be fixed by #633
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. discussion Being discussed documentation Improvements or additions to documentation

Comments

@jessebot
Copy link
Collaborator

jessebot commented Mar 30, 2024

Per my comment to @wrenix here:

If we used helm-docs, that would be cool. It looks like they recently added the ability to do sections (which was largely what stopped us being interested in this before)!
https://github.com/norwoodj/helm-docs/tree/master/example-charts/sections

We'd need to prefix each section with the name of the section like:

# @section -- database
postgresql:
# -- enable postgresql sub chart
  enabled: false

See their example values.yaml here:
https://github.com/norwoodj/helm-docs/blob/master/example-charts/sections/values.yaml

But then you get a specific section you can render in the README.md like their example here:

## Values

### database

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| postgresql.enabled | bool | `"false"` | enable postgresql sub chart |

Things to consider

  • We would also need a README.gotmpl
    • we would need to import the bulk of the tips and help text in our current readme into the readme template, or it would get deleted anytime someone runs helm-docs
  • It would be nice to use a github action to automatically update the docs from the readme. I use gabe565/setup-helm-docs-action for this on my personal repos. It requires a second action with write access to at least contents if you want it to actually commit back it's updated docs it generates.
  • There is a pre-commit hook for helm-docs so we could include that in a .pre-commit-config.yml file.

open question

Can you have comments and additional data for specific sections? For instance, right now, we have a database section of our readme that gives further details on the externalDatabase parameter. Is there a way to call the sections in the README.gotmpl?

@jessebot jessebot added 0. Needs triage Pending approval or rejection. This issue is pending approval. documentation Improvements or additions to documentation discussion Being discussed labels Mar 30, 2024
@wrenix
Copy link
Collaborator

wrenix commented Mar 31, 2024

I am fine with it, so every value option should be uncommented with an empty value to get it in the docs:
#534 (comment)

(maybe you do not need any custom README.md.gotmpl just overwrite the default template for the chapter)


your question: i do not know it, but i believe a [database](#database) could work.

@wrenix wrenix linked a pull request Sep 21, 2024 that will close this issue
8 tasks
@wrenix
Copy link
Collaborator

wrenix commented Sep 21, 2024

i start to work on a migration here: #633
there is a lot of todo, so do not be shy to add some commits here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. discussion Being discussed documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants