myasnikovdaniil 629dcc455d [Backport release-1.6] fix(platform): keep the legacy etcd-operator stopped after etcd adoption (#4739)
## What this PR does

Backport of #4738 to `release-1.6`, cherry-picked without changes from
`6248d458ad57c5991700dc26c5abc1340b1a05f4`.

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-headless` Service 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-headless` names 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

- The commit applies cleanly to `release-1.6` at `da98ddc08`.
- `hack/cozytest.sh hack/migration-50-etcd-adopt.bats` passes all 29
tests on this branch. The new test fails against the release-1.6 script
with `FAIL: 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.

- [x] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
fix(platform): backport to 1.6 the fix that keeps the legacy etcd-operator stopped after migration 50 adopts the legacy etcd clusters, so the adopted members keep their etcd-headless DNS names through the upgrade.
```
2026-10-14 12:34:55 +05:00
2026-09-28 05:45:09 +00:00
2025-10-08 09:43:34 +05:00
2025-04-01 18:48:14 +02:00
2024-02-08 12:04:32 +01:00

Cozystack Cozystack

Open Source Apache-2.0 License Support Active GitHub Release GitHub Commit OpenSSF Best Practices OpenSSF Scorecard

Cozystack

Cozystack is a free platform and framework for building clouds.

Cozystack is a CNCF Sandbox Level Project that was originally built and sponsored by Ænix.

With Cozystack, you can transform a bunch of servers into an intelligent system with a simple REST API for spawning Kubernetes clusters, Database-as-a-Service, virtual machines, load balancers, HTTP caching services, and other services with ease.

Use Cozystack to build your own cloud or provide a cost-effective development environment.

Cozystack user interface

Use-Cases

Documentation

The documentation is located on the cozystack.io website.

Read the Getting Started section for a quick start.

If you encounter any difficulties, start with the troubleshooting guide and work your way through the process that we've outlined.

Versioning

Versioning adheres to the Semantic Versioning principles.
A full list of the available releases is available in the GitHub repository's Release section.

Contributions

Contributions are highly appreciated and very welcomed!

In case of bugs, please check if the issue has already been opened by checking the GitHub Issues section. If it isn't, you can open a new one. A detailed report will help us replicate it, assess it, and work on a fix.

You can express your intention to on the fix on your own. Commits are used to generate the changelog, and their author will be referenced in it.

If you have a concrete feature request, open an issue. For a cross-cutting or architectural change, open a design proposal in the community repo. For questions or early ideas, use GitHub Discussions. See CONTRIBUTING.md for the full routing.

Community

You are welcome to join our Telegram group and come to our weekly community meetings. Add them to your Google Calendar or iCal for convenience.

License

Cozystack is licensed under Apache 2.0.
The code is provided as-is with no warranties.

Commercial Support

A list of companies providing commercial support for this project can be found on official site.

Languages
Go 48.2%
Shell 36.9%
TypeScript 6.9%
Go Template 5.3%
Makefile 1.4%
Other 1.1%