Skip to content

feat(etcd-operator): bump to v0.5.5 and vendor EtcdDefragPolicy CRDs - #3968

Merged
Andrey Kolkov (androndo) merged 3 commits into
mainfrom
bump/etcd-operator-0.5.5
Sep 4, 2026
Merged

Andrey Kolkov (androndo) merged 3 commits into
mainfrom
bump/etcd-operator-0.5.5

Conversation

@androndo

@androndo Andrey Kolkov (androndo) commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

Bumps the vendored etcd-operator from v0.5.4 to v0.5.5 and adopts the new defrag API.

v0.5.5 ships the EtcdDefrag and EtcdDefragPolicy types — a controller that runs a one-shot defrag against a target etcd cluster, plus a cron-style policy that stamps scheduled EtcdDefrag runs (schedule/suspend/concurrencyPolicy/historyLimit).

  • etcd-operator-crds: vendor the two new CRDs (etcddefragpolicies, etcddefrags) alongside the existing three; bump ETCD_OPERATOR_REF. Re-vendoring also refreshed etcdmembers.yaml (a doc-string change from the version-matched-etcdutl restore work in v0.5.5). All five carry helm.sh/resource-policy: keep; the existing resource-policy suite covers the new CRDs via its wildcard template scope.
  • etcd-operator: bump appVersion/image tag to v0.5.5 and re-vendor the manager ClusterRole from the operator's charts/etcd-operator/files/manager-role-rules.yaml. New grants match what the defrag controllers need: full CRUD on etcddefrags, read/patch/watch on etcddefragpolicies, the two new /status subresources, and cluster-scoped events create/patch. Fixed the stale config/rbac/role.yaml path in the Makefile/test comments (upstream moved the role rules).

Screenshots

n/a — no UI changes.

Downstream repositories

Walked the trigger map against the diff. The change is confined to packages/system/etcd-operator{,-crds}: etcd-operator is a system component (not a packages/apps/packages/extra package the website and TF provider track), the new CRDs are in group etcd-operator.cozystack.io (not cozystack.io/backups.cozystack.io, the only CRD groups the TF provider types), and nothing under hack/, the installer values, or the platform values changed.

  • No downstream repository is affected by this change

Release note

feat(etcd-operator): bump to v0.5.5, adding the EtcdDefrag and EtcdDefragPolicy APIs for on-demand and scheduled etcd defragmentation

Summary by CodeRabbit

  • New Features

    • Added APIs for configuring recurring and one-time etcd defragmentation tasks.
    • Added status reporting for defragmentation progress, results, and conditions.
    • Added validation and lifecycle controls for defragmentation policies and runs.
  • Enhancements

    • Updated the etcd operator to version 0.5.5.
    • Expanded permissions to manage defragmentation resources and report events.
    • Improved restore documentation for etcd members.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: dff93136-71df-45c4-b071-238300b1567f

📥 Commits

Reviewing files that changed from the base of the PR and between eef95f4 and 41d3269.

📒 Files selected for processing (9)
  • packages/system/etcd-operator-crds/Makefile
  • packages/system/etcd-operator-crds/templates/etcddefragpolicies.yaml
  • packages/system/etcd-operator-crds/templates/etcddefrags.yaml
  • packages/system/etcd-operator-crds/templates/etcdmembers.yaml
  • packages/system/etcd-operator/Chart.yaml
  • packages/system/etcd-operator/Makefile
  • packages/system/etcd-operator/templates/rbac.yaml
  • packages/system/etcd-operator/tests/deployment_test.yaml
  • packages/system/etcd-operator/tests/rbac_test.yaml

Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The change updates the etcd operator to v0.5.5, adds EtcdDefragPolicy and EtcdDefrag CRDs, expands RBAC permissions, and updates deployment and RBAC tests.

Changes

Etcd defragmentation operator update

Layer / File(s) Summary
Defragmentation CRD contracts
packages/system/etcd-operator-crds/Makefile, packages/system/etcd-operator-crds/templates/etcddefragpolicies.yaml, packages/system/etcd-operator-crds/templates/etcddefrags.yaml, packages/system/etcd-operator-crds/templates/etcdmembers.yaml
The CRD bundle now includes EtcdDefragPolicy and EtcdDefrag resources. Their schemas define validation, lifecycle fields, rules, and status data.
Operator version and RBAC wiring
packages/system/etcd-operator/Makefile, packages/system/etcd-operator/Chart.yaml, packages/system/etcd-operator/templates/rbac.yaml
The operator references v0.5.5 and the updated vendored rules file. RBAC now covers events and defragmentation resources.
Deployment and RBAC test updates
packages/system/etcd-operator/tests/deployment_test.yaml, packages/system/etcd-operator/tests/rbac_test.yaml
Tests now expect the v0.5.5 image and validate the updated RBAC source path and permissions.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 41d32

This localized upgrade adds the new defragmentation APIs and required permissions without any actionable merge-blocking risk remaining beyond normal checks and review.

Suggested reviewers: ivanhunters

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: upgrading etcd-operator to v0.5.5 and vendoring the EtcdDefragPolicy CRD APIs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (9 skipped: 9 unsupported.)

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bump/etcd-operator-0.5.5

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.

@androndo
Andrey Kolkov (androndo) marked this pull request as ready for review August 27, 2026 07:27
@github-actions github-actions Bot added area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/feature Categorizes issue or PR as related to a new feature size/XL This PR changes 500-999 lines, ignoring generated files labels Sep 1, 2026
Andrey Kolkov and others added 3 commits September 3, 2026 15:55
v0.5.5 ships the EtcdDefrag and EtcdDefragPolicy API types (a controller
plus a cron that stamps scheduled defrag runs). Vendor both CRDs into the
etcd-operator-crds package and grant the manager ClusterRole the verbs the
new controllers need: defragpolicies read/patch, defrags full CRUD, the two
new /status subresources, and cluster-scoped event emission.

Signed-off-by: Andrey Kolkov <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… comment

The manager ClusterRole header still pointed at the upstream config/rbac/role.yaml
path, which 404s at v0.5.5; the rules now live in
charts/etcd-operator/files/manager-role-rules.yaml (already corrected in the
Makefile and rbac_test.yaml).

Signed-off-by: Andrey Kolkov <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The prior CI run stalled in the self-hosted runner queue for days and never
scheduled; an empty commit forces a fresh run on the same tree.

Signed-off-by: Andrey Kolkov <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@androndo
Andrey Kolkov (androndo) merged commit 7786f72 into main Sep 4, 2026
18 of 19 checks passed
@androndo
Andrey Kolkov (androndo) deleted the bump/etcd-operator-0.5.5 branch September 4, 2026 07:09
@kvaps Andrei Kvapil (kvaps) added the kind/backport Categorizes issue or PR as requiring a backport to the current release line label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Created backport PR for release-1.6:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-3968-to-release-1.6
git worktree add --checkout .worktree/backport-3968-to-release-1.6 backport-3968-to-release-1.6
cd .worktree/backport-3968-to-release-1.6
git reset --hard HEAD^
git cherry-pick -x 85cbb3d7cbed73d959e011e8448c1ba20dada432 5896484c4a29467594798d128ba42766046a6cef 6afe69b35b2c90f02fd601ccf16d253af85ab5f9
git push --force-with-lease

Andrei Kvapil (kvaps) pushed a commit that referenced this pull request Sep 7, 2026
v0.5.5 ships the EtcdDefrag and EtcdDefragPolicy API types (a controller
plus a cron that stamps scheduled defrag runs). Vendor both CRDs into the
etcd-operator-crds package and grant the manager ClusterRole the verbs the
new controllers need: defragpolicies read/patch, defrags full CRUD, the two
new /status subresources, and cluster-scoped event emission.

Backport of #3968 to release-1.6. The automatic cherry-pick could not merge
the etcd-operator-crds Makefile and left the conflict markers in the file;
resolved by taking the five-CRD list the two new CRDs require. The comment
that came with it on main describes an update target that counts annotations
and swaps templates/ atomically — this branch has neither, so it is left out
rather than carried in as a false description. Everything else applied
unchanged.

Signed-off-by: Andrey Kolkov <[email protected]>
Signed-off-by: Andrei Kvapil <[email protected]>
Andrei Kvapil (kvaps) added a commit that referenced this pull request Sep 7, 2026
… EtcdDefragPolicy CRDs (#4151)

# Description
Backport of #3968 to `release-1.6`.
myasnikovdaniil added a commit that referenced this pull request Sep 25, 2026
A candidate counted as backported as soon as its backport PR had merged,
or as soon as any one of its commits showed up on the branch by subject
or -x reference. That is exactly the shape of the backport bot's
conflict drafts: they stop at the first commit that does not apply and
drop the rest, so merging one reads as a finished backport. A two-commit
PR with only its first commit on the branch and no backport PR linked
reported clean and exited 0.

Judge delivery per commit. Every commit the PR contributed has to be on
the branch -- reachable, named by an -x reference, or present under its
own subject -- skipping merge commits and commits that change nothing,
which the bot drops as well (merge_commits: skip; an empty cherry-pick
applies nothing). Nothing weaker counts: not an -x reference to the
PR's merge commit, which survives a cherry-pick later amended to drop a
commit, and not matching lines, which an unrelated line of the same
text satisfies. Subjects are matched one to one, so two commits both
called "fix tests" need two branch commits of that name, and a branch
commit whose -x reference names another commit is evidence only through
that reference. A wrong "backported" is the one answer a release gate
must not give, while a false alarm costs a look.

Some commits carried is partial, listing the missing ones, whatever the
linked backport PR says. A merged backport PR settles a PR of one commit
alone, as before; for a PR of several with none of them found it proves
only that something merged, and the candidate is unverified. Both fail
the gate.

Backports squashed by hand would then keep a branch red for good, so a
maintainer who has checked one can attest it on the merged backport PR
with a comment that is "backport-audit: complete" and nothing else.
That lifts partial or unverified to confirmed, which passes; the report
names who and links the comment. It counts only as the whole comment,
so it needs no reading of markdown: any other text -- a sentence
mentioning it, a quote, a code block, an explanation -- and it is not an
attestation. It counts only on a PR that merged, only from an author
GitHub associates with the repository as OWNER, MEMBER or COLLABORATOR,
and never from automation, whether its login ends in [bot] or is a
review or dependency bot gh reports without the suffix. A review bot
quoting the marker, a maintainer writing "do not post backport-audit:
complete yet", or a contributor vouching for their own backport
confirms nothing. The audit never infers it.

A git read a verdict depends on that fails, a merge commit missing from
the local repository for instance, now stops the audit with exit 2
instead of being read as a PR with no commits to check.

Unlabelled originals are never checked commit by commit, so their merged
claims read "backport PR merged" rather than "backported here".

On release-1.6 this reports five partials. #3955 and #3968 are real
gaps: a labeler mapping and a comment fix never reached the branch.
#4254 and #4292 were squashed by hand and their remaining changes are on
the branch; #3936's backport cherry-picked the PR's merge commit. Those
three are what an attestation is for, once someone has checked them.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/backport Categorizes issue or PR as requiring a backport to the current release line kind/feature Categorizes issue or PR as related to a new feature size/XL This PR changes 500-999 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants