Skip to content

Stop signing the Helm repository index, and lint Chart.yaml for trailing whitespace - #924

Merged
HoustonPutman merged 2 commits into
apache:mainfrom
HoustonPutman:helm-index-unsigned
Dec 1, 2026
Merged

HoustonPutman merged 2 commits into
apache:mainfrom
HoustonPutman:helm-index-unsigned

Conversation

@HoustonPutman

Copy link
Copy Markdown
Contributor

Follow-ups to #900, for the Helm repository index that apache/solr-site#260 serves from the website.

Stop signing the Helm repository index

The index now lives in solr-site as website content, rather than next to the release artifacts. Its signature protected nobody:

  • Helm never fetches or checks index.yaml.asc or index.yaml.sha512.
  • What helm install --verify checks is each chart's .prov file, signed by the release manager and pushed to ghcr.io with the chart.
  • Changes to the index go through reviewed commits to solr-site.

Signing also tied every index update to a release manager's GPG key.

  • update_helm_index.sh no longer signs the index or writes its checksum, and drops its -g and -n options.
  • The release wizard's website_update_helm_index step no longer passes a GPG key or asks for a passphrase. test_oci_index.sh no longer passes -n.
  • dev-docs/helm-repository.md explains why the index isn't signed.

update_helm_index.sh now also writes the index the way Helm does, with lists not indented under their keys (yq's --yaml-compact-seq-indent). Previously the first release after the switch would have re-indented the whole file, which is about 6,000 changed lines for solr-site#260's index. Run against that index, adding a chart now changes only the lines of the new entry, plus generated.

Lint the charts' Chart.yaml for trailing whitespace

A YAML block scalar can't hold a line that ends in whitespace. When a changelog line in artifacthub.io/changes ends in a space, Helm writes the whole annotation into the index as a long double-quoted string instead of a block. That's what happened to the v0.7.0 and v0.8.1 solr-operator charts (fixed in the index in solr-site#260). make check-helm, and so make lint, now fails if a line in helm/*/Chart.yaml ends in whitespace. Both charts pass today.

Testing

  • update_helm_index.sh -d against solr-site#260's index, with a locally packaged solr 0.10.0 chart:
    • Adding it changed only the new entry's lines and generated.
    • Re-running replaced the entry in place, kept its created timestamp, and changed only generated.
    • No .asc or .sha512 was written.
  • The wizard step renders without -g.
  • The Chart.yaml check passes on the current charts, and fails, naming the line, when a trailing space is added. make -n check-helm shows Make expands the recipe as intended.
  • Not run: test_oci_index.sh and the Artifact Hub part of check-helm, which both need Docker.

The index now lives in solr-site, as website content, rather than next
to the release artifacts. Helm never checks a signature on a repository
index, so index.yaml.asc and index.yaml.sha512 protected nobody, and
tied every index update to a release manager's GPG key. What
'helm install --verify' checks is each chart's .prov file, which is
pushed to the OCI registry with the chart.

update_helm_index.sh drops its -g and -n options and no longer signs the
index. It also writes the index the way Helm does, with lists not
indented under their keys, so that adding a release only changes the
lines of the new entries instead of re-indenting the whole file.
A line in a YAML block scalar cannot end in whitespace, so when a
changelog line in a Chart.yaml's artifacthub.io/changes annotation ends
in a space, Helm writes the whole annotation into the Helm repository
index as a long double-quoted string instead of as a block. That is
what happened to the v0.7.0 and v0.8.1 solr-operator charts.
'make check-helm' now fails if a line in either Chart.yaml ends in
whitespace.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review identifies no active issues with the Helm repository maintenance changes.

No open issues 🎉

What changed in this PR

Simplifies maintenance of the website-hosted Helm repository index while preserving chart provenance verification.

Changes:

  • Removes index signing and checksum generation, updating callers and documentation.
  • Matches Helm’s list indentation to reduce index diffs.
  • Adds trailing-whitespace checks for chart metadata to make check-helm.
File Description
Makefile Rejects trailing whitespace in chart metadata.
hack/​release/​wizard/​releaseWizard.yaml Removes index-signing arguments and passphrase instructions.
hack/​release/​upload/​update_helm_index.sh Removes signing and uses Helm-compatible list indentation.
hack/​release/​smoke_test/​test_oci_index.sh Removes the obsolete -n option.
dev-docs/​helm-repository.md Documents unsigned index maintenance and formatting.

Review effort: Balanced

@HoustonPutman
HoustonPutman merged commit 00faced into apache:main Dec 1, 2026
6 checks passed
@HoustonPutman
HoustonPutman deleted the helm-index-unsigned branch December 1, 2026 23:47
HoustonPutman added a commit that referenced this pull request Dec 2, 2026
…ing whitespace (#924)

* Stop signing the Helm repository index

The index now lives in solr-site, as website content, rather than next
to the release artifacts. Helm never checks a signature on a repository
index, so index.yaml.asc and index.yaml.sha512 protected nobody, and
tied every index update to a release manager's GPG key. What
'helm install --verify' checks is each chart's .prov file, which is
pushed to the OCI registry with the chart.

update_helm_index.sh drops its -g and -n options and no longer signs the
index. It also writes the index the way Helm does, with lists not
indented under their keys, so that adding a release only changes the
lines of the new entries instead of re-indenting the whole file.

* Check the Helm charts' Chart.yaml files for trailing whitespace

A line in a YAML block scalar cannot end in whitespace, so when a
changelog line in a Chart.yaml's artifacthub.io/changes annotation ends
in a space, Helm writes the whole annotation into the Helm repository
index as a long double-quoted string instead of as a block. That is
what happened to the v0.7.0 and v0.8.1 solr-operator charts.
'make check-helm' now fails if a line in either Chart.yaml ends in
whitespace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants