Files
mosquitto/deploy/app/statefulset.yaml
T

62 lines
1.8 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mosquitto
namespace: mqtt
labels:
app: mosquitto
spec:
replicas: 1
selector:
matchLabels:
app: mosquitto
template:
metadata:
labels:
app: mosquitto
spec:
hostNetwork: true
nodeSelector:
kubernetes.io/hostname: casa-mini-minion-01
tolerations:
- key: "infra.limbosolutions.com/dedicated"
operator: "Equal"
value: "casa-mini-minion-01"
effect: "NoSchedule"
containers:
- name: mosquitto
### Maintained by flux - Image Update Automation
image: eclipse-mosquitto:latest@sha256:6f8d8a947c506f8a2290ec65cd4bd2bc7cb4d43fb5f6271f861cb013e2ef9797 # {"$imagepolicy": "mqtt:eclipse-mosquitto"}
###
imagePullPolicy: IfNotPresent
command: ["/usr/sbin/mosquitto"]
args: ["-c", "/etc/mosquitto/mosquitto.conf"]
ports:
- containerPort: 8883 # Default MQTT port for encrypted communication using TLS/SSL
#hostPort: 8883
protocol: TCP
- containerPort: 1883 # Default MQTT port for unencrypted communication
protocol: TCP
#hostPort: 1883
volumeMounts:
- name: mosquitto-data
mountPath: /mosquitto-data
- mountPath: /etc/mosquitto/mosquitto.conf
name: mosquitto-secret
subPath: config
resources:
requests:
memory: "50Mi"
cpu: "100m"
limits:
memory: "100Mi"
cpu: "200m"
volumes:
- name: mosquitto-data
persistentVolumeClaim:
claimName: mosquitto-data
- name: mosquitto-secret
secret:
secretName: "mosquitto"