-
Notifications
You must be signed in to change notification settings - Fork 1
/
mosquitto.yaml
108 lines (103 loc) · 2.16 KB
/
mosquitto.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
---
apiVersion: v1
kind: ConfigMap
metadata:
name: mosquitto-config
data:
mosquitto.conf: |
# Config file for mosquitto
user mosquitto
retry_interval 20
sys_interval 10
max_inflight_messages 40
max_queued_messages 200
queue_qos0_messages false
message_size_limit 0
allow_zero_length_clientid true
allow_anonymous true
persistent_client_expiration 3m
allow_duplicate_messages false
autosave_interval 60
autosave_on_changes false
# Persistence configuration
persistence true
persistence_location /tmp/
# Logging
connection_messages true
log_dest stderr
log_dest stdout
log_dest file /mqtt/log/mosquitto.log
log_type error
log_type warning
log_type notice
log_type information
log_type all
log_type debug
log_timestamp true
# Listeners
listener 1883
#listener 8883
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: mosquitto
openshift.io/deployment-config.name: mosquitto
name: mosquitto
namespace: myproject
spec:
selector:
matchLabels:
app: mosquitto
replicas: 1
template:
metadata:
name: mosquitto
labels:
app: mosquitto
spec:
containers:
- name: mostquitto
image: toke/mosquitto
imagePullPolicy: Always
ports:
- containerPort: 1883
protocol: TCP
resources:
requests:
memory: 512Mi
cpu: 0.5
volumeMounts:
- mountPath: /mqtt/config
name: mosquitto-volume-1
- mountPath: /mqtt/data
name: mosquitto-volume-2
- mountPath: /mqtt/log
name: mosquitto-volume-3
volumes:
- name: mosquitto-volume-1
configMap:
name: mosquitto-config
items:
- key: mosquitto.conf
path: mosquitto.conf
- emptyDir: {}
name: mosquitto-volume-2
- emptyDir: {}
name: mosquitto-volume-3
---
apiVersion: v1
kind: Service
metadata:
labels:
app: mosquitto
name: mosquitto
spec:
ports:
- name: mqtt
port: 1883
loadBalancerIP:
selector:
name: mosquitto
type: LoadBalancer