Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions deploy/helm/cassandra/docs/upgrade-from-bitnami.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ surfaced, each with evidence:
`StatefulSet.apps "cassandra" is invalid: spec: Forbidden: updates to
statefulset spec for fields other than 'replicas', 'ordinals', 'template',
'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and
'minReadySeconds' are forbidden`. The volumeClaimTemplate and serviceName
differ, and those fields are immutable. The StatefulSet must be recreated,
not updated in place.
'minReadySeconds' are forbidden`. The new chart intentionally removes the
existing `app.kubernetes.io/name` and `app.kubernetes.io/instance` labels
from `volumeClaimTemplates.metadata.labels`. Kubernetes treats the entire
volume claim template as immutable, so the StatefulSet must be recreated
instead of updated in place.

2. Data-layout nesting. Bitnami stored data nested under the mount:
`<pvc>/data/{data,commitlog,hints,saved_caches}` with
Expand Down Expand Up @@ -58,13 +60,11 @@ fields you may change on an existing StatefulSet are `replicas`, `ordinals`,
`minReadySeconds`. Everything else is immutable, including `selector`,
`serviceName`, `podManagementPolicy`, and `volumeClaimTemplates`.

The old and new StatefulSets share the name `cassandra` but differ in several of
those frozen fields:
- `serviceName`: the Bitnami headless service name vs the in-house
`cassandra-headless`.
- `selector.matchLabels`: the Bitnami labels vs the in-house
`cassandra.selectorLabels`.
- `volumeClaimTemplates`: name, size, storageClass, and labels differ.
The old and new StatefulSets share the name, selector, service name,
`podManagementPolicy`, and volume claim template specification. The only
immutable-field difference is in `volumeClaimTemplates.metadata.labels`. The
new chart intentionally removes the existing `app.kubernetes.io/name` and
`app.kubernetes.io/instance` labels.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

So `helm upgrade` applies the new chart onto the existing `cassandra`
StatefulSet, and the API server rejects it with the Forbidden error above. You
Expand Down
8 changes: 5 additions & 3 deletions docs/user/release-notes/0.6.0-to-0.6.1-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ data need a migration, because three things change at once: the runtime image,
the Helm chart shape, and the on-disk data layout. A normal in-place Helm
upgrade does not carry an existing Bitnami-based cluster onto the new stack:

- The Cassandra StatefulSet changes shape (name, selector, volume claim
template). Kubernetes freezes most StatefulSet fields, so the StatefulSet
cannot be updated in place; it has to be recreated.
- The new Cassandra chart intentionally removes the `app.kubernetes.io/name`
and `app.kubernetes.io/instance` labels from
`volumeClaimTemplates.metadata.labels`. This is the only change to an
immutable StatefulSet field. Kubernetes treats the entire volume claim
template as immutable, so the StatefulSet has to be recreated.
- The Bitnami image stored data nested one directory deeper than the official
image expects (`/bitnami/cassandra/data/...` versus
`/var/lib/cassandra/...`), so the new image does not find the old data by
Expand Down
Loading