Skip to content

Publish the Helm chart to the OCI registry from the publish pipeline - #377

Draft
wallrj wants to merge 5 commits into
cert-manager:masterfrom
wallrj:oci-chart-publish
Draft

Publish the Helm chart to the OCI registry from the publish pipeline#377
wallrj wants to merge 5 commits into
cert-manager:masterfrom
wallrj:oci-chart-publish

Conversation

@wallrj

@wallrj wallrj commented Sep 11, 2026

Copy link
Copy Markdown
Member

This revives #290 by @SgtCoDFish. The two commits from that PR are rebased onto master unchanged, with three commits on top.

What changes

  • New helmchartoci publish action. It pushes the chart and its .prov file to quay.io/jetstack/charts, signs the tag with cosign, verifies the signature, then copies the chart to the tag without the v prefix and signs that too. This is what hack/push_and_sign_chart.sh does by hand today. The script stays until this action has run on a real release.
  • The helmchartpr action is removed. The publish GitHub token was rotated to the cert-manager-bot account after Release cert-manager v1.21.2 cert-manager#9237. That token cannot reach jetstack/jetstack-charts, so the action cannot run. A workflow in jetstack-charts now syncs charts.jetstack.io from the OCI registry instead, so we no longer need cmrel to open that PR. The GitHub repository manager, its flags, the Cloud Build substitutions and the gcb/test/helm job all went with it.
  • cosign v1.13.6 becomes v3.1.3. Every cosign sign call now passes --tlog-upload=false --new-bundle-format=false --use-signing-config=false, and cosign verify-blob passes --insecure-ignore-tlog=true. That keeps the behaviour we have with cosign v1, where key-based signing never touched the transparency log. Without this, the metadata check and image signing would break on the v3 binary, not just chart signing.
  • helm is installed with go install at a pinned tag. Add OCI signing as part of existing publish pipeline #290 piped an unpinned script from the helm main branch into sh. The publish job has KMS signing access, so its tools must come from pinned sources like cmrel, cosign and crane already do.

What I checked

  • go test ./... and make presubmit pass.
  • go install of cosign v3.1.3, crane v0.22.1 and helm v4.3.0 at the pinned tags succeeds.
  • cosign v3.1.3 accepts every flag cmrel passes. It prints deprecation warnings for --tlog-upload, --new-bundle-format, --signature-digest-algorithm and --signature, then proceeds as far as calling KMS.
  • helm falls back to the Docker credential store, so the existing DOCKER_CONFIG secret covers helm push to quay.io.

This has not run against a real release yet. The plan from #290 stands: try it on a v1.22.0-alpha.0 publish before retiring the script.

Evidence

Follow-ups, not in this PR

Closes #290.

[Claude Fable 5.1]

SgtCoDFish and others added 5 commits September 11, 2026 13:13
This bug has been latent since commit 7ba3cf2 added the cmctl check. It caused
tests to panic

Signed-off-by: Ashley Davis <[email protected]>
The aim is for this to replace the need for hack/push_and_sign_chart.sh
and to eventually make charts.jetstack.io downstream of the OCI registry.

Signed-off-by: Ashley Davis <[email protected]>
The helmchartpr action opened a pull request against jetstack/jetstack-charts
with the release's Helm chart. Since the publish GitHub token was rotated to
the cert-manager-bot account (cert-manager/cert-manager#9237), that token
cannot reach the jetstack org, so the action can no longer run. The
charts.jetstack.io repository is now synced from the OCI registry by a
workflow in jetstack-charts instead, so nothing needs to open that PR.

Delete the action, its GitHub repository manager, the flags and Cloud Build
substitutions that only it read, and the Cloud Build job that checked the
bot's permissions on jetstack-charts.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Richard Wall <[email protected]>
The publish job now installs cosign v3. cosign v3 uploads to the
transparency log, writes the new bundle format and reads a signing config by
default. cosign v1.13.6 did none of those for key-based signing unless
COSIGN_EXPERIMENTAL was set. The chart signing code already turned all three
off; image signing did not, so with a v3 binary it would have tried to
create and verify a tlog entry and failed on our SHA-512 KMS key.

Move the chart options into the cosign package as DefaultSignOptions and
DefaultVerifyOptions and use them for container images and manifest lists
too. Route image signing through the injectable runner so tests can fake it,
which answers the Copilot comment on cert-manager#290.

cosign verify-blob has the same problem: staging signs metadata.json with
--tlog-upload=false, and cosign v2+ fails verification when it cannot find a
tlog entry. Pass --insecure-ignore-tlog=true, which is what the chart
verification already does.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Richard Wall <[email protected]>
Install helm the same way as cmrel, cosign and crane, with go install at a
pinned tag, instead of piping an unpinned script from the helm main branch
into sh. The publish job runs with KMS signing access, so every tool it runs
must come from a pinned source. Use the same golang image as the other steps
so Renovate keeps them in step.

Pin cosign v3.1.3, crane v0.22.1 and helm v4.3.0, the current releases.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Richard Wall <[email protected]>
@cert-manager-prow

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cert-manager-prow cert-manager-prow Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Sep 11, 2026
@cert-manager-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign maelvls for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants