-
Notifications
You must be signed in to change notification settings - Fork 1
/
upstream-rabbitmq.yaml
95 lines (88 loc) · 2.23 KB
/
upstream-rabbitmq.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
name: upstream
spec:
imagePullSecrets:
- name: tanzu-rabbitmq-registry-creds
replicas: 3
service:
type: LoadBalancer
rabbitmq:
additionalPlugins:
- rabbitmq_stream
- rabbitmq_stream_management
- rabbitmq_schema_definition_sync
- rabbitmq_schema_definition_sync_prometheus # optional
- rabbitmq_standby_replication
additionalConfig: |
schema_definition_sync.operating_mode = upstream
standby.replication.operating_mode = upstream
standby.replication.retention.size_limit.messages = 5000000000
cluster_partition_handling = pause_minority
vm_memory_high_watermark_paging_ratio = 0.99
disk_free_limit.relative = 1.0
collect_statistics_interval = 10000
persistence:
storageClassName: default
storage: "50Gi"
---
apiVersion: v1
kind: Secret
metadata:
name: rabbitmq-replicator
type: Opaque
stringData:
username: rabbitmq-replicator
password: test
---
apiVersion: rabbitmq.com/v1beta1
kind: User
metadata:
name: rabbitmq-replicator
spec:
rabbitmqClusterReference:
name: upstream
importCredentialsSecret:
name: rabbitmq-replicator
---
apiVersion: rabbitmq.com/v1beta1
kind: Permission
metadata:
name: rabbitmq-replicator.rabbitmq-schema-definition-sync.all
spec:
vhost: "rabbitmq_schema_definition_sync"
userReference:
name: "rabbitmq-replicator" # name of a user.rabbitmq.com in the same namespace; must specify either spec.userReference or spec.user
permissions:
write: ".*"
configure: ".*"
read: ".*"
rabbitmqClusterReference:
name: upstream
---
apiVersion: rabbitmq.com/v1beta1
kind: Permission
metadata:
name: rabbitmq-replicator.defaultvhost.all
spec:
vhost: "/" # name of a vhost
userReference:
name: "rabbitmq-replicator" # name of a user.rabbitmq.com in the same namespace; must specify either spec.userReference or spec.user
permissions:
write: ".*"
configure: ".*"
read: ".*"
rabbitmqClusterReference:
name: upstream
---
apiVersion: rabbitmq.com/v1beta1
kind: Vhost
metadata:
name: default
spec:
name: "/" # name of the vhost
tags: ["standby_replication"]
rabbitmqClusterReference:
name: upstream