feat: add cert-manager TLS support#125
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 608ad7b796
ℹ️ 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 let Some(tls_status) = tls_plan.status { | ||
| builder.set_tls_status(tls_status); | ||
| } |
There was a problem hiding this comment.
Clear TLS status when TLS is no longer enabled
When TLS is disabled (spec.tls removed or mode=Disabled), reconcile_tls returns a disabled plan with status=None, and this block only updates status when tls_plan.status is present. That leaves the previous status.certificates.tls payload (certificate refs/hash/errors) in place after a successful reconcile, so the API/console can continue to report stale TLS state even though TLS is off. Please explicitly clear TLS certificate status (and corresponding condition state) on the disabled path.
Useful? React with 👍 / 👎.
| if let Some(labels) = labels | ||
| && let Some(tenant_ref) = tenant_ref_from_labels(namespace, labels) | ||
| { | ||
| push_unique_tenant_ref(&mut refs, tenant_ref); |
There was a problem hiding this comment.
Trigger reconcile for external TLS Secret rotations
Secret events are mapped to Tenants only via owner references or the rustfs.tenant label. In the manageCertificate=false external-secret flow, user-provided TLS Secrets commonly have neither metadata link, so rotating the referenced Secret does not enqueue a reconcile. Because rollouts are hash-driven during reconcile and steady-state uses Action::await_change(), pods can keep serving old cert/key material indefinitely after external Secret updates. The watch mapping should include Tenant spec secret references (or enforce/validate the required label) so external rotations always trigger reconciliation.
Useful? React with 👍 / 👎.
Type of Change
Related Issues
N/A
Summary of Changes
spec.tlsAPI for cert-manager-backed RustFS TLS, including managed Certificate creation, external TLS Secret support, CA trust configuration, rollout hashing, status reasons, and Console API exposure.Checklist
make pre-commit(fmt-check + clippy + test + console-lint + console-fmt-check)[Unreleased](if user-visible change) - N/A: this repository does not currently contain a CHANGELOG.mdImpact
Verification
Local verification completed:
make pre-commit: passede2e-live-runended withconfigured live e2e suites passed.Additional Notes
The branch is based on current
origin/mainto avoid carrying the already-merged image pull secret update commit.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.