feat: add pool decommission lifecycle#130
Conversation
4a1c55c to
bcfd087
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bcfd087a45
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if info.complete.unwrap_or(false) | ||
| || info.canceled.unwrap_or(false) | ||
| || info.failed.unwrap_or(false) | ||
| { | ||
| Some(now_rfc3339()) | ||
| } else { |
There was a problem hiding this comment.
Keep completedAt stable after terminal decommission
completed_at() returns now_rfc3339() every time a pool is polled in a terminal phase (Complete/Canceled/Failed), so the generated status is always different even when nothing changed. Because the controller watches Tenant updates, this can cause a self-triggering reconcile loop (status patch → watch event → reconcile → new timestamp → patch) for canceled/failed requests that do not set a requeue. Persist the first completion time (or reuse the existing status value) instead of regenerating it on every pass.
Useful? React with 👍 / 👎.
Type of Change
Related Issues
N/A
Summary of Changes
spec.poolsallows the operator to remove the matching StatefulSet and emitPoolRemoved.Checklist
make pre-commit(fmt-check + clippy + test + console-lint + console-fmt-check)[Unreleased](N/A: repository does not currently containCHANGELOG.md)Impact
Verification
Additional Notes
The cleanup flow intentionally mirrors MinIO Operator's documented flow: run decommission, wait until complete, then remove the decommissioned pool from the Tenant spec so the operator can delete the stale StatefulSet while retaining PVCs.
Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md) and sign the CLA if this is your first contribution.