Skip to content

docs(rabbitmq): say that deleting the application leaves the TLS Secrets behind - #4143

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
docs/rabbitmq-tls-secrets-outlive-the-application
Sep 8, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
docs/rabbitmq-tls-secrets-outlive-the-application

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

packages/apps/rabbitmq/README.md documented the key material that survives turning TLS off, but not the same outcome on deleting the application. The chart renders Certificate and Issuer objects and never the Secrets, and cert-manager runs with enableCertificateOwnerRef: false, so a Helm uninstall leaves rabbitmq-<name>-ca (the CA private key) and rabbitmq-<name>-tls in the tenant namespace with nothing referencing them. One paragraph names the two Secrets and the cleanup command. Documentation only.

Screenshots

Not a UI change.

Downstream repositories

A README paragraph in one chart; the generated reference page is built from values.yaml and does not move.

Release note

NONE

Summary by CodeRabbit

  • Documentation
    • Added uninstall guidance for TLS-enabled RabbitMQ applications.
    • Clarified that generated certificate Secrets must be manually removed from the tenant namespace after application deletion.

…ets behind

The README covered only the disable path. Deleting the application hits
the same cert-manager behaviour: the chart renders Certificate and Issuer
objects and never the Secrets, and cert-manager does not own what it
issued, so the CA and server private keys stay in the tenant namespace
with nothing referencing them. Name the two Secrets and the cleanup.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 7, 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: Team

Run ID: fa8178d8-4337-48ef-9f57-ee1477082a59

📥 Commits

Reviewing files that changed from the base of the PR and between d3559d4 and e104c39.

📒 Files selected for processing (1)
  • packages/apps/rabbitmq/README.md

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


📝 Walkthrough

Walkthrough

The RabbitMQ README adds instructions to delete cert-manager-generated CA and TLS Secrets after uninstalling a TLS-enabled application.

Changes

RabbitMQ documentation

Layer / File(s) Summary
Document TLS Secret cleanup
packages/apps/rabbitmq/README.md
The README explains that Helm uninstall leaves the generated Secrets and provides a kubectl delete secret command for manual cleanup.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to e104c

The RabbitMQ README now documents manual cleanup of retained TLS Secrets after uninstall. The documented Secret names match the chart’s TLS naming contract, with no remaining merge-readiness risk.

🚥 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 and concisely describes the main documentation change: RabbitMQ application deletion leaves TLS Secrets behind.
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.
✨ 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 docs/rabbitmq-tls-secrets-outlive-the-application

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.

@github-actions github-actions Bot added area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/documentation Categorizes issue or PR as related to documentation size/XS This PR changes 0-9 lines, ignoring generated files labels Sep 7, 2026
@lexfrei
Aleksei Sviridkin (lexfrei) marked this pull request as ready for review September 7, 2026 22:33

@IvanHunters IvanHunters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

LGTM with non-blocking notes

The added claim is accurate and complete; the only issue is where the paragraph is placed.

Findings

  • [MINOR] packages/apps/rabbitmq/README.md:118, Uninstall-time Secret leftovers documented without their own heading

Caveats

  • The two-Secret claim holds. templates/certmanager.yaml renders exactly two Certificate objects ({{ .Release.Name }}-ca, {{ .Release.Name }}-tls), the chart never renders the Secrets itself, and release.prefix: rabbitmq- at packages/system/rabbitmq-rd/cozyrds/rabbitmq.yaml:13 makes the rendered names match the rabbitmq-<name>-ca / -tls the doc quotes.
  • enableCertificateOwnerRef is false at packages/system/cert-manager/charts/cert-manager/values.yaml:268 and no cozystack wrapper or values-isp-*.yaml preset overrides it, so on every shipped variant those Secrets really do carry no owner reference back to their Certificate.
  • I went looking for a third survivor the doc misses. The operator's <name>-default-user and <name>-erlang-cookie Secrets are excluded from tenant visibility in the same cozyrds file, so they were the obvious candidate, but the pinned rabbitmq/[email protected] sets a controller reference on both (internal/resource/default_user_secret.go, internal/resource/erlang_cookie.go), so GC takes them when Helm deletes the CR. "The same two Secrets" is complete, not just correct about the two it names.
  • make generate reproduces the file byte for byte, so the new prose sits in the hand-authored half of the README and needed no regeneration.


Disabling TLS on a release that had it needs one manual step. Helm removes the `TenantProjection` sentinel along with the `Certificate` objects, and Kubernetes garbage-collects `rabbitmq-<name>.tenant-ca` with it, so the trust anchor stops being projected as soon as TLS goes off — no stale anchor is left for an endpoint that has gone back to plaintext. What Helm cannot clean up is the raw CA material: cert-manager does not delete the Secrets it produced (`enableCertificateOwnerRef` is off), so `rabbitmq-<name>-ca` and `rabbitmq-<name>-tls` stick around, unused, holding private keys nobody references any more. Delete them by hand after disabling TLS.

Deleting the application leaves the same two Secrets behind. The chart renders the `Certificate` and `Issuer` objects and never the Secrets, and cert-manager does not own what it issued, so a Helm uninstall removes neither `rabbitmq-<name>-ca`, which holds the CA private key, nor `rabbitmq-<name>-tls`. After removing a RabbitMQ that had TLS on, delete both from the tenant namespace by hand:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MINOR] Uninstall-time Secret leftovers documented without their own heading

This paragraph describes what survives deleting the whole RabbitMQ application, a different lifecycle event from disabling TLS on a running one, but it is appended under "### Turning TLS off again" (line 114) with no heading of its own. An operator scanning headings for uninstall/deletion behaviour has nothing to jump to. Give it its own "### Deleting the application" subheading next to the existing one.

@lexfrei
Aleksei Sviridkin (lexfrei) merged commit 9e577a5 into main Sep 8, 2026
27 of 28 checks passed
@lexfrei
Aleksei Sviridkin (lexfrei) deleted the docs/rabbitmq-tls-secrets-outlive-the-application branch September 8, 2026 15:45
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/documentation Categorizes issue or PR as related to documentation size/XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants