apiVersion: apps/v1
kind: Deployment
metadata:
  name: mosquitto
  labels:
    app: mosquitto
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mosquitto
  template:
    metadata:
      labels:
        app: mosquitto
    spec:
      containers:
      - name: mosquitto
        image: avesit/mosk8tto:1.5.1
        ports:
        - containerPort: 1883
          name: mqtt
        - containerPort: 9001
          name: ws
        - containerPort: 9002
          name: wss
        resources:
          requests:
            cpu: "100m"
            memory: "64Mi"
          limits:
            cpu: "500m"
            memory: "500Mi"
        volumeMounts:
        - mountPath: /mosquitto/config
          name: mosquitto-config
          readOnly: true
      volumes:
      - configMap:
          name: mosquitto-config
        name: mosquitto-config
