forked from ml-lab/DeepVideoAnalytics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrabbitmq.yaml
83 lines (83 loc) · 1.73 KB
/
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
apiVersion: v1
kind: Service
metadata:
name: rabbitmq-master
labels:
app: rabbitmq
tier: backend
role: master
spec:
selector:
app: rabbitmq
tier: backend
role: master
ports:
- port: 5432
targetPort: 5432
clusterIP: None
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: rabbitmqdata-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
storageClassName: standard
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: rabbitmq-master
spec:
replicas: 1
progressDeadlineSeconds: 600
minReadySeconds: 15
revisionHistoryLimit: 5
template:
metadata:
labels:
app: rabbitmq
role: master
tier: backend
spec:
containers:
- image: rabbitmq
imagePullPolicy: "IfNotPresent"
resources:
requests:
memory: "1000Mi"
cpu: "2"
limits:
memory: "4000Mi"
cpu: "4"
name: master
env:
- name: RABBIT_HOST
valueFrom:
secretKeyRef:
name: rabbitmq-secret
key: rabbithost
- name: RABBITMQ_DEFAULT_USER
valueFrom:
secretKeyRef:
name: rabbitmq-secret
key: rabbitusername
- name: RABBITMQ_DEFAULT_PASS
valueFrom:
secretKeyRef:
name: rabbitmq-secret
key: rabbitpassword
ports:
- containerPort: 5672
name: rabbitmq-master
volumeMounts:
- name: rabbitmq-data
mountPath: "/var/lib/rabbitmq"
volumes:
- name: rabbitmq-data
persistentVolumeClaim:
claimName: rabbitmqdata-claim