Skip to content

Commit d000d02

Browse files
authored
feat(rabbitmq): add TLS support for AMQPS and management HTTPS (#2683)
## What this PR does Adds TLS for AMQP and the management API, and hands the tenant a key-free trust anchor instead of a private key. - A chart-authored cert-manager chain issues the broker certificate. The chart names its CA Secret in a `TenantProjection` sentinel; the CA-extraction controller reads `ca.crt` from that Secret and writes a key-free projection, stamping `internal.cozystack.io/tenant-ca` on the projection it owns. That label is what the ResourceDefinition selects. Nothing labels the CA Secret itself, which holds the CA private key and is excluded by name. - The leaf `<release>-tls` carries the broker's private key and reaches no tenant. Neither the dashboard Role nor the ResourceDefinition grants it, and the ResourceDefinition excludes it by name as well, so a label mis-stamped onto it later still does not get through. - SAN coverage now lists every resolvable form explicitly, including the bare `*.<release>-nodes` wildcard that the operator uses for `RABBITMQ_NODENAME`. ## TLS is opt-in here, unlike the sibling charts `tls.enabled` defaults to `false` and is not inferred from `external`. That diverges from nats, qdrant and kafka, which infer it, and the divergence is deliberate for a reason specific to this operator. Setting `spec.tls.secretName` makes the cluster operator rewrite the `port` key in the `<release>-default-user` Secret from 5672 to 5671, on the mere fact of TLS and regardless of whether the plaintext listener is still open. That Secret is the Service Binding the chart hands the tenant. A client with a hardcoded `:5672` keeps working. A client that reads the endpoint from the binding, which is the documented way, gets moved to the TLS port and must then speak TLS and be given a CA to verify against, neither of which it was configured for. Inferring TLS from `external` would fire all of that on an ordinary upgrade, with no configuration change, against exactly the clients that followed the documentation. Whether the other engines should follow is an epic-level question rather than this PR's to answer; for nats it is raised in #3348. ## The plaintext ports are still published, and this PR says so There is no operator-supported way to publish the TLS ports alone. `spec.override.service.spec.ports` is a strategic merge keyed on `port` against defaults the operator rebuilds every reconcile, so it adds and mutates entries but never subtracts one, and a TLS-only port list there would read as a guarantee while changing nothing. The chart renders no service override at all and says why at the callsite. `tls.disableNonTLSListeners` is offered as an explicit opt-in, and it refuses to render rather than failing silently in three situations. - Together with `users` or `vhosts`. The flag forces messaging-topology-operator onto TLS regardless of its own configuration, after which it verifies the broker against the system certificate pool, where a per-release CA cannot be. Every topology object bound to the release would stop reconciling, silently: already-created users keep working while password rotation and new users simply never apply. There is no working route left for it, so the chart refuses instead. Managing those objects as hand-written CRs is not a way out, because the operator takes TLS from the `RabbitmqCluster` and not from whoever created the CR, so manual objects break identically and without the render-time refusal. `rabbitmqctl` or a definitions import are. - While topology objects are still live in the namespace. See the next section. - With TLS off, where no listener of either kind would remain. Erlang distribution (25672) and epmd (4369) stay plaintext under every setting; the flag does not touch them, so `disableNonTLSListeners: true` is not "TLS everywhere". A third route, closing AMQP at the broker through `spec.rabbitmq.additionalConfig` while leaving the operator on plaintext management, has been suggested and is plausible, but the operator's sources are not vendored here and it was not verified. It is recorded as an open question rather than promised. ## Closing the listeners takes two upgrades, and the chart enforces it Clearing `users` and `vhosts` and setting `tls.disableNonTLSListeners: true` in one edit is the natural thing to try, and it wedges the objects being removed. The values-level refusal cannot catch it, because by then both maps are empty. Helm applies every object in the target release before pruning the ones the release dropped, so the broker closes plaintext and loses the `rabbitmq.com/operator-connection-uri` annotation while the topology objects still hold `deletion.finalizers.<plural>.rabbitmq.com`. Their operator then has to reach a management API it can only get to over a certificate it verifies against the system trust pool. The delete never completes, and the upgrade reports success over objects left in `Terminating`, with the users still live in the broker and `kubectl delete namespace` on that tenant hanging. The chart now reads the namespace rather than the values. When the flag is being introduced and any topology object is still there, the render refuses and names them, gives the two-upgrade order and the `kubectl get` that confirms nothing bound to this release is left, and says how to unwedge a release that is already stuck. The check keys on the live `RabbitmqCluster` as well, so it applies only to the transition: once the listeners are closed, an object a tenant creates afterwards is theirs to clean up rather than something that stops the release rendering. Eleven unit cases cover the firing and the silent paths. The set is wider than the three kinds this chart creates. All twelve kinds `messaging-topology-operator` drives through its shared `TopologyReconciler` carry that finalizer and share one deletion path, so a `Queue` or a `Shovel` written by hand against the release wedges exactly the same way, and a runbook step that checks only users, vhosts and permissions says the namespace is clear when it is not. The list is derived in one place and read from both the lookup and the `kubectl get` the refusal prints, and a unit test holds it against the operator's own CRDs so a bump cannot introduce a kind the guard has never heard of. `SuperStream` is the one CRD left out: it runs on its own reconciler with no finalizer, and the objects it owns are already on the list. An object that binds through `connectionSecret` instead of naming the cluster stays outside the guard, which the comment says. ## Breaking for metrics scrapers Enabling TLS moves the metrics endpoint from 15692 to 15691. A ServiceMonitor selecting the port by the name `prometheus` silently stops matching and the instance's metrics disappear with no error anywhere. Nothing in this repository scrapes RabbitMQ, so only user-defined monitoring is affected, silently, which is why it is stated here. ## Known limitations 1. Turning TLS back off leaves the raw CA material behind. The anchor itself is collected: the projection carries an owner reference to the `TenantProjection` sentinel, and Helm deletes the sentinel along with the rest of the chain. What survives is `<release>-ca` and `<release>-tls`, because cert-manager runs with `enableCertificateOwnerRef: false` and does not delete the Secrets it issued, so the README says to remove them by hand. #3349 asks the same question of the label-driven leg of the contract, which this chart does not use. 2. No e2e coverage for the TLS path. The one-upgrade wedge above is the case that most deserves it: install with TLS and users, upgrade to no users plus the flag, and assert the `User` is actually gone rather than merely marked for deletion. A template test cannot reach that. On certificate renewal, the leaf carries `duration: 8760h` and `renewBefore: 720h`, so cert-manager rewrites the Secret around day 335. The cluster operator mounts it as a projected volume with no `subPath`, so the kubelet refreshes the files in place, and the operator does not watch a user-supplied TLS Secret, so nothing rolls the pods. The last hop, the broker picking the new file up, rests on Erlang's `ssl_pem_cache` re-reading by mtime and has only been read from sources rather than exercised against a live broker. The merged qdrant chart ships the same duration and `rotationPolicy`, so this is a platform-wide property rather than something this PR introduces. ### Downstream repositories `packages/apps/rabbitmq/values.schema.json` gains the `tls` object, so `cozystack/terraform-provider-cozystack` needs the field modelled for `cozystack_rabbitmq`; tracked in cozystack/terraform-provider-cozystack#42. ### Release note ```release-note feat(rabbitmq): opt-in TLS for AMQP and the management API, with the CA published to tenants as a key-free trust anchor. Enabling TLS moves the metrics port from 15692 to 15691 (ServiceMonitors selecting the port named `prometheus` must be updated) and moves the `port` value in the `<release>-default-user` binding Secret from 5672 to 5671. Plaintext AMQP and management ports remain published; `tls.disableNonTLSListeners` closes them but also drops in-cluster plaintext clients, and must be enabled in a separate upgrade after the topology objects are gone. ```
2 parents d685fb3 + 3c5d9f4 commit d000d02

22 files changed

Lines changed: 2807 additions & 14 deletions

‎api/apps/v1alpha1/rabbitmq/types.go‎

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apps/v1alpha1/rabbitmq/zz_generated.deepcopy.go‎

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
#!/usr/bin/env bats
2+
# Unit test: the rabbitmq trust anchor reaches tenants as a key-free projection,
3+
# and the key-BEARING Secrets around it never do.
4+
#
5+
# The chart issues rabbitmq-<name>-ca (CA certificate AND CA private key) and
6+
# rabbitmq-<name>-tls (server certificate AND server private key); the operator
7+
# issues rabbitmq-<name>-erlang-cookie, the cluster's shared secret. None of the
8+
# three may be handed to a tenant: read access to the CA key would let the holder
9+
# issue certificates for anything rather than merely verify the server.
10+
#
11+
# What a client needs is ca.crt alone. cluster-operator produces no CA object of
12+
# its own (spec.tls.caSecretName is an input it only consumes), so the chart mints
13+
# the CA through cert-manager and names that Secret in a TenantProjection
14+
# sentinel. The label selected on below is stamped by the CA-extraction
15+
# controller on the projection it writes, never on the CA Secret.
16+
#
17+
# These assertions exist because both halves are one edit away from breaking with
18+
# a fully green chart suite. The ResourceDefinition is rendered by the rabbitmq-rd
19+
# chart inlining cozyrds/*, and that chart carries no tests directory; the
20+
# dashboard Role is rendered by a chart that has one, but no suite there asserts
21+
# on the whole Role.
22+
#
23+
# The grants are asserted as WHITELISTS against whole values rather than as a
24+
# blacklist of forbidden names over source text. A blacklist grepping for
25+
# "rabbitmq-{{ .name }}-ca" is defeated by quoting the scalar, by a different
26+
# templating of the name, or by a label selector that happens to match it -- all
27+
# of which grant a private key while the guard stays green.
28+
29+
REPO_ROOT="$(cd "$(dirname "${BATS_TEST_FILENAME:-$0}")/.." && pwd)"
30+
COZYRDS="$REPO_ROOT/packages/system/rabbitmq-rd/cozyrds/rabbitmq.yaml"
31+
CHART="$REPO_ROOT/packages/apps/rabbitmq"
32+
33+
# The complete set of grants the tenant holds, asserted as one value rather than
34+
# per-dimension: a name whitelist alone passes an added label selector, and a
35+
# label whitelist alone passes an added name. Either dimension reaches a
36+
# key-bearing Secret -- controller.cert-manager.io/fao is stamped on both the CA
37+
# and the leaf, so a selector on it is a one-line grant of the CA private key.
38+
EXPECTED_RD_INCLUDE='[{"resourceNames":["rabbitmq-{{ .name }}-default-user"]},{"matchLabels":{"internal.cozystack.io/tenant-ca":"true"}},{"matchLabels":{"apps.cozystack.io/user-secret":"true"}}]'
39+
40+
# exclude is evaluated before include and wins, so it is the structural backstop
41+
# against a mis-stamped label on a key-bearing object. Asserted whole for the same
42+
# reason as the include: dropping one entry is the edit that has to be caught.
43+
EXPECTED_RD_EXCLUDE='[{"resourceNames":["rabbitmq-{{ .name }}-ca","rabbitmq-{{ .name }}-tls","rabbitmq-{{ .name }}-erlang-cookie"]}]'
44+
45+
# The dashboard template's entire RBAC output: every rule of the Role, and the
46+
# kinds it renders. Asserted whole rather than filtered down to the rules that
47+
# mention secrets, because every filter admits the spelling it did not anticipate:
48+
# a rule with no resourceNames names no Secret, a rule with resources ["*"] names
49+
# no resource, and a ClusterRole is not a Role. Each of those reaches both
50+
# key-bearing Secrets, and one comparison against the whole output needs no filter.
51+
EXPECTED_RBAC_KINDS='["Role","RoleBinding"]'
52+
EXPECTED_ROLE_RULES='[{"apiGroups":[""],"resources":["secrets"],"resourceNames":["rabbitmq-test-default-user"],"verbs":["get","list","watch"]},{"apiGroups":[""],"resources":["services"],"resourceNames":["rabbitmq-test"],"verbs":["get","list","watch"]},{"apiGroups":["cozystack.io"],"resources":["workloadmonitors"],"resourceNames":["rabbitmq-test"],"verbs":["get","list","watch"]}]'
53+
54+
# The secrets rule is the one place in this Role that grows from values, so the
55+
# whole-value assertion above only covers it while users is empty. This pins what
56+
# a declared user is allowed to add: its own credentials Secret and nothing else.
57+
EXPECTED_ROLE_RULES_WITH_USER='[{"apiGroups":[""],"resources":["secrets"],"resourceNames":["rabbitmq-test-default-user","rabbitmq-test-alice-credentials"],"verbs":["get","list","watch"]},{"apiGroups":[""],"resources":["services"],"resourceNames":["rabbitmq-test"],"verbs":["get","list","watch"]},{"apiGroups":["cozystack.io"],"resources":["workloadmonitors"],"resourceNames":["rabbitmq-test"],"verbs":["get","list","watch"]}]'
58+
59+
render_rbac() {
60+
# stderr is deliberately not discarded: when the render breaks, helm's own
61+
# message is the only thing that says why, and a CI red showing just
62+
# "helm template failed" sends the reader back here to rerun it by hand.
63+
helm template rabbitmq-test "$CHART" \
64+
--namespace tenant-test \
65+
--set '_cluster.cluster-domain=cozy.local' \
66+
"$@" \
67+
--show-only templates/dashboard-resourcemap.yaml
68+
}
69+
70+
# Subsumed by the whitelist below, which cannot match without this entry. Kept
71+
# because the runner stops at the first failing test, so this one fires first and
72+
# says what the loss costs rather than printing two JSON blobs to diff.
73+
@test "rabbitmq-rd cozyrds selects the key-free tenant-CA projection by label" {
74+
if [ ! -f "$COZYRDS" ]; then
75+
echo "ResourceDefinition not found at $COZYRDS -- did it move?" >&2
76+
exit 1
77+
fi
78+
79+
count=$(yq eval \
80+
'[.spec.secrets.include[] | select(.matchLabels."internal.cozystack.io/tenant-ca" == "true")] | length' \
81+
"$COZYRDS") || exit 1
82+
83+
if [ "$count" -lt 1 ]; then
84+
echo 'rabbitmq-rd does not select internal.cozystack.io/tenant-ca: "true"' >&2
85+
echo "Without it the tenant cannot read ca.crt and TLS verification is impossible." >&2
86+
exit 1
87+
fi
88+
}
89+
90+
@test "rabbitmq-rd cozyrds grants nothing beyond the default user, the trust anchor and user credentials" {
91+
if [ ! -f "$COZYRDS" ]; then
92+
echo "ResourceDefinition not found at $COZYRDS -- did it move?" >&2
93+
exit 1
94+
fi
95+
96+
include=$(yq eval --output-format=json --indent=0 '.spec.secrets.include' "$COZYRDS") || exit 1
97+
98+
if [ "$include" != "$EXPECTED_RD_INCLUDE" ]; then
99+
echo "Unexpected rabbitmq-rd spec.secrets.include: $include" >&2
100+
echo "Expected exactly: $EXPECTED_RD_INCLUDE" >&2
101+
echo "rabbitmq-<name>-ca holds the CA private key and rabbitmq-<name>-tls the" >&2
102+
echo "server key; neither may be granted to a tenant, by name or by label." >&2
103+
exit 1
104+
fi
105+
}
106+
107+
@test "rabbitmq-rd cozyrds keeps the key-bearing Secrets excluded" {
108+
if [ ! -f "$COZYRDS" ]; then
109+
echo "ResourceDefinition not found at $COZYRDS -- did it move?" >&2
110+
exit 1
111+
fi
112+
113+
exclude=$(yq eval --output-format=json --indent=0 '.spec.secrets.exclude' "$COZYRDS") || exit 1
114+
115+
if [ "$exclude" != "$EXPECTED_RD_EXCLUDE" ]; then
116+
echo "Unexpected rabbitmq-rd spec.secrets.exclude: $exclude" >&2
117+
echo "Expected exactly: $EXPECTED_RD_EXCLUDE" >&2
118+
echo "exclude wins over include, so it is what stops a mis-stamped tenant-ca" >&2
119+
echo "label on the CA, the leaf or the erlang cookie from reaching a tenant." >&2
120+
exit 1
121+
fi
122+
}
123+
124+
# Asserted against RENDERED output, so the spelling used in the template --
125+
# quoted, helper-derived, or otherwise -- cannot smuggle a name past the check.
126+
@test "rabbitmq dashboard Role renders exactly the grants it is supposed to" {
127+
if [ ! -d "$CHART" ]; then
128+
echo "Chart not found at $CHART -- did it move?" >&2
129+
exit 1
130+
fi
131+
132+
rendered=$(render_rbac) || {
133+
echo "helm template failed for $CHART" >&2
134+
exit 1
135+
}
136+
137+
# eval-all aggregates the documents into one result, so the Role may sit at any
138+
# position among them.
139+
kinds=$(printf '%s\n' "$rendered" | yq eval-all --output-format=json --indent=0 \
140+
'[.kind]' -)
141+
142+
if [ "$kinds" != "$EXPECTED_RBAC_KINDS" ]; then
143+
echo "Unexpected RBAC kinds rendered by the rabbitmq dashboard template: $kinds" >&2
144+
echo "Expected exactly: $EXPECTED_RBAC_KINDS" >&2
145+
echo "A ClusterRole here would grant across namespaces and is not covered by" >&2
146+
echo "the rule comparison below, which reads the namespaced Role." >&2
147+
exit 1
148+
fi
149+
150+
# Fails closed on an empty list: a Role that stopped granting anything, or a
151+
# render that silently produced nothing, does not match the expected rules.
152+
rules=$(printf '%s\n' "$rendered" | yq eval-all --output-format=json --indent=0 \
153+
'[select(.kind == "Role") | .rules[]]' -)
154+
155+
if [ "$rules" != "$EXPECTED_ROLE_RULES" ]; then
156+
echo "Unexpected rules in the rabbitmq dashboard Role: $rules" >&2
157+
echo "Expected exactly: $EXPECTED_ROLE_RULES" >&2
158+
echo "rabbitmq-<release>-ca holds the CA PRIVATE KEY, rabbitmq-<release>-tls the" >&2
159+
echo "server private key, and rabbitmq-<release>-erlang-cookie the cluster secret." >&2
160+
echo "The trust anchor reaches the tenant as the key-free <release>.tenant-ca" >&2
161+
echo "projection via tenantsecrets, not by a Role grant." >&2
162+
exit 1
163+
fi
164+
}
165+
166+
@test "a declared rabbitmq user adds only its own credentials Secret to the Role" {
167+
if [ ! -d "$CHART" ]; then
168+
echo "Chart not found at $CHART -- did it move?" >&2
169+
exit 1
170+
fi
171+
172+
rendered=$(render_rbac --set 'users.alice.password=placeholder') || {
173+
echo "helm template failed for $CHART" >&2
174+
exit 1
175+
}
176+
177+
rules=$(printf '%s\n' "$rendered" | yq eval-all --output-format=json --indent=0 \
178+
'[select(.kind == "Role") | .rules[]]' -)
179+
180+
if [ "$rules" != "$EXPECTED_ROLE_RULES_WITH_USER" ]; then
181+
echo "Unexpected rules with one declared user: $rules" >&2
182+
echo "Expected exactly: $EXPECTED_ROLE_RULES_WITH_USER" >&2
183+
echo "The secrets rule is the only part of this Role that grows from values," >&2
184+
echo "so a name reaching it from the users loop is granted to the tenant." >&2
185+
exit 1
186+
fi
187+
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
#!/usr/bin/env bats
2+
# Unit test: the kinds the rabbitmq chart refuses to close the plaintext
3+
# listeners over are the kinds that actually wedge when it does.
4+
#
5+
# Setting tls.disableNonTLSListeners forces messaging-topology-operator onto a
6+
# management API whose per-release CA it cannot verify. Every kind that operator
7+
# drives through its shared TopologyReconciler carries a
8+
# deletion.finalizers.<plural>.rabbitmq.com finalizer that comes off only after a
9+
# successful call there, so all of them stop deleting at the same instant and sit
10+
# in Terminating with the upgrade reporting success. The chart guards the
11+
# transition by listing what is still in the namespace, which is only as good as
12+
# the list it iterates.
13+
#
14+
# The list lives in one place, templates/_topology.tpl, and is read from there by
15+
# the guard and by the confirmation command the refusal prints. This file holds
16+
# it against the two things it can drift from: the operator's own CRDs, which a
17+
# `make update` in packages/system/rabbitmq-operator can change under it, and the
18+
# runbook in the chart README, which an operator follows by hand.
19+
#
20+
# SuperStream is the one CRD in that group deliberately left out. It runs on its
21+
# own reconciler, which sets no finalizer at all, and the Queue, Exchange and
22+
# Binding objects it owns are already covered.
23+
24+
REPO_ROOT="$(cd "$(dirname "${BATS_TEST_FILENAME:-$0}")/.." && pwd)"
25+
HELPER="$REPO_ROOT/packages/apps/rabbitmq/templates/_topology.tpl"
26+
README="$REPO_ROOT/packages/apps/rabbitmq/README.md"
27+
OPERATOR_CRDS="$REPO_ROOT/packages/system/rabbitmq-operator/templates/messaging-topology-operator.yml"
28+
29+
# The kinds the guard iterates, read off the single line the helper defines them
30+
# on. Parsed rather than rendered because helm cannot render a bare helper.
31+
helper_kinds() {
32+
sed -n '/define "rabbitmq.topology.kinds"/,/^{{- end -}}$/p' "$HELPER" \
33+
| sed -e '1d' -e '$d' \
34+
| tr ' ' '\n' \
35+
| sed '/^$/d'
36+
}
37+
38+
# Kind and plural as the operator itself declares them, so the pluralisation the
39+
# helper applies is checked against its source rather than against a second copy
40+
# of the same rule.
41+
operator_names() {
42+
yq eval-all \
43+
'[select(.kind == "CustomResourceDefinition" and .spec.group == "rabbitmq.com")
44+
| .spec.names.kind + " " + .spec.names.plural] | .[]' \
45+
"$OPERATOR_CRDS"
46+
}
47+
48+
@test "the guard iterates every topology kind the operator ships except SuperStream" {
49+
if [ ! -f "$HELPER" ] || [ ! -f "$OPERATOR_CRDS" ]; then
50+
echo "Missing $HELPER or $OPERATOR_CRDS -- did either move?" >&2
51+
exit 1
52+
fi
53+
54+
names=$(operator_names)
55+
expected=$(printf '%s\n' "$names" | cut -d' ' -f1 | grep -v '^SuperStream$' | sort)
56+
actual=$(helper_kinds | sort)
57+
58+
# A pipeline reports only its last element, so an unreadable manifest reaches
59+
# here as an empty string rather than as a non-zero status.
60+
if [ -z "$expected" ] || [ -z "$actual" ]; then
61+
echo "Read no kinds: '$expected' from the CRDs, '$actual' from the helper." >&2
62+
exit 1
63+
fi
64+
65+
if [ "$expected" != "$actual" ]; then
66+
echo "rabbitmq.topology.kinds does not match the operator's CRDs." >&2
67+
echo "Declared by the operator, minus SuperStream:" >&2
68+
printf '%s\n' "$expected" >&2
69+
echo "Iterated by the guard:" >&2
70+
printf '%s\n' "$actual" >&2
71+
echo "A kind missing here renders cleanly and then wedges in Terminating," >&2
72+
echo "because its finalizer needs the management API the flag just closed." >&2
73+
exit 1
74+
fi
75+
}
76+
77+
# The refusal prints this command and the README repeats it as step 2 of the
78+
# runbook. An operator who runs a short version of it sees an empty namespace
79+
# that is not empty.
80+
@test "the README runbook names the operator plural of every kind the guard iterates" {
81+
if [ ! -f "$README" ]; then
82+
echo "Chart README not found at $README -- did it move?" >&2
83+
exit 1
84+
fi
85+
86+
# Built in the helper's own order, and with the operator's own plurals, so
87+
# this is the exact string the refusal prints rather than a second spelling
88+
# of it that happens to sort the same way.
89+
names=$(operator_names)
90+
expected=""
91+
for kind in $(helper_kinds); do
92+
plural=$(printf '%s\n' "$names" | awk -v k="$kind" '$1 == k { print $2 }')
93+
if [ -z "$plural" ]; then
94+
echo "No CRD in the operator manifest declares kind $kind." >&2
95+
exit 1
96+
fi
97+
expected="${expected:+$expected,}$plural.rabbitmq.com"
98+
done
99+
100+
actual=$(grep -o 'kubectl get [a-z.,]*\.rabbitmq\.com' "$README" | head -1 | sed 's/^kubectl get //')
101+
102+
if [ "$expected" != "$actual" ]; then
103+
echo "The README runbook step does not check every wedging kind." >&2
104+
echo "Expected: kubectl get $expected" >&2
105+
echo "Found: kubectl get $actual" >&2
106+
exit 1
107+
fi
108+
}

‎packages/apps/rabbitmq/Makefile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ generate:
77
update:
88
hack/update-versions.sh
99
make generate
10+
11+
test:
12+
helm unittest .

0 commit comments

Comments
 (0)