nextcloud / nextcloud/helm

Discussion: state of helm-docs for generating sectioned documentation

Open
#547 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage discussion documentation
Dominant language
Go Template
Stars
534
Forks
314
Avg merge
42m
Merged PRs (30d)
1

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with helm-docs' sections example and the chart's current README, then inspect the proposed README.gotmpl, values.yaml annotations, and .pre-commit-config.yml integration points. Determine whether section-specific comments and additional data such as externalDatabase details can be retained in the generated README, and document the required automation and template changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, helm, kubernetes
Domain
devops, documentation, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.