Skip to content

feat: reconcile bucket versioning and object lock - #257

Closed
GatewayJ wants to merge 1 commit into
rustfs:mainfrom
GatewayJ:codex/issue-255-bucket-configuration
Closed

GatewayJ wants to merge 1 commit into
rustfs:mainfrom
GatewayJ:codex/issue-255-bucket-configuration

Conversation

@GatewayJ

Copy link
Copy Markdown
Member

Type of Change

  • New Feature
  • Bug Fix
  • Documentation
  • Performance Improvement
  • Test/CI
  • Refactor
  • Other:

Related Issues

Closes #255

Summary of Changes

  • Add declarative bucket versioning and objectLockConfiguration fields, including Governance and Compliance retention in days and an ownership-aware Absent state.
  • Add bounded, strict S3 versioning and Object Lock configuration GET/PUT support in rustfs-admin, with type-safe versioning write commands.
  • Reconcile versioning before Object Lock, verify every mutation with a fresh read, and preserve ownership hashes so externally managed retention is not overwritten.
  • Expose the new spec and status fields through the CRD, OpenAPI, Console types, status details, examples, user guides, and changelog.

Checklist

  • I have read and followed the CONTRIBUTING.md guidelines
  • Passed make pre-commit (fmt-check + clippy + test + console-lint + console-fmt-check)
  • Added/updated necessary tests
  • Documentation updated (if needed)
  • CHANGELOG.md updated under [Unreleased] (if user-visible change)
  • CI/CD passed (pending GitHub Actions)

Impact

  • Breaking change (CRD/API compatibility)
  • Requires doc/config/deployment update
  • Other impact: changes S3-visible bucket versioning and Object Lock behavior when the new fields are explicitly configured.

The new CRD fields and status fields are optional, so existing Tenant manifests remain compatible. Installations must apply the updated Tenant CRD before using the new fields.

Verification

cargo test -p rustfs-admin
cargo test -p operator object_lock_
cargo test -p operator versioning_
make pre-commit
git diff --check

Additional Notes

Live-cluster e2e tests were not run. The non-live e2e harness is covered by make pre-commit.

Rollback can remove the new fields to stop active management, but S3 Object Lock itself cannot be disabled after activation. Compliance retention already applied to object versions remains subject to the server's retention rules.

High-risk validation

  • Correctness: verified versioning-before-Object-Lock ordering, exact Governance/Compliance wire values, boundary validation, post-write reads, and refusal to suspend versioning on an Object Lock bucket.
  • Security: bounded configuration responses and strict XML parsing reject unknown, duplicate, ambiguous, malformed, and non-positive retention data without logging credentials or configuration payloads.
  • Compatibility: existing manifests remain valid; omitted fields stay unmanaged; live S3 Years retention is readable; the issue's concise YAML shape is preserved.
  • Concurrency and durability: mutations are idempotent, status ownership hashes guard read-modify-write behavior, post-write reads detect ineffective writes, and matching live state is safely adopted after interrupted reconciliation.
  • Simplicity: S3 wire semantics remain in rustfs-admin, while the operator reconcile layer owns ordering, conflict policy, and status persistence.
  • Test coverage: focused protocol and reconcile tests distinguish both retention modes, ownership drift, explicit removal, write verification, request order, and versioning transitions; the complete repository pre-commit gate passed.

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.

@GatewayJ

Copy link
Copy Markdown
Member Author

@codex

@GatewayJ

Copy link
Copy Markdown
Member Author

Superseded by #260, which uses the repository-compliant feat/issue-255-bucket-configuration branch and includes the Content-MD5 fix.

@GatewayJ GatewayJ closed this Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add objectLockConfiguration (mode/days) and versioning parameters to Tenant bucket spec

1 participant