docs(charts): generate chart READMEs in the readthedocs pipeline - #298
Open
lemaitre-aneo wants to merge 4 commits into
Open
docs(charts): generate chart READMEs in the readthedocs pipeline#298lemaitre-aneo wants to merge 4 commits into
lemaitre-aneo wants to merge 4 commits into
Conversation
lemaitre-aneo
force-pushed
the
fl/helm-readthedocs
branch
from
August 4, 2026 07:57
ab1a6fb to
24920e9
Compare
lemaitre-aneo
force-pushed
the
fl/helm-readthedocs
branch
from
August 4, 2026 08:29
66d2222 to
1a37b1d
Compare
lemaitre-aneo
force-pushed
the
fl/helm-readthedocs
branch
from
August 4, 2026 08:34
1a37b1d to
f2477e9
Compare
rbekhtaoui
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The Helm chart
README.mdfiles are purehelm-docsoutput, yet they were committed and regeneratedby a
pre-commithook. That is the setup we already moved away from for the Terraform moduledocumentation, which is now generated inside the ReadTheDocs pipeline, and it carries the same two
costs: every
values.yamlorChart.yamlchange drags a regenerated README through the diff, and thegenerated files go stale whenever the hook does not run. All three failure modes were live on the
branch:
charts/armonik-dependencies/README.mdwas a copy of the ingress chart's README, titled# ingress, becausehelm-docssilently skips a chart with novalues.yamland that chart's filewas named
values.yml.charts/armonik-configuration/README.mdoutlived its chart, leaving a directory whose only contentwas the README of a chart that no longer exists.
charts/armonik-operators/README.md, added one commit earlier in feat(helm): split operators into an install-once armonik-operators chart #294, was already missing everyglobal.armonik.*value the operator split introduced.Description
Chart READMEs are generated at documentation build time and no longer committed, mirroring the
Terraform setup.
charts/*/README.mdis git-ignored and the committed copies are removed.Pipeline
.docs/generate-helm-docs.sh(new) runshelm-docsovercharts/, withHELMDOCSselecting thebinary exactly as
TFDOCSdoes ingenerate-tf-docs.sh..readthedocs.yamldownloadshelm-docsv1.14.2, pinned liketerraform-docsv0.19.0, and runsthe script before the symlink pass. Both archives are now unpacked with only their binary extracted,
into
.bin/: they also ship aREADME.mdat their root, andhelm-docsaCHANGELOG.md, so theprevious
| tar xzwas overwriting the repository's own files on every build..docs/generate-docs-symlinks.sh:symlink_readmegained akeep-pathmode, and a secondfindpass maps
charts/<chart>/README.mdto.docs/charts/<chart>/index.md. The mode is needed becausearmonikis inis_provider, so the default provider hoisting would sendcharts/armonikto.docs/armonik/chartsand collide with the Terraformarmonik/module page.helm-docspre-commithook and its CI install step are dropped.Rendering of the generated pages
Helm Chartstoctree, ordered by deployment role rather thanalphabetically. A glob can only sort by docname, and mixing an explicit list with a catch-all glob
duplicates every named entry. A chart added later and left out of the list is reported by Sphinx as
document isn't included in any toctree..docs/_static/custom.css, wired throughhtml_css_files. The theme caps content at 800px andsets
white-space: nowrapon every table cell, which pushed the wide values tables off screen; theoverride raises the cap and lets cells wrap, keeping only the Key column unwrapped. This helps the
Terraform tables too.
_static/had to come out of.docs/.gitignore, where it was listed as abuild output.
--document-dependency-valuesincludes the values of our own subcharts, taking the umbrella pagefrom ~140 to ~590 rows under the
compute-plane.*,control-plane.*,ingress.*anddependencies.*prefixes.--skip-version-footerdrops the "Autogenerated from chart metadata" notice.charts/_templates.gotmploverrides the built-inchart.valuesTableso the Default andDescription cells get their pipes escaped. helm-docs emits them raw, and a pipe splits a markdown
row into further cells even inside a code span, so every default holding a template pipeline, which
most of the
conf.*ones do, was rendering half in the Default column and half in the Descriptionone.
sourcesin every chart'sChart.yamlnow points at this repository. Four charts pointed athttps://aneoconsulting.github.io/, two carried deeptree/main/charts/<dir>links, and four hadno
sourcesat all, so their pages showed no Source Code section.Adjacent fixes
charts/armonik-dependencies/values.ymlrenamed tovalues.yaml, without whichhelm-docsskipsthe chart and it gets no page. The file holds nothing but a comment, so the rename is
behaviour-neutral.
charts/armonik-configuration/deleted; the chart is gone and only its README remained.tfsecinstall step is removed from thepre-commitworkflow. It fails onmaintoo:the upstream install script resolves the version with a greedy
sed -E 's/.*"([^"]+)".*/\1/'over the GitHub API response, which yieldedmentions_countas theversion and a 404. Nothing runs the tool,
terraform_tfsecis commented out in.pre-commit-config.yaml, and upstream has folded tfsec into Trivy, so the step is dead weightrather than something to pin.
Testing
The documentation pipeline has no automated coverage, so this was verified by running it:
https://armonikinfra--298.org.readthedocs.build/en/298/charts/armonik/index.html
helm-docsoutput is byte-identical to the READMEs this PR removes, for every chart it previouslygenerated, and identical before and after the pipe-escaping template once
\|is unescaped, so theoverride changes nothing but the escaping.
.tgzpresent, checked on a copy ofcharts/with everycharts/*/charts/directory removed, so the build needs nohelm dependency buildstep.sphinx-buildagainst.docs/requirements.txt: every chart page builds, every symlinkresolves,
custom.cssloads aftertheme.cssso both overrides win, and the only warning is forarmonik-playground, which is git-ignored and absent from a clean checkout.helm lintpasses on every chart, andhelm template armonikis unchanged across thevalues.ymlrename (over 56k rendered lines, the only differences are the randomly generatedsecrets and the config checksum that depends on them).
armonik-ingressfailshelm lintbothbefore and after this branch, on a pre-existing standalone-render bug:
gui-static.yaml:12reaches.Values.global.environment.descriptionthrough a nilglobal.environment.pre-commit runpasses on every touched file.Impact
pre-commitno longerneeds
helm-docsinstalled.# --comments invalues.yaml,Chart.yamlmetadata, or a per-chart
README.md.gotmpl..docs/index.md; forgetting it is reportedas a build warning.
values.yamlgets no documentation page, silently. Noted in.docs/README.md.in-tree README has no ArtifactHub or
helm packageconsequence. That changes if chart publishingis added later: the publish step would then have to run
helm-docsbefore packaging.Additional Information
helm-docsonly reads dependencies it finds assources on disk, so our
file://subcharts are covered and the vendored archives(kube-prometheus-stack, grafana, rabbitmq, cert-manager, ...) are not. Including them would mean
unpacking the archives in the pipeline and adding several thousand upstream rows per page.
--document-dependency-valuesappends the dependency values as a second block rather than mergingthem, so a key the umbrella overrides appears twice: once with the umbrella's value, once with the
subchart default. 10 keys on the umbrella page and 1 on
armonik-dependencies; no other page isaffected.
helm-docsversion: the URL lives in.readthedocs.yamlwith nocustom manager, exactly as
terraform-docsdoes today. Worth a follow-up for both at once.bash .docs/generate-helm-docs.shplus a chart-count assertion would fit in the Helm linterworkflow.
Checklist