-
Notifications
You must be signed in to change notification settings - Fork 50
/
reana-message-broker.yaml
72 lines (72 loc) · 1.98 KB
/
reana-message-broker.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
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "reana.prefix" . }}-message-broker
namespace: {{ .Release.Namespace }}
spec:
type: "NodePort"
ports:
- port: 5672
targetPort: 5672
name: "tcp"
protocol: TCP
{{- if .Values.debug.enabled }}
- port: 31672
targetPort: 15672
nodePort: 31672
name: "management"
protocol: TCP
{{- else }}
- port: 15672
targetPort: 15672
name: "management"
protocol: TCP
{{- end }}
selector:
app: {{ include "reana.prefix" . }}-message-broker
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "reana.prefix" . }}-message-broker
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
serviceName: {{ include "reana.prefix" . }}-message-broker
selector:
matchLabels:
app: {{ include "reana.prefix" . }}-message-broker
template:
metadata:
labels:
app: {{ include "reana.prefix" . }}-message-broker
spec:
containers:
- name: message-broker
image: {{ .Values.components.reana_message_broker.image }}
imagePullPolicy: {{ .Values.components.reana_message_broker.imagePullPolicy }}
ports:
- containerPort: 5672
name: tcp
- containerPort: 15672
name: management
volumeMounts:
- mountPath: /var/lib/rabbitmq/mnesia
subPath: rabbitmq/mnesia
name: reana-shared-volume
{{- if .Values.node_label_infrastructure }}
{{- $full_label := split "=" .Values.node_label_infrastructure }}
nodeSelector:
{{ $full_label._0 }}: {{ $full_label._1 }}
{{- end }}
volumes:
- name: reana-shared-volume
{{- if not (eq .Values.shared_storage.backend "hostpath") }}
persistentVolumeClaim:
claimName: {{ include "reana.prefix" . }}-shared-persistent-volume
readOnly: false
{{- else }}
hostPath:
path: {{ .Values.shared_storage.hostpath.root_path }}
{{- end }}