charts icon indicating copy to clipboard operation
charts copied to clipboard

Proposal: Add helm-docs support on charts

Open varet80 opened this issue 2 years ago • 6 comments
trafficstars

Good day,

I would like to suggest adding helm-docs on your Charts. and documenting automatically in README.md

what helm-docs can do is generate the variable list in your readme with all the details pulled from the values.yaml

it should be relatively easy to transition to this. I am also happy to volunteer to create an initial change with workflows, pre commit config and the values.yaml itself.

examples: https://github.com/k8sonlab/publiccharts/blob/main/charts/zwave-js-ui/values.yaml https://github.com/k8sonlab/publiccharts/blob/main/charts/zwave-js-ui/README.md

V

varet80 avatar Mar 06 '23 05:03 varet80

I would love to see the output of that rendered for this project! Give it a go if it’s not too much trouble and send it over so I can see the end result!

travisghansen avatar Mar 06 '23 13:03 travisghansen

I will make the example on the fork (with a manual generation) and if is nice, we can add actions to automate it (as next step)

let me prepare an example.

varet80 avatar Mar 07 '23 18:03 varet80

@travisghansen here is an initial example: https://github.com/varet80/democratic-csi-charts/tree/helm-docs/stable/democratic-csi I have also a Draft PR in my fork, which shows what I changed, but Did not add description on everything. Explained here: https://github.com/varet80/democratic-csi-charts/tree/helm-docs/stable/democratic-csi

varet80 avatar Mar 07 '23 19:03 varet80

I see. And there is some sane way to run this in ci?

travisghansen avatar Mar 08 '23 12:03 travisghansen

generally it is 1 single command helm-docs and that all!

it has some githooks which helps you during commit to update docs! https://github.com/norwoodj/helm-docs (and reduce ci needs) but also with github actions I did it in my releasing step: https://github.com/k8sonlab/publiccharts/blob/591079daa51007724857421a4d201e1f7b242f8c/.github/workflows/compatibility.yaml#L71 there is also this: https://github.com/softwaremill/helm-docs-action/blob/main/action.yml

but I also have hooks: https://github.com/k8sonlab/publiccharts/blob/main/.pre-commit-config.yaml which does force run during commits.

once you have the executable it is simple as:

helm-docs <path>

and updates the readme.md based on gotemplate

varet80 avatar Mar 08 '23 13:03 varet80

I see. I’ll look into it a little closer.

travisghansen avatar Mar 09 '23 01:03 travisghansen