cozystack/packages/extra/etcd
Myasnikov Daniil c1508940bd
fix(etcd): remove destructive post-upgrade cert-regeneration hook
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 f871fbdb ("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 47d81f70 ("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 <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-04-23 13:34:51 +05:00
..
charts Configure all apps to use new function to generate subjects 2025-06-16 20:32:11 +02:00
logos Update dashboard icons (#274) 2024-08-12 14:47:11 +02:00
templates fix(etcd): remove destructive post-upgrade cert-regeneration hook 2026-04-23 13:34:51 +05:00
tests fix(etcd): remove destructive post-upgrade cert-regeneration hook 2026-04-23 13:34:51 +05:00
.helmignore Ship all logos with Cozystack 2024-07-16 17:31:52 +02:00
Chart.yaml Remove versions_map logic 2025-09-24 12:32:37 +02:00
Makefile fix(etcd): remove destructive post-upgrade cert-regeneration hook 2026-04-23 13:34:51 +05:00
README.md [dx] JSDoc compatible syntax for values.yaml 2025-10-29 08:57:26 +05:00
values.schema.json [docs] Updated app go types 2026-03-25 15:57:25 +05:00
values.yaml [dx] JSDoc compatible syntax for values.yaml 2025-10-29 08:57:26 +05:00

Etcd-cluster

Parameters

Common parameters

Name Description Type Value
size Persistent Volume size. quantity 4Gi
storageClass StorageClass used to store the data. string ""
replicas Number of etcd replicas. int 3
resources Resource configuration for etcd. object {}
resources.cpu Number of CPU cores allocated. quantity 1000m
resources.memory Amount of memory allocated. quantity 512Mi