Skip to content

Commit 9753dad

Browse files
authored
[Backport stable/2025.2] feat: add per-service RabbitMQ spec overrides (#3525)
Signed-off-by: Mohammed Naser <mnaser@vexxhost.com>
1 parent b8be91a commit 9753dad

5 files changed

Lines changed: 99 additions & 0 deletions

File tree

.github/styles/config/vocabularies/Base/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ VPN
5151
Valkey
5252
[Bb]ackports
5353
[Bb]aremetal
54+
[Nn]amespace
5455
[Pp]ortworx
5556
agent
5657
alert

doc/source/config/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ Configuration Guide
77

88
ingress
99
horizon
10+
rabbitmq

doc/source/config/rabbitmq.rst

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
########
2+
RabbitMQ
3+
########
4+
5+
Atmosphere deploys a dedicated RabbitMQ cluster for each OpenStack service that
6+
requires message queuing. This provides isolation between services and enables
7+
per-service resource tuning.
8+
9+
***********************
10+
Per-service overrides
11+
***********************
12+
13+
To customize the RabbitMQ cluster for a specific service, define a variable
14+
named ``<chart>_rabbitmq_spec`` in your inventory, where ``<chart>`` matches the
15+
chart name under ``charts/`` (for example: ``nova``, ``neutron``, ``glance``,
16+
``keystone``).
17+
18+
Example (increase Nova RabbitMQ resources):
19+
20+
.. code-block:: yaml
21+
22+
nova_rabbitmq_spec:
23+
resources:
24+
requests:
25+
cpu: 500m
26+
memory: 4Gi
27+
limits:
28+
cpu: "1"
29+
memory: 4Gi
30+
31+
*********************
32+
Common tuning options
33+
*********************
34+
35+
Atmosphere merges overrides into the default ``RabbitmqCluster`` spec recursively.
36+
You can set any valid ``RabbitmqCluster.spec`` field. Common options include
37+
resources, replicas, persistence, and additional configuration.
38+
39+
.. code-block:: yaml
40+
41+
nova_rabbitmq_spec:
42+
# Resource requests and limits
43+
resources:
44+
requests:
45+
cpu: 500m
46+
memory: 4Gi
47+
limits:
48+
cpu: "1"
49+
memory: 4Gi
50+
51+
# Number of RabbitMQ replicas (optional)
52+
replicas: 3
53+
54+
# Persistent volume storage size (optional)
55+
persistence:
56+
storage: 20Gi
57+
58+
# Additional RabbitMQ configuration (optional)
59+
rabbitmq:
60+
additionalConfig: |
61+
deprecated_features.permit.management_metrics_collection = true
62+
vm_memory_high_watermark.relative = 0.9
63+
64+
.. note::
65+
66+
Setting ``rabbitmq.additionalConfig`` replaces the default value (it's not
67+
appended). If you override it, include any defaults you still want applied.
68+
69+
*****************************
70+
Skipping spec diff approval
71+
*****************************
72+
73+
By default, Atmosphere will prompt for approval when the RabbitMQ cluster
74+
specification changes. To skip this approval step when using per-service
75+
overrides, set:
76+
77+
.. code-block:: yaml
78+
79+
rabbitmq_skip_spec_diff: true
80+
81+
******************
82+
Verifying changes
83+
******************
84+
85+
Atmosphere deploys RabbitMQ clusters as ``RabbitmqCluster`` resources in the
86+
``openstack`` namespace with names following the pattern ``rabbitmq-<chart>``.
87+
88+
.. code-block:: console
89+
90+
kubectl -n openstack get rabbitmqclusters
91+
kubectl -n openstack get rabbitmqcluster rabbitmq-nova -o yaml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
features:
3+
- |
4+
Per-service RabbitMQ specification overrides are now supported, allowing
5+
operators to customize RabbitMQ resources for individual OpenStack services.

roles/openstack_helm_endpoints/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
name: rabbitmq
3232
vars:
3333
rabbitmq_cluster_name: "{{ openstack_helm_endpoints_chart }}"
34+
rabbitmq_spec: "{{ lookup('vars', openstack_helm_endpoints_chart ~ '_rabbitmq_spec', default={}) }}"
3435

3536
- name: Grab RabbitMQ cluster secret
3637
kubernetes.core.k8s_info:

0 commit comments

Comments
 (0)