Files
mosquitto/deploy/app/statefulset.yaml
T
2026-06-07 20:34:08 +00:00

60 lines
1.7 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:
nodeSelector:
kubernetes.io/hostname: casa
tolerations:
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
containers:
- name: mosquitto
### Maintained by flux - Image Update Automation
image: eclipse-mosquitto:latest@sha256:a908c65cc8e67ec9d292ef27c2c0360dbaaee7eb1b935cdd194e67697f15dea1 # {"$imagepolicy": "mqtt:eclipse-mosquitto"}
###
imagePullPolicy: Always
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"