Skip to content

[Backport release-1.2] fix(etcd): remove destructive post-upgrade cert-regeneration hook - #2517

Closed
github-actions[bot] wants to merge 1 commit into
release-1.2from
backport-2511-to-release-1.2
Closed

github-actions[bot] wants to merge 1 commit into
release-1.2from
backport-2511-to-release-1.2

Conversation

@github-actions

Copy link
Copy Markdown

Description

Backport of #2511 to release-1.2.

The etcd chart shipped a `post-upgrade` Helm hook that `kubectl delete`d the
etcd TLS chain (`etcd-{ca,peer-ca,client,peer,server}-tls`) and then deleted
etcd pods on every chart upgrade, gated by a semver compare of an
`etcd-deployed-version` ConfigMap against `2.6.1`.

The hook was added as a one-shot migration for the chart `2.6.0 -> 2.6.1`
transition. Since commit f871fbd ("Remove versions_map logic") all chart
versions are stamped as `0.0.0+<git-hash>`, which per semver is always
`< 2.6.1`. The gate therefore always resolves to "update certs", firing the
destructive hook on every etcd upgrade. On clusters running Kamaji-managed
tenant control planes this wipes the etcd CA, cert-manager re-issues it, and
tenant kube-apiservers hit `x509: certificate signed by unknown authority`
against `etcd.<ns>.svc:2379` until each tenant DataStore is manually
re-reconciled.

Commit 47d81f7 ("Disabled private key rotation in CA certs") already fixed
the underlying `rotationPolicy: Always` issue the migration was papering
over, so the hook has no remaining use. Remove the hook Job, its RBAC, the
version ConfigMap it read, and add a helm-unittest suite under
`packages/extra/etcd/tests/` that guards against re-introducing the hook
or the version ConfigMap.

Assisted-By: Claude <[email protected]>
Signed-off-by: Myasnikov Daniil <[email protected]>
(cherry picked from commit c150894)
(cherry picked from commit cbc1606)
@dosubot dosubot Bot added size/XS This PR changes 0-9 lines, ignoring generated files area/extra Issues or PRs related to tenant-specific modules (packages/extra/) kind/backport-previous Categorizes issue or PR as requiring a backport to the previous release line kind/bug Categorizes issue or PR as related to a bug labels Apr 28, 2026
@myasnikovdaniil myasnikovdaniil changed the title [Backport release-1.2] [Backport release-1.3] fix(etcd): remove destructive post-upgrade cert-regeneration hook [Backport release-1.2] fix(etcd): remove destructive post-upgrade cert-regeneration hook Apr 28, 2026
@github-actions github-actions Bot added area/database Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse) area/release Issues or PRs related to release tooling (changelog, backport, release pipeline) kind/backport Categorizes issue or PR as requiring a backport to the current release line labels Apr 28, 2026
@myasnikovdaniil

Copy link
Copy Markdown
Contributor

duplicate

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

Labels

area/database Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse) area/extra Issues or PRs related to tenant-specific modules (packages/extra/) area/release Issues or PRs related to release tooling (changelog, backport, release pipeline) kind/backport Categorizes issue or PR as requiring a backport to the current release line kind/backport-previous Categorizes issue or PR as requiring a backport to the previous release line kind/bug Categorizes issue or PR as related to a bug size/XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant