Skip to content

Release cert-manager v1.21.2 #9237

Closed
Closed

Description

@wallrj

v1.21.2

Patch release from release-1.21 (currently at 8fdd7dc2f), following on from the v1.21.1 tracker #9084.

Already merged since v1.21.1

Pending backports (the fixes deferred in #9084)

Pending backports (further bug fixes merged to master since v1.21.1)

CI flakes seen while merging these (all confirmed environmental, all pass on retest): #9246 (expirationSeconds tolerance), #9250 (Test_afterFunc/stop_works teardown sleep — fixed on this branch by #9261), #9251 (TestGeneratesNewPrivateKeyPerRequest integration startup), #9252 (Pebble unreachable for a whole e2e run)

Watching (open master PRs, not blocking — reconsider if merged before tagging)

Validation-tightening fixes (#9192, #9184, #9160) were considered and deliberately left for v1.22: resources accepted by v1.21.1 could be rejected after a patch upgrade.

Checklist

Following the release process.

with claude fable-5

Activity

  1. wallrj commented on Sep 5, 2026

    @wallrj
    MemberAuthor

    v1.21.2 ships without the Server-Side Apply fix, and we will not backport it to release-1.21 at all.

    The follow-up fix #9268 merged on master on 2026-09-04. Together with #8793 it is about 1,300 lines across three controllers, for an alpha feature gate that is off by default. That is too large for a patch release. #7438 and #8785 are fixed in v1.22. Reasoning: #8793 (comment)

    [Claude Fable 5.1]

  2. wallrj commented on Sep 10, 2026

    @wallrj
    MemberAuthor

    Scope is frozen. v1.21.2 ships from release-1.21 as it stands at 922a06a (#9323). The three open backports move to v1.21.3.

    Deferred to v1.21.3:

    v1.21.3 candidates: #9292, #9244, #9324 and #9109 (fixes #9100, the confirmed controller panic with windowDuration: 0s).

    This release is larger than usual. The evidence below is why we think that is acceptable.

    Size compared with earlier patch releases

    Production code in pkg/, internal/ and cmd/, tests excluded.

    Range Commits Files Lines changed
    v1.20.0 to v1.20.1 6 11 259
    v1.20.2 to v1.20.3 18 11 215
    v1.21.0 to v1.21.1 31 19 397
    v1.21.1 to 922a06a 64 37 1041

    About a third of the 64 commits are dependency bumps, Go updates and test-only deflakes. Each production fix is confined to one area, carries a regression test, and soaked on master before it was picked.

    CI on release-1.21 as of 2026-09-10 15:00 UTC

    All periodics are green except two, and both are explained:

    Next steps: confirm the next trivy-controller and make-test periodics are green, then tag.

    [Claude Fable 5.1]

  3. wallrj-cyberark commented on Sep 11, 2026

    @wallrj-cyberark
    Member

    v1.21.2 is published. cmrel publish had to be run four times to get there, because the jetstack-release-bot GitHub token had been revoked. Nothing was published in a broken state at any point, but the release path needs fixing properly and that work is not done yet.

    What broke

    1. The documented way to install cmrel gives you a binary that cannot publish.

    The release docs say go install github.com/cert-manager/release/cmd/cmrel@latest. The only tag on cert-manager/release is v1.12.14, from 2024-04-29, and master is 315 commits ahead of it. So @latest hands you an April-2024 binary.

    That matters because cert-manager/release@3d4b0a8 (2026-07-09) hardened the publish job. It used to install cmrel inside the privileged build from the mutable master ref, meaning anyone landing a commit on master could run code inside a build holding the GitHub token, the decrypted docker config and KMS signing access. Now cmrel pins _RELEASE_REPO_REF to the exact commit the invoking binary was built from, and the value in the file is a placeholder that fails closed. An older binary never substitutes it, so the build dies at step 0:

    go: github.com/cert-manager/release/cmd/cmrel@PINNED_CMREL_COMMIT_SHA_REQUIRED:
        unable to resolve git version: ... "git": executable file not found in $PATH
    

    The missing-git message is a red herring. Go only fell back to VCS because the placeholder is not a resolvable version.

    2. The publish token had been dead for weeks and we found out from a failed release.

    With a current cmrel, the dry run passed and the real publish failed here:

    Creating a draft GitHub release "v1.21.2" in repository cert-manager/cert-manager
    failed to create GitHub release: POST .../releases: 401 Bad credentials
    

    Tracing that line with git log -L, the KMS-encrypted token had not changed since 2020-01-31. It last worked for the v1.21.1 publish on 2026-07-29, so it was revoked at some point in the six weeks between. 401 is an invalid credential, not a missing scope. Nothing warned us; the release failing was the alert.

    The token belonged to jetstack-release-bot. Every release up to and including v1.21.1 lists that account as the release author, and v1.21.2 is the first to show cert-manager-bot. The account was created on 2020-01-30, one day before the token was committed, so it looks to have existed for exactly this purpose.

    Worth stating clearly, because it bounds the blast radius: the account itself is fine, and only this one token was revoked. jetstack-release-bot is not suspended, and a different token belonging to it is still in active use elsewhere in the release tooling — a private repository is checked out with it on an hourly schedule, which would fail authentication outright if the token were dead, and the most recent run succeeded today. So there is no need to go hunting for other broken credentials on this account. It does mean the account holds at least two long-lived tokens of unknown age.

    What we did

    Rotated it to a fine-grained token for the cert-manager-bot account, encrypted with the same KMS key, in cert-manager/release#372.

    That introduced a constraint worth knowing about. A fine-grained token has a single resource owner, so one token cannot reach both cert-manager/cert-manager and the separate organisation holding the Helm chart repository. The publish job's three actions split across both:

    Action Target Covered by the new token
    githubrelease cert-manager/cert-manager Yes
    helmchartpr the chart repo, different org No
    pushcontainerimages quay.io/jetstack (uses DOCKER_CONFIG) Yes

    So v1.21.2 was published with --publish-actions '*,-helmchartpr' and the chart handled separately. Conveniently, githubrelease sorts first and is the only remaining action that uses the GitHub token, so a bad token now fails before anything is published.

    Nothing was left half-published

    The failed attempt stopped at the first action. Confirmed three ways rather than trusting the log's generic "INCOMPLETE RELEASE MAY BE PUBLISHED" warning: no release existed on this repo, quay.io/jetstack/cert-manager-controller had no v1.21.2 tag while v1.21.1 was present, and no chart PR had been raised. The images in that build log were only docker loaded into the build's local daemon, never pushed.

    Follow-ups

    • fix(gcb): rotate the publish GITHUB_TOKEN release#372 is still open. Until it merges, master carries the revoked blob and the next release manager hits the same 401.
    • Cut a tag on cert-manager/release, or stop telling people to use @latest. Right now the documented install cannot publish a release. This is the cheapest fix here and it will bite the next person otherwise.
    • The chart step is being moved onto the automatic OCI sync so it stops depending on a long-lived cross-org token at all.
    • Audit what else jetstack-release-bot holds. We know of at least one more long-lived token on that account, still working, of unknown age and expiry. Nobody currently knows when it dies.
    • Longer term, drop long-lived tokens entirely. @wallrj is looking at octo-sts so the privileged build mints short-lived federated credentials. A token that sat untouched for five and a half years, and whose death we discovered through a failed release, makes the case on its own.
    • There is no monitoring on any of this. Nothing checks that the publish credentials still work until someone tries to ship. A periodic credential check would have turned a broken release day into a ticket.

    with claude opus-5

  4. wallrj commented on Sep 11, 2026

    @wallrj
    MemberAuthor

    Post-publish checks on the released v1.21.2 artifacts all pass. The OCI chart renders the same manifests as v1.21.1 apart from the image tags, it installs cleanly on kind, and it issues a certificate. Every image and the chart verify against the published signing key.

    Helm chart diff, v1.21.1 → v1.21.2

    Same method as the makefile-modules helm-diff target (cert-manager does not vendor that module): helm template of both OCI versions with crds.enabled=true, filtered with the module's HELM_IGNORE_FIELDS regex, then diff -u.

    Only these lines differ:

    -          image: "quay.io/jetstack/cert-manager-cainjector:v1.21.1"
    +          image: "quay.io/jetstack/cert-manager-cainjector:v1.21.2"
    -          image: "quay.io/jetstack/cert-manager-controller:v1.21.1"
    +          image: "quay.io/jetstack/cert-manager-controller:v1.21.2"
    -          - --acme-http01-solver-image=quay.io/jetstack/cert-manager-acmesolver:v1.21.1
    +          - --acme-http01-solver-image=quay.io/jetstack/cert-manager-acmesolver:v1.21.2
    -          image: "quay.io/jetstack/cert-manager-webhook:v1.21.1"
    +          image: "quay.io/jetstack/cert-manager-webhook:v1.21.2"
    -          image: "quay.io/jetstack/cert-manager-startupapicheck:v1.21.1"
    +          image: "quay.io/jetstack/cert-manager-startupapicheck:v1.21.2"

    No CRD, RBAC, or template changes. 14,017 rendered lines on each side.

    Smoke test on kind, following the docs' end-to-end verification

    Kubernetes v1.36.1 (kind), installed with:

    helm install cert-manager oci://quay.io/jetstack/charts/cert-manager --version v1.21.2 \
      --namespace cert-manager --create-namespace --set crds.enabled=true --wait
    

    All three pods ready on the v1.21.2 images. Then the self-signed Issuer and Certificate from the installation docs:

    certificate.cert-manager.io/selfsigned-cert condition met
    NAME              READY   SECRET                ISSUER            STATUS                                          AGE
    selfsigned-cert   True    selfsigned-cert-tls   test-selfsigned   Certificate is up to date and has not expired   1s
    

    The CertificateRequest was approved and issued, and the Secret holds a leaf with DNS:example.com and a 90 day validity. No error lines in the controller log.

    Signatures

    Verified with the documented command and cert-manager-pubkey-2021-09-20.pem:

    Artifact Result
    cert-manager-controller:v1.21.2 verified
    cert-manager-webhook:v1.21.2 verified
    cert-manager-cainjector:v1.21.2 verified
    cert-manager-acmesolver:v1.21.2 verified
    cert-manager-startupapicheck:v1.21.2 verified
    charts/cert-manager:v1.21.2 verified

    The checklist is updated: cert-manager/website#2261 is merged and the installation docs show v1.21.2. Left open: the jetstack-charts PR and the Slack completion message.

    [Claude Fable 5.1]

  5. wallrj commented on Sep 11, 2026

    @wallrj
    MemberAuthor

    cert-manager/release v1.13.0 is tagged and released. This closes the "cut a tag on cert-manager/release" follow-up from the post-mortem above. go install github.com/cert-manager/release/cmd/cmrel@latest will resolve to v1.13.0 once the module proxy refreshes its cached @latest, so the documented install produces a binary that can publish again.

    Release and notes: https://github.com/cert-manager/release/releases/tag/v1.13.0

    What was done:

    Checks made before tagging: master builds and make test passes. pkg/releaseref accepts a module version as the GCB pin, so a binary installed from the tag pins _RELEASE_REPO_REF to v1.13.0 without needing a git checkout. After publishing, go install .../[email protected] through the module proxy succeeded and the binary reports mod github.com/cert-manager/release v1.13.0.

    One follow-up remains on the docs. cmrel stage and cmrel publish read gcb/*/cloudbuild.yaml from the working directory, so the binary and the checkout must match. Update: rather than documenting a tag plus a matching checkout, cert-manager/release#376 embeds the config in the binary and cert-manager/website#2280 changes the docs to a single go install. See the comment below.

    [Claude Fable 5.1]

  6. wallrj commented on Sep 11, 2026

    @wallrj
    MemberAuthor

    Post-release task: retire the helmchartpr publish action. This picks up the "chart step moves onto automatic OCI sync" follow-up above. It is not needed for v1.21.2, which is already published and verified.

    Why this is the right time

    The rotated publish token is a fine-grained token owned by the cert-manager org, so it can never reach jetstack/jetstack-charts. That makes helmchartpr dead code rather than a step we skip by hand each release. We had wanted to stop pushing chart PRs into jetstack-charts anyway. Removing the action turns that from "one day" into "now".

    What is changing

    Piece Where Status
    cmrel gcb publish pushes and signs the chart to quay.io/jetstack/charts as the new helmchartoci action, and helmchartpr is deleted cert-manager/release#377, reviving cert-manager/release#290 Open. Used to publish v1.22.0-alpha.0 on 2026-11-24, with cosign pinned to v2.6.5
    charts.jetstack.io is generated from the OCI registry instead of from cmrel's PR jetstack/jetstack-charts#560, in a private repository, opened from my work account Open

    Once both land, hack/push_and_sign_chart.sh in cert-manager/release goes, along with its step in the release process docs. The publish job then needs the GitHub token for githubrelease only, which is the shape cert-manager/release#373 (octo-sts) assumes.

    Plan

    1. Merge the jetstack-charts sync PR so the HTTPS chart repository no longer waits on a cmrel PR.
    2. Run Publish the Helm chart to the OCI registry from the publish pipeline release#377 on the next alpha, v1.22.0-alpha.0, and check the chart, its .prov file and the cosign signatures on quay.io/jetstack/charts/cert-manager for both the v-prefixed and plain tags.
    3. Merge Windows node issues #377, delete the script, and update the release process docs on the website.

    #377 also moves the publish job from cosign v1.13.6 to v3.1.3 and applies the same "no transparency log" flags to image signing and the metadata.json check, so the v3 binary keeps the behaviour we have today. The evidence for that is in the PR body.

    [Claude Fable 5.1]

  7. wallrj commented on Sep 11, 2026

    @wallrj
    MemberAuthor

    Update on the cmrel install path. Tagging v1.13.0 fixed @latest for today, but on reflection it is not the fool-proof answer. Two PRs make the install a single go install with nothing to keep in sync.

    The problem is that cmrel reads gcb/*/cloudbuild.yaml from the working directory, and since cert-manager/release#334 the publish job pins its own install to the commit the invoking binary was built from. So the binary and the checkout must match exactly, and nothing checks that they do. Both ways of getting there have a trap:

    Instruction What goes wrong
    go install [email protected] and git checkout v1.13.0 Two things to keep in sync. A stale checkout submits the wrong config, silently.
    Check out master and build from it Go stamps the binary vcs.modified=true if git status shows anything, including untracked files. The pin then refuses to run. Confirmed on a clean checkout with one untracked directory.

    What is open:

    Still unfiled from the post-mortem: the jetstack-release-bot token audit and a periodic credential check.

    [Claude Fable 5.1]

  8. wallrj-cyberark commented on Sep 11, 2026

    @wallrj-cyberark
    Member

    The Helm chart is now published to charts.jetstack.io, so v1.21.2 is fully released.

    This was the last gap. The website merged earlier today and advertises v1.21.2 as latest, but the Helm repository index still stopped at v1.21.1, so anyone following the install docs could not get the version the docs pointed at. That is now fixed.

    Verified against the live repository, not the build output:

    $ helm repo add jetstack https://charts.jetstack.io
    "jetstack" has been added to your repositories
    
    $ helm repo update jetstack
    ...Successfully got an update from the "jetstack" chart repository
    
    $ helm search repo jetstack/cert-manager --versions
    NAME                     CHART VERSION   APP VERSION   DESCRIPTION
    jetstack/cert-manager    v1.21.2         v1.21.2       A Helm chart for cert-manager
    jetstack/cert-manager    v1.21.1         v1.21.1       A Helm chart for cert-manager
    
    $ helm pull jetstack/cert-manager --version v1.21.2
    $ helm show chart ./cert-manager-v1.21.2.tgz | grep -E '^(name|version|appVersion):'
    appVersion: v1.21.2
    name: cert-manager
    version: v1.21.2

    The chart was also smoke-tested on a kind cluster before publication: it installs cleanly, cmctl version reports detected: v1.21.2, cmctl check api passes, all three pods run the v1.21.2 images, and a self-signed ClusterIssuer plus Certificate reached READY=True.

    One change worth recording for future releases. This chart did not reach charts.jetstack.io through cmrel's helmchartpr action, which cannot work any more: the publish token now belongs to cert-manager-bot, and a fine-grained token cannot reach a second GitHub organisation. The Helm repository now syncs from the OCI registry instead, on a schedule. cert-manager/release#377 removes the dead action and moves chart publication into the publish pipeline.

    That leaves only the completion announcement outstanding for v1.21.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions