Skip to content

Commit 3c5d9f4

Browse files
committed
docs(rabbitmq): scope the runbook check and close the narrower-variant question
The confirmation step told the operator to wait for an empty namespace, while the guard it confirms deliberately ignores objects naming another release. A tenant running two brokers in one namespace would wait for something that never happens. Say the check is release-scoped, in the README and in the refusal. Closing AMQP through additionalConfig while keeping the operator on plaintext management was recorded as an open question. It is answerable: cluster-operator pins the readiness probe to the amqp port unless disableNonTLSListeners is set, so that configuration leaves every pod failing readiness. Stated instead of left open. Also repoint one template reference at the heading that exists, and name the runbook test after what it compares. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent dac599b commit 3c5d9f4

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎hack/check-rabbitmq-topology-kinds.bats‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ operator_names() {
7777
# The refusal prints this command and the README repeats it as step 2 of the
7878
# runbook. An operator who runs a short version of it sees an empty namespace
7979
# that is not empty.
80-
@test "the README runbook checks the same resources the guard does" {
80+
@test "the README runbook names the operator plural of every kind the guard iterates" {
8181
if [ ! -f "$README" ]; then
8282
echo "Chart README not found at $README -- did it move?" >&2
8383
exit 1

‎packages/apps/rabbitmq/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This chart can add TLS listeners for AMQP (port 5671) and the management HTTPS i
5353

5454
**Plaintext cannot be closed on the public side alone.** There is no operator-supported way to drop a port from the published Service by itself: `spec.override.service.spec.ports` is applied as a strategic merge patch keyed on `port`, so it can add or mutate entries but never remove them, and the operator regenerates its default port set on every reconcile. The only switch this chart exposes is `tls.disableNonTLSListeners`, described below, and it closes plaintext everywhere at once rather than only on the public side — in-cluster clients included.
5555

56-
A narrower variant — closing AMQP at the broker while leaving the operator's own management path on plaintext, which would keep chart-managed `users` and `vhosts` working — looks reachable through `spec.rabbitmq.additionalConfig`, but this chart does not wire it and it has not been validated here. Treat it as an open question rather than a supported option.
56+
A narrower variant, closing AMQP at the broker while leaving the operator's own management path on plaintext so that chart-managed `users` and `vhosts` keep working, looks reachable through `spec.rabbitmq.additionalConfig`. It is not. The operator pins the readiness probe to the `amqp` port unless `spec.tls.disableNonTLSListeners` is set, so writing `listeners.tcp = none` through `additionalConfig` alone leaves every pod failing readiness for good. The flag is the only supported way to close the plaintext listeners, and it closes all of them at once.
5757

5858
**Setting `tls.enabled: true` on a running instance changes three things.** Plan for them before flipping it.
5959

@@ -83,7 +83,7 @@ Clearing `users` and `vhosts` and setting `tls.disableNonTLSListeners: true` in
8383
Do it as two upgrades instead:
8484

8585
1. Remove `users` and `vhosts` from the values, along with any hand-written topology object in the namespace, and let that upgrade finish.
86-
2. Confirm the namespace is clear: `kubectl get bindings.rabbitmq.com,exchanges.rabbitmq.com,federations.rabbitmq.com,operatorpolicies.rabbitmq.com,permissions.rabbitmq.com,policies.rabbitmq.com,queues.rabbitmq.com,schemareplications.rabbitmq.com,shovels.rabbitmq.com,topicpermissions.rabbitmq.com,users.rabbitmq.com,vhosts.rabbitmq.com --namespace <tenant-namespace>` must return nothing. Those are the twelve kinds `messaging-topology-operator` drives through one reconciler, and every one of them carries the same finalizer, so checking only the three the chart creates leaves the other nine to wedge. Objects in `Terminating` still count — a finalizer that has not come off yet means the operator has not finished with the broker.
86+
2. Confirm the namespace is clear: `kubectl get bindings.rabbitmq.com,exchanges.rabbitmq.com,federations.rabbitmq.com,operatorpolicies.rabbitmq.com,permissions.rabbitmq.com,policies.rabbitmq.com,queues.rabbitmq.com,schemareplications.rabbitmq.com,shovels.rabbitmq.com,topicpermissions.rabbitmq.com,users.rabbitmq.com,vhosts.rabbitmq.com --namespace <tenant-namespace>` must return nothing bound to this release. Those are the twelve kinds `messaging-topology-operator` drives through one reconciler, and every one of them carries the same finalizer, so checking only the three the chart creates leaves the other nine to wedge. A tenant namespace can hold several RabbitMQ applications, so read `spec.rabbitmqClusterReference.name` on whatever comes back: an object naming a sibling release is reached through that broker, whose listeners this flag does not touch, and the chart's own check ignores it too. Objects in `Terminating` still count — a finalizer that has not come off yet means the operator has not finished with the broker.
8787
3. Set `tls.disableNonTLSListeners: true`.
8888

8989
A release already wedged this way recovers without data loss: unset `tls.disableNonTLSListeners`, wait for the finalizers to clear once the operator can reach the broker again, and then start over from step 1.

‎packages/apps/rabbitmq/templates/rabbitmq.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
{{- end }}
5252
{{- end }}
5353
{{- if $pending }}
54-
{{- fail (printf "tls.disableNonTLSListeners cannot be turned on while this release still has topology objects in namespace %s: %s. Remove them in one upgrade, confirm `kubectl get %s --namespace %s` returns nothing, then set the flag in a second upgrade. Setting both at once leaves those objects stuck in Terminating. See README \"Removing the topology objects is its own upgrade\"." $.Release.Namespace (join ", " $pending) (include "rabbitmq.topology.resources" $) $.Release.Namespace) }}
54+
{{- fail (printf "tls.disableNonTLSListeners cannot be turned on while this release still has topology objects in namespace %s: %s. Remove them in one upgrade, confirm `kubectl get %s --namespace %s` returns nothing bound to this release, then set the flag in a second upgrade. Setting both at once leaves those objects stuck in Terminating. See README \"Removing the topology objects is its own upgrade\"." $.Release.Namespace (join ", " $pending) (include "rabbitmq.topology.resources" $) $.Release.Namespace) }}
5555
{{- end }}
5656
{{- end }}
5757
{{- end }}
@@ -74,7 +74,7 @@ metadata:
7474

7575
Expect this key on tenant-visible objects: ReconcileAndFilterAnnotations
7676
strips only kubernetes.io / k8s.io keys, so the operator copies it onto every
77-
child it builds. See README "The plaintext management listener". */}}
77+
child it builds. See README "TLS scope". */}}
7878
annotations:
7979
rabbitmq.com/operator-connection-uri: "http://{{ .Release.Name }}.{{ .Release.Namespace }}.svc.{{ include "rabbitmq.clusterDomain" . }}:15672"
8080
{{- end }}

0 commit comments

Comments
 (0)