Skip to content

chore(etcd-operator): bump etcd-operator to v0.5.4 - #3529

Merged
myasnikovdaniil merged 2 commits into
mainfrom
chore/bump-etcd-operator-0.5.4
Aug 4, 2026
Merged

chore(etcd-operator): bump etcd-operator to v0.5.4#3529
myasnikovdaniil merged 2 commits into
mainfrom
chore/bump-etcd-operator-0.5.4

Conversation

@androndo

@androndo Andrey Kolkov (androndo) commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

What this PR does

Bumps the cozystack etcd-operator packages from v0.5.3 to v0.5.4.

v0.5.4 is a controller bug-fix release — no API, RBAC or values changes:

Changes in this repo:

  • packages/system/etcd-operator/Chart.yamlappVersion: v0.5.3 → v0.5.4. The manager image tag defaults to .Chart.AppVersion (values.yaml keeps tag: ""), so this reimages the controller to ghcr.io/cozystack/etcd-operator:v0.5.4.
  • packages/system/etcd-operator/Makefile, packages/system/etcd-operator-crds/MakefileETCD_OPERATOR_REF: v0.5.3 → v0.5.4.
  • packages/system/etcd-operator-crds/templates/etcdmembers.yaml — re-vendored at v0.5.4 via make update. Description-only change to the /scale replicas/selector field docs, tracking the PDB minAvailable fix. etcdclusters and etcdsnapshots are byte-identical to v0.5.3.
  • templates/rbac.yaml intentionally left as-is: manager-role-rules.yaml is byte-identical between v0.5.3 and v0.5.4.

Upgrade path (PDB switch, cozystack/etcd-operator#351). This is the one change that rewrites live objects: the operator moves each EtcdCluster's PodDisruptionBudget from maxUnavailable to minAvailable. Setting both fields is invalid, but upstream reconcilePDB handles the migration — it treats a surviving pre-migration maxUnavailable as divergence and explicitly clears it (MaxUnavailable = nil) before writing MinAvailable, so existing clusters are reconciled cleanly on upgrade rather than wedging their PDB.

Verified locally: helm lint and helm template pass for both packages; rendered manager image resolves to ghcr.io/cozystack/etcd-operator:v0.5.4. These packages/system/* packages have no generate: target and no values.schema.json, so there is nothing for make generate to regenerate.

Screenshots

Not applicable — no UI changes.

Downstream repositories

Walked the trigger map in docs/agents/contributing.md file-by-file against the diff:

  • The diff touches only packages/system/etcd-operator* — no packages/apps/** or packages/extra/** add/rename/remove, no packages/core/platform or installer values, no Talos bump, no asset-name or dev-tooling change → website / ansible-cozystack not reached.

  • The CRD edit is description-only, inside etcd-operator's own etcd-operator.cozystack.io CRDs — not the provider's hand-typed Package/Plan/RestoreJob types, and no new managed app → terraform-provider-cozystack not reached.

  • No hack/ change, no packages/system/<name>-rd/cozyrds/**, no ApplicationDefinition CRD / chartRef.kind enum change, no cozyhr/package.mk contract change, no telemetry-metric or proxy-label rename → ccp / talm / cozyhr / cozy-proxy / telemetry-server / examples / external-apps-example not reached.

  • No downstream repository is affected by this change

  • cozystack/website - follow-up:

  • cozystack/terraform-provider-cozystack - follow-up:

  • cozystack/ansible-cozystack - follow-up:

  • cozystack/ccp - follow-up:

  • cozystack/talm - follow-up:

  • cozystack/cozyhr - follow-up:

  • cozystack/cozy-proxy - follow-up:

  • cozystack/cozystack-telemetry-server - follow-up:

  • cozystack/external-apps-example - follow-up:

  • cozystack/examples - follow-up:

Release note

chore(etcd-operator): bump etcd-operator to v0.5.4 (controller bug-fixes: PDB switched to minAvailable, crash-loop self-heal extended to memory members, --initial-cluster-state derived from phase, seed no longer exempt from self-heal)

Summary by CodeRabbit

  • Updates
    • Updated the etcd operator to version v0.5.4.
    • Clarified scale-related resource descriptions, including replica counts, selectors, and disruption budget behavior.

Bump the cozystack etcd-operator packages from v0.5.3 to v0.5.4. The
release is a controller bug-fix set with no API, RBAC or values changes:

- fix(controllers): derive --initial-cluster-state from phase, not from
  the seed (cozystack/etcd-operator#355)
- fix(controllers): stop exempting the bootstrap seed from self-heal
  (cozystack/etcd-operator#354)
- fix(controllers): extend crash-loop self-heal to memory members
  (cozystack/etcd-operator#352)
- fix(controllers): switch the PDB from maxUnavailable to minAvailable
  (cozystack/etcd-operator#351)

Adaptations:
- etcd-operator/Chart.yaml: appVersion v0.5.3 -> v0.5.4 (the manager image
  tag defaults to .Chart.AppVersion, so this reimages the controller).
- etcd-operator/Makefile, etcd-operator-crds/Makefile: ETCD_OPERATOR_REF
  v0.5.3 -> v0.5.4.
- etcd-operator-crds/templates/etcdmembers.yaml: re-vendored at v0.5.4 via
  `make update`; description-only change to the /scale replicas/selector
  fields tracking the PDB minAvailable fix. etcdclusters/etcdsnapshots
  unchanged.
- templates/rbac.yaml left as-is: manager-role-rules.yaml is byte-identical
  between v0.5.3 and v0.5.4.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions github-actions Bot added size/S This PR changes 10-29 lines, ignoring generated files area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt labels Aug 4, 2026
@dosubot dosubot Bot added the area/database Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse) label Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change updates etcd-operator references and deployment test expectations from v0.5.3 to v0.5.4. It also revises EtcdMember CRD descriptions for /scale and scale-resolving disruption budgets.

Changes

etcd-operator update

Layer / File(s) Summary
Version reference alignment
packages/system/etcd-operator-crds/Makefile, packages/system/etcd-operator/Makefile, packages/system/etcd-operator/Chart.yaml, packages/system/etcd-operator/tests/deployment_test.yaml
The etcd-operator references, chart application version, and deployment image expectations change from v0.5.3 to v0.5.4.
Scale subresource descriptions
packages/system/etcd-operator-crds/templates/etcdmembers.yaml
EtcdMember replica and selector descriptions now document /scale and scale-resolving disruption budgets. spec.replicas remains fixed at 1.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: lexfrei

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the version bump from etcd-operator v0.5.3 to v0.5.4.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/bump-etcd-operator-0.5.4

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/system/etcd-operator/Chart.yaml`:
- Line 6: Update both deployment image assertions in deployment_test.yaml for
the manager image and OPERATOR_IMAGE to expect v0.5.4, matching the Chart.yaml
appVersion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0fc07058-f4f9-4b4e-9c43-28ea1221147e

📥 Commits

Reviewing files that changed from the base of the PR and between 3f967ec and 19f969b.

📒 Files selected for processing (4)
  • packages/system/etcd-operator-crds/Makefile
  • packages/system/etcd-operator-crds/templates/etcdmembers.yaml
  • packages/system/etcd-operator/Chart.yaml
  • packages/system/etcd-operator/Makefile

Comment thread packages/system/etcd-operator/Chart.yaml

@myasnikovdaniil myasnikovdaniil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOT LGTM — one blocker, a two-line fix. Everything else in this bump checks out: I verified the vendoring against upstream rather than taking the description on trust, and it is accurate.

Blocker

B1 — helm unittest fails, so the required Unit & controller tests job will go red. packages/system/etcd-operator/tests/deployment_test.yaml:23 and :28 still assert ghcr.io/cozystack/etcd-operator:v0.5.3. The chart derives the manager image tag from .Chart.AppVersion, so bumping appVersion without those two literals breaks the suite. On this branch:

Tests: 1 failed, 17 passed, 18 total      # as-is
Tests: 18 passed, 18 total                # after s/v0.5.3/v0.5.4/ on those two lines

That suite's own header says it exists to "pin the contracts that are easy to break on an operator bump", so this is the test doing its job. hack/helm-unit-tests.sh picks the package up because its Makefile has a test: target, and make unit-tests gates the PR.

Worth knowing: CI has not surfaced this yet. Run 30893159574 concluded skipped for every job including plan, and the run before it was cancelled by concurrency, so helm-unittest has not executed on this branch at all. The failure is real but currently invisible; it will appear on the next push.

Verified as accurate

  • Upstream v0.5.4 exists (a60dd5667f53) and ghcr.io/cozystack/etcd-operator:v0.5.4 resolves in GHCR.
  • All three vendored CRDs are byte-identical to upstream v0.5.4. I replicated the Makefile's awk helm.sh/resource-policy: keep stamp against upstream charts/etcd-operator/crd-bases/ and diffed each file: etcdclusters, etcdmembers and etcdsnapshots are all clean. The etcdmembers change really is description-only, and templates/ contains exactly the three expected files.
  • charts/etcd-operator/files/manager-role-rules.yaml is byte-identical between v0.5.3 and v0.5.4 (empty diff), so leaving templates/rbac.yaml untouched is correct.
  • The upstream v0.5.3..v0.5.4 delta touches only CODEOWNERS, README, docs, api/v1alpha2 doc comments, controllers and tests plus the regenerated crd-bases. No values.yaml, no chart templates, no new required values, no API shape change — the four cited PRs are exactly the delta.
  • Neither package has a generate: target or a values.schema.json, so "nothing for make generate" holds.

Non-blocking

N1 — the PDB switch is safe on live clusters, and the description should say so. I checked this specifically because setting both minAvailable and maxUnavailable is invalid, so a naive patch would wedge the PDB of every existing cluster on upgrade. Upstream reconcilePDB handles it: it treats a surviving pre-migration maxUnavailable as divergence and explicitly sets MaxUnavailable = nil before writing MinAvailable. This is the one change in the release that rewrites live objects, and it leads the release note, so it is worth a line in the description about the upgrade path.

N2 — three pins still read v0.5.2, and I recommend not bumping them here. packages/core/platform/images/migrations/migrations/50 (ETCD_OPERATOR_IMAGE), packages/core/platform/images/migrations/Dockerfile (ETCD_OPERATOR_VERSION plus both pinned sha256s) and hack/migration-50-etcd-adopt.bats:95 each carry a "keep in sync with packages/system/etcd-operator (Chart appVersion)" comment. They drifted at the v0.5.3 bump (c13a10227), so this PR does not introduce the gap. But v1.6.0 shipped migrations.targetVersion: 54, which makes migration 50 already-run history, and the frozen pin is what keeps that adoption reproducible for a cluster still coming from 1.5 or earlier. The real defect is the comments, which now instruct a sync that would be wrong to perform — worth correcting in a separate PR, because left alone every future bumper stops here and has to work this out again.

N3 — area/uncategorized. scopeToArea in .github/workflows/pr-labeler.yaml maps etcd but not etcd-operator, which is why the scope fell through to the fallback. Adding 'etcd-operator': 'area/database' would settle it for future bumps.

type: application
version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process
appVersion: v0.5.3
appVersion: v0.5.4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocker. This bump needs packages/system/etcd-operator/tests/deployment_test.yaml:23 and :28 updated to v0.5.4 in the same commit. Both still assert ghcr.io/cozystack/etcd-operator:v0.5.3 — one for containers[0].image, one for the OPERATOR_IMAGE env — and the chart derives the tag from .Chart.AppVersion, so helm unittest fails here and takes make unit-tests with it.

Verified on this branch: 1 failed, 17 passed as-is, 18 passed after changing those two literals. Nothing else in the suite is affected.

(Commenting here because that test file is not part of the diff, so GitHub will not accept an inline comment on it.)

# by hand from config/rbac/role.yaml at this ref. CRDs live in the sibling
# etcd-operator-crds package.
ETCD_OPERATOR_REF ?= v0.5.3
ETCD_OPERATOR_REF ?= v0.5.4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking, and foldable into this PR since you are already editing these lines: the comment just above points at config/rbac/role.yaml, but upstream has no config/rbac/ directory at all. The rules actually live in charts/etcd-operator/files/manager-role-rules.yaml — the path the PR description cites correctly. Pre-existing, but it is the instruction the next person follows when re-vendoring the ClusterRole.

The manager image tag derives from .Chart.AppVersion, so bumping appVersion
to v0.5.4 without updating the two image literals in the deployment unittest
broke the suite (helm-unittest gates the PR via `make unit-tests`). Update
both asserts (manager container image and the agent OPERATOR_IMAGE env) to
ghcr.io/cozystack/etcd-operator:v0.5.4. Suite is green again (18/18).

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
@androndo

Copy link
Copy Markdown
Contributor Author

myasnikovdaniil thanks for the thorough pass — especially verifying the vendoring and the PDB migration against upstream rather than on trust.

B1 (blocker) — fixed in 22c1df8. Both image literals in tests/deployment_test.yaml (manager container image at :23 and the agent OPERATOR_IMAGE env at :28) now assert ghcr.io/cozystack/etcd-operator:v0.5.4. helm unittest is green locally again — Tests: 18 passed, 18 total. You were right that CI had not surfaced it (prior run skipped/cancelled on concurrency); it would have gone red on the next push.

N1 — done. Added an "Upgrade path" paragraph to the PR description noting that upstream reconcilePDB clears the surviving maxUnavailable (MaxUnavailable = nil) before writing MinAvailable, so the one live-object rewrite in this release reconciles existing clusters cleanly instead of wedging their PDB.

N2 — agreed, leaving the migration-50 pins alone here. The ETCD_OPERATOR_IMAGE/ETCD_OPERATOR_VERSION pins in packages/core/platform/images/migrations/** and hack/migration-50-etcd-adopt.bats are frozen adoption history — with migrations.targetVersion: 54, migration 50 is already-run and its pin must stay reproducible for clusters coming from 1.5 or earlier. The real defect is the stale "keep in sync with Chart appVersion" comments, which now instruct a sync that would be wrong to perform. I'll open a separate PR to correct those comments so the next bumper doesn't have to re-derive this.

N3 — noted, out of scope for this bump. Adding 'etcd-operator': 'area/database' to scopeToArea in .github/workflows/pr-labeler.yaml is worth doing, but it touches .github/workflows/ and is unrelated to the version bump — I'll fold it into the same follow-up PR as N2 (or a standalone one) rather than widen this one.

@myasnikovdaniil myasnikovdaniil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. B1 is fixed correctly and I re-verified the whole change at 22c1df8b.

22c1df8b touches exactly the two literals and nothing else (1 file, +2/-2), and the suite is green — 18/18 locally, and the Unit & controller tests job passes in CI. No etcd-operator:v0.5.3 or stale ETCD_OPERATOR_REF survives anywhere in the tree, and the full diff is still the four original files plus the test file, so there is no scope creep.

N1 is addressed, and the new "Upgrade path (PDB switch)" paragraph is accurate — it matches what upstream reconcilePDB actually does at v0.5.4. N2 is correctly left alone.

The earlier verification all still holds: the three vendored CRDs are byte-identical to upstream v0.5.4 with the helm.sh/resource-policy: keep stamp applied, manager-role-rules.yaml is unchanged between v0.5.3 and v0.5.4 so templates/rbac.yaml needs no edit, and the upstream delta contains no values, template or API-shape change.

Two things for whoever merges, neither blocking:

The red Require API owner review for sizeable API changes is not a real failure. Two runs exist at this SHA: the one triggered by pull_request_review (my earlier review submission) was cancelled by concurrency, which surfaces as a failing check run, while the pull_request-triggered run passed. Check runs do not dedupe across workflow runs and the rollup is worst-of, so a cancelled duplicate can sit beside its passing twin. Re-running the cancelled run clears it if the merge gate balks.

E2E was still pending when I approved, so this approval covers the change itself and not the E2E result — worth a glance before merging.

Optional nit left over from N3, whenever this Makefile is next touched: the comment on line 9 and the echo on line 15 both point at config/rbac/role.yaml, which does not exist upstream — the rules live in charts/etcd-operator/files/manager-role-rules.yaml, the path the description cites correctly.

@myasnikovdaniil
myasnikovdaniil merged commit a7149d1 into main Aug 4, 2026
27 of 31 checks passed
@myasnikovdaniil
myasnikovdaniil deleted the chore/bump-etcd-operator-0.5.4 branch August 4, 2026 13:44
@myasnikovdaniil myasnikovdaniil added the backport Should change be backported on previous release label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Successfully created backport PR for release-1.6:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/database Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse) area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review backport Should change be backported on previous release kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt size/S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants