Repository navigation
[Backport release-1.6] fix(platform): keep the legacy etcd-operator stopped after etcd adoption - #4739
Open
europrinter (yankawai) wants to merge 1 commit into
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Migration 50 scales the legacy etcd-operator to 0, adopts every legacy etcd.aenix.io cluster with etcd-migrate and then scales the operator back to 1. At that point it is still the legacy operator, and it has nothing left to manage. Until a tenant's etcd HelmRelease reconciles the new chart, Flux can upgrade it with the old one, which re-creates the legacy EtcdCluster that etcd-migrate just orphan-deleted. The legacy operator then reconciles it, re-creates the legacy StatefulSet and rewrites the legacy etcd-headless Service, dropping the owner references etcd-migrate pointed at the adopted EtcdMembers. When the new chart prunes the legacy EtcdCluster, the garbage collector deletes the Service with it, and the adopted members' etcd-<i>.etcd-headless names stop resolving. After a successful adoption the operator now stays at 0 until the etcd-operator HelmRelease replaces the Deployment with the v1alpha2 operator later in the same upgrade. A failed or interrupted adoption still restores it through the EXIT trap. Assisted-by: LLM Signed-off-by: Yan Bondarenko <[email protected]> (cherry picked from commit 6248d45)
europrinter (yankawai)
force-pushed
the
backport/etcd-adoption-keep-legacy-operator-down-1.6
branch
from
October 3, 2026 15:40
e0bfaf9 to
e708662
Compare
1 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Backport of #4738 to
release-1.6, cherry-picked without changes from6248d458ad57c5991700dc26c5abc1340b1a05f4.Migration 50 scaled the legacy etcd-operator back to 1 after adopting the legacy etcd clusters. Until a tenant's etcd HelmRelease reconciled the new chart, Flux re-created the legacy EtcdCluster from the old one, and the running legacy operator re-created the legacy StatefulSet and took the legacy
etcd-headlessService away from the adopted EtcdMembers. The garbage collector deleted the Service when the new chart pruned that EtcdCluster, and the adopted members'etcd-<i>.etcd-headlessnames stopped resolving. This hit every tenant etcd on a cluster upgraded from 1.4.3 to 1.6.4, and upgrades from 1.4 and 1.5 to 1.6 go through this branch. The operator now stays at 0 after a successful adoption until the etcd-operator HelmRelease replaces it, and a failed adoption still restores it through the EXIT trap. The full timeline from the audit log and the repair for already upgraded clusters are in #4738.Validation
release-1.6atda98ddc08.hack/cozytest.sh hack/migration-50-etcd-adopt.batspasses all 29 tests on this branch. The new test fails against the release-1.6 script withFAIL: the legacy operator was scaled back up after a successful adoption.Screenshots
Not a UI change.
Downstream repositories
Same diff as #4738, where the trigger map was walked file by file. No entry matches.
Release note