Skip to content

Commit 0d49412

Browse files
authored
Merge pull request #1015 from rackerlabs/PUC-939-20250613
fix(rabbitmq): set TTL to prevent notifications queues from growing indefinitely
2 parents 06cebc2 + 36887cd commit 0d49412

File tree

5 files changed

+85
-0
lines changed

5 files changed

+85
-0
lines changed

components/glance/glance-rabbitmq-queue.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,20 @@ spec:
5757
rabbitmqClusterReference:
5858
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource
5959
namespace: openstack
60+
---
61+
apiVersion: rabbitmq.com/v1beta1
62+
kind: Policy
63+
metadata:
64+
name: glance-notifications-ttl
65+
namespace: openstack
66+
spec:
67+
name: glance-notifications-ttl # name of the policy
68+
vhost: "glance" # default to '/' if not provided
69+
pattern: "^notifications.*" # regex used to match queues and exchanges
70+
applyTo: "queues" # set to 'queues', 'exchanges', or 'all'
71+
priority: 1 # defaults to 0
72+
definition: # policy definition
73+
message-ttl: 86400000
74+
rabbitmqClusterReference:
75+
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource
76+
namespace: openstack

components/ironic/ironic-rabbitmq-queue.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,20 @@ spec:
5757
rabbitmqClusterReference:
5858
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource
5959
namespace: openstack
60+
---
61+
apiVersion: rabbitmq.com/v1beta1
62+
kind: Policy
63+
metadata:
64+
name: ironic-notifications-ttl
65+
namespace: openstack
66+
spec:
67+
name: ironic-notifications-ttl # name of the policy
68+
vhost: "ironic" # default to '/' if not provided
69+
pattern: "^notifications.*" # regex used to match queues and exchanges
70+
applyTo: "queues" # set to 'queues', 'exchanges', or 'all'
71+
priority: 1 # defaults to 0
72+
definition: # policy definition
73+
message-ttl: 86400000
74+
rabbitmqClusterReference:
75+
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource
76+
namespace: openstack

components/keystone/keystone-rabbitmq-queue.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,20 @@ spec:
5757
rabbitmqClusterReference:
5858
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource
5959
namespace: openstack
60+
---
61+
apiVersion: rabbitmq.com/v1beta1
62+
kind: Policy
63+
metadata:
64+
name: keystone-notifications-ttl
65+
namespace: openstack
66+
spec:
67+
name: keystone-notifications-ttl # name of the policy
68+
vhost: "keystone" # default to '/' if not provided
69+
pattern: "^notifications.*" # regex used to match queues and exchanges
70+
applyTo: "queues" # set to 'queues', 'exchanges', or 'all'
71+
priority: 1 # defaults to 0
72+
definition: # policy definition
73+
message-ttl: 86400000
74+
rabbitmqClusterReference:
75+
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource
76+
namespace: openstack

components/neutron/neutron-rabbitmq-queue.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,20 @@ spec:
5757
rabbitmqClusterReference:
5858
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource
5959
namespace: openstack
60+
---
61+
apiVersion: rabbitmq.com/v1beta1
62+
kind: Policy
63+
metadata:
64+
name: neutron-notifications-ttl
65+
namespace: openstack
66+
spec:
67+
name: neutron-notifications-ttl # name of the policy
68+
vhost: "neutron" # default to '/' if not provided
69+
pattern: "^notifications.*" # regex used to match queues and exchanges
70+
applyTo: "queues" # set to 'queues', 'exchanges', or 'all'
71+
priority: 1 # defaults to 0
72+
definition: # policy definition
73+
message-ttl: 86400000
74+
rabbitmqClusterReference:
75+
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource
76+
namespace: openstack

components/nova/nova-rabbitmq-queue.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,20 @@ spec:
5757
rabbitmqClusterReference:
5858
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource
5959
namespace: openstack
60+
---
61+
apiVersion: rabbitmq.com/v1beta1
62+
kind: Policy
63+
metadata:
64+
name: nova-notifications-ttl
65+
namespace: openstack
66+
spec:
67+
name: nova-notifications-ttl # name of the policy
68+
vhost: "nova" # default to '/' if not provided
69+
pattern: "^notifications.*" # regex used to match queues and exchanges
70+
applyTo: "queues" # set to 'queues', 'exchanges', or 'all'
71+
priority: 1 # defaults to 0
72+
definition: # policy definition
73+
message-ttl: 86400000
74+
rabbitmqClusterReference:
75+
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource
76+
namespace: openstack

0 commit comments

Comments
 (0)