Repository navigation
docs(etcd): note that affinity is not applied to existing members - #3964
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe Etcd affinity descriptions now state that the operator applies affinity when it creates or replaces member Pods. Running members are not rescheduled, so existing members adopt the rule only when replaced. ChangesEtcd affinity documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This documentation-only change clarifies when etcd affinity settings take effect without changing runtime behavior, so no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation 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. (4 skipped: 4 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
IvanHunters
left a comment
There was a problem hiding this comment.
LGTM
Docs-only change: it appends one clarifying sentence to the affinity parameter description, warning that a newly-set affinity rule is not applied retroactively to already-running etcd members and only takes effect as each member is replaced.
Two things I checked before signing off:
- Sync across the generated artifacts. The same sentence lands identically in the source
@param(packages/extra/etcd/values.yaml:26), the renderedREADME.md:46,values.schema.json:70, and the cozyrdopenAPISchema(packages/system/etcd-rd/cozyrds/etcd.yaml). That is exactly whatmake generateemits from the source comment, so there is no doc drift. - Factual accuracy of the note. It holds by Kubernetes semantics on its own: the chart's affinity terms are all
...IgnoredDuringExecution(packages/extra/etcd/templates/etcd-cluster.yaml), so the scheduler never re-evaluates them for a running pod. Together with a quorum-aware operator that will not evict a healthy member just to satisfy affinity, the "takes effect only as each member is replaced, not retroactively" wording is correct and appropriately conservative.
No functional change and no test impact. Accurate, useful operational note.
The operator applies spec.affinity only when it creates or replaces a member Pod; it does not reschedule running members. Document that on the `affinity` value so operators do not expect the default (or a newly set rule) to redistribute already co-located members until each is replaced. Addresses the non-blocking review notes on #3962. Signed-off-by: Alexey Artamonov <[email protected]>
52466f4 to
6fdb5e0
Compare
) ## What this PR does Documentation follow-up to #3962. Both reviewers (CodeRabbit and @androndo/@IvanHunters) noted that the new `affinity` value is not applied retroactively: the etcd-operator sets `spec.affinity` only when it creates or replaces a member Pod and never reschedules running members. On a cluster that already has co-located members (the exact failure #3962 targets) the default soft rule — or a newly set hard rule — takes effect only as each member is replaced. This adds that caveat to the `affinity` parameter documentation in `values.yaml` and regenerates `values.schema.json`, `README.md`, and the embedded `openAPISchema` in `etcd-rd`. No template or behaviour change; `make test` passes (20/20). The other inline note (the soft podAntiAffinity default overlaps the soft `topologySpreadConstraints`) was explicitly flagged as "fine to keep as-is", so no code change is made for it. > Note: this PR is stacked on `fix/etcd-soft-antiaffinity` (#3962) and will retarget to `main` once that merges. ### Screenshots n/a — no UI changes. ### Downstream repositories Doc-only change to an app chart (regenerated artifacts). No package added/renamed/removed, `kind`/`plural` unchanged, no installer values/assets/variants touched. No downstream follow-up required. - [x] No downstream repository is affected by this change ### Release note ```release-note NONE ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified that etcd affinity rules apply when member Pods are created or replaced. * Noted that running members are not rescheduled retroactively; the rule takes effect as each member is replaced. * Updated the guidance consistently across configuration documentation and schema descriptions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
What this PR does
Documentation follow-up to #3962. Both reviewers (CodeRabbit and @androndo/IvanHunters) noted that the new
affinityvalue is not applied retroactively: the etcd-operator setsspec.affinityonly when it creates or replaces a member Pod and never reschedules running members. On a cluster that already has co-located members (the exact failure #3962 targets) the default soft rule — or a newly set hard rule — takes effect only as each member is replaced.This adds that caveat to the
affinityparameter documentation invalues.yamland regeneratesvalues.schema.json,README.md, and the embeddedopenAPISchemainetcd-rd. No template or behaviour change;make testpasses (20/20).The other inline note (the soft podAntiAffinity default overlaps the soft
topologySpreadConstraints) was explicitly flagged as "fine to keep as-is", so no code change is made for it.Screenshots
n/a — no UI changes.
Downstream repositories
Doc-only change to an app chart (regenerated artifacts). No package added/renamed/removed,
kind/pluralunchanged, no installer values/assets/variants touched. No downstream follow-up required.Release note
Summary by CodeRabbit