mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-07 04:23:50 +09:00
With the chart-based names pinned back, an upgrade adopts the running workloads
and their volumes in place. Before 4.31 the chart ignored the release name, so
this holds for an instance running under any name: its data sits on the
chart-named data1-seaweedfs-volume-* PVCs either way.
Two states cannot be adopted and stop the render instead, each pointing the
operator at the matching recovery step:
- Fresh on 1.5.x: only the renamed volumes exist, so adopting the chart-based
name would rename the workloads away from that data and bring up an empty
cluster. Helm cannot move data between PVCs, so the operator is sent to the PV
re-bind procedure.
- D-split: both sets exist AND the renamed volume servers are live, so they may
hold objects written through the split endpoint. Adopting would strand them, so
the operator is sent to reconcile the split first. A duplicate that never served
(zero ready replicas) is safe to adopt and renders through.
The guard mirrors the chart's fullname helper to recognise what 4.31 named this
instance (the helper appends the chart name when the release name does not
contain it, then truncates), and matches the renamed volumes by shape plus the
chart labels on the StatefulSet rather than reconstructing the exact name.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
(cherry picked from commit 052ce2e4a3)
(cherry picked from commit 5a724e0bc0d43c8afb621a6da4aab5b13a86e774)