forked from geragcp/netmaker-k3s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path06-netmaker-mq.yaml
80 lines (77 loc) · 1.72 KB
/
06-netmaker-mq.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
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: netmaker-mq
namespace: netmaker
labels:
app: netmaker-mq
spec:
selector:
matchLabels:
app: netmaker-mq
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
app: netmaker-mq
spec:
containers:
- name: netmaker-mq
image: eclipse-mosquitto:2.0.11-openssl
ports:
- containerPort: 1883
name: mqtt-local
protocol: TCP
- containerPort: 8883
name: mqtt-broker
protocol: TCP
volumeMounts:
- name: netmaker-mq-configmap
mountPath: /mosquitto/config/mosquitto.conf
subPath: mosquitto.conf
readOnly: true
- name: nm-pvc-mq-certs-mq
mountPath: /mosquitto/certs
readOnly: true
- name: nm-pvc-mq-log
mountPath: /mosquitto/log
- name: nm-pvc-mq-data
mountPath: /mosquitto/data
volumes:
- name: netmaker-mq-configmap
configMap:
name: netmaker-mq-configmap
- name: nm-pvc-mq-certs-mq
persistentVolumeClaim:
claimName: nm-pvc-mq-certs-mq
- name: nm-pvc-mq-log
persistentVolumeClaim:
claimName: nm-pvc-mq-log
- name: nm-pvc-mq-data
persistentVolumeClaim:
claimName: nm-pvc-mq-data
---
apiVersion: v1
kind: Service
metadata:
namespace: netmaker
labels:
app: netmaker-mq
name: netmaker-mq
spec:
ports:
- port: 8883
name: mqtt-broker
protocol: TCP
targetPort: 8883
- port: 1883
name: mqtt-local
protocol: TCP
targetPort: 1883
selector:
app: netmaker-mq
sessionAffinity: None
type: ClusterIP