-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcluster.yml
104 lines (101 loc) · 3.54 KB
/
cluster.yml
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
96
97
98
99
100
101
102
103
#@ load("@ytt:data", "data")
#@ additional_config = "schema_definition_sync.operating_mode = upstream\nstandby.replication.operating_mode = upstream\nstandby.replication.retention.size_limit.messages = 5000000000\ncluster_partition_handling = pause_minority\nvm_memory_high_watermark_paging_ratio={}\ndisk_free_limit.relative={}\ncollect_statistics_interval={}\ndefault_user=admin\ndefault_pass={}".format(data.values.rabbitmq.vm_memory_high_watermark_paging_ratio, data.values.rabbitmq.disk_free_limit.relative, data.values.rabbitmq.collect_statistics_interval, data.values.rabbitmq.default_pass)
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
name: #@ data.values.rabbitmq.cluster_name
spec:
service:
type: #@ data.values.servicetype
rabbitmq:
additionalPlugins:
#@ if data.values.rabbitmq.enable_amqp_1_0 == 1:
- rabbitmq_amqp1_0
#@ end
#@ if data.values.rabbitmq.enable_top == 1:
- rabbitmq_top
#@ end
#@ if data.values.rabbitmq.enable_ldap == 1:
- rabbitmq_auth_backend_ldap
#@ end
#@ if data.values.rabbitmq.enable_oauth2 == 1:
- rabbitmq_auth_backend_oauth2
#@ end
#@ if data.values.rabbitmq.enable_consistent_hash_exchange == 1:
- rabbitmq_consistent_hash_exchange
#@ end
#@ if data.values.rabbitmq.enable_federation == 1:
- rabbitmq_federation
- rabbitmq_federation_management
#@ end
#@ if data.values.rabbitmq.enable_shovel == 1:
- rabbitmq_shovel
- rabbitmq_shovel_management
#@ end
#@ if data.values.rabbitmq.enable_stream == 1:
- rabbitmq_stream
- rabbitmq_stream_management
#@ end
#@ if data.values.rabbitmq.enable_mqtt == 1:
- rabbitmq_mqtt
- rabbitmq_web_mqtt
#@ end
#@ if data.values.rabbitmq.enable_stomp == 1:
- rabbitmq_stomp
- rabbitmq_web_stomp
#@ end
#@ if data.values.rabbitmq.enable_warm_standby_replication_plugin == 1:
- rabbitmq_schema_definition_sync
- rabbitmq_schema_definition_sync_prometheus
- rabbitmq_standby_replication
#@ end
additionalConfig: #@ additional_config
#@ if data.values.rabbitmq.persistent == 1:
persistence:
storageClassName: #@ data.values.rabbitmq.storageclassname
storage: #@ data.values.rabbitmq.storage
#@ end
replicas: #@ data.values.rabbitmq.replicas
#@ if data.values.tls_secret != "":
tls:
secretName: #@ data.values.tls_secret
#@ end
resources:
requests:
cpu: #@ data.values.rabbitmq.cpu
memory: #@ data.values.rabbitmq.memory
limits:
cpu: #@ data.values.rabbitmq.cpu
memory: #@ data.values.rabbitmq.memory
imagePullSecrets:
- name: tanzu-rabbitmq-registry-creds
#@ if data.values.rabbitmq.antiaffinity == 1:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- tanzu-rabbitmq
topologyKey: kubernetes.io/hostname
#@ end
override:
statefulSet:
spec:
template:
spec:
containers: []
#@ if data.values.openshift == 1:
securityContext: {}
#@ end
#@ if data.values.rabbitmq.maxskew > 0:
topologySpreadConstraints:
- maxSkew: #@ data.values.rabbitmq.maxskew
topologyKey: "topology.kubernetes.io/zone"
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: tanzu-rabbitmq
#@ end