forked from pablokbs/peladonerd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
05-rabbitmq.yaml
111 lines (108 loc) · 2.39 KB
/
05-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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
apiVersion: v1
kind: ReplicationController
metadata:
labels:
component: rabbitmq
name: rabbitmq-controller
spec:
replicas: 1
template:
metadata:
labels:
app: taskQueue
component: rabbitmq
spec:
containers:
- image: rabbitmq:3-alpine
name: rabbitmq
ports:
- containerPort: 5672
name: amqp
protocol: TCP
- containerPort: 15672
name: management
protocol: TCP
- containerPort: 15692
name: prometheus
protocol: TCP
volumeMounts:
- mountPath: /etc/rabbitmq
name: rabbitmq-config-rw
- mountPath: /var/lib/rabbitmq/mnesia
name: rabbitmq-data
initContainers:
- command:
- sh
- -c
- cp /tmp/rabbitmq/rabbitmq.conf /etc/rabbitmq/rabbitmq.conf && echo '' >>
/etc/rabbitmq/rabbitmq.conf; cp /tmp/rabbitmq/enabled_plugins /etc/rabbitmq/enabled_plugins
image: busybox:1.32.0
imagePullPolicy: IfNotPresent
name: rabbitmq-config
volumeMounts:
- mountPath: /tmp/rabbitmq
name: rabbitmq-config
- mountPath: /etc/rabbitmq
name: rabbitmq-config-rw
volumes:
- configMap:
defaultMode: 420
items:
- key: rabbitmq.conf
path: rabbitmq.conf
- key: enabled_plugins
path: enabled_plugins
name: rabbitmq-config
name: rabbitmq-config
- emptyDir: {}
name: rabbitmq-config-rw
- emptyDir: {}
name: rabbitmq-data
---
apiVersion: v1
kind: Service
metadata:
labels:
component: rabbitmq
name: rabbitmq-service
spec:
ports:
- name: http
port: 15672
protocol: TCP
targetPort: 15672
- name: web
port: 15692
protocol: TCP
targetPort: 15692
- name: amqp
port: 5672
protocol: TCP
targetPort: 5672
selector:
app: taskQueue
component: rabbitmq
---
apiVersion: v1
kind: ConfigMap
metadata:
name: rabbitmq-config
data:
enabled_plugins: |
[rabbitmq_management,rabbitmq_peer_discovery_k8s,rabbitmq_prometheus].
rabbitmq.conf: |
loopback_users.guest = false
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
component: rabbitmq
name: rabbitmq
spec:
endpoints:
- interval: 10s
port: web
selector:
matchLabels:
component: rabbitmq