add ACL config

This commit is contained in:
2025-04-25 13:09:06 +02:00
parent 266e2cdeb7
commit cf938362f7
4 changed files with 23 additions and 2 deletions
+1
View File
@@ -15,6 +15,7 @@ data:
password_file /mosquitto/secrets/passwd password_file /mosquitto/secrets/passwd
allow_anonymous false allow_anonymous false
acl_file /mosquitto/config/acl.conf
# MQTT over TLS # MQTT over TLS
listener 8883 listener 8883
+8 -1
View File
@@ -30,6 +30,10 @@ spec:
- mountPath: /mosquitto/certs - mountPath: /mosquitto/certs
name: tls-certs name: tls-certs
readOnly: true readOnly: true
- mountPath: /mosquitto/config/acl.conf
name: acl
subPath: acl
readOnly: true
volumes: volumes:
- name: config - name: config
configMap: configMap:
@@ -42,4 +46,7 @@ spec:
claimName: mosquitto-data claimName: mosquitto-data
- name: tls-certs - name: tls-certs
secret: secret:
secretName: mosquitto-tls secretName: mosquitto-tls
- name: acl
secret:
secretName: mosquitto-acl
+13
View File
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
name: mosquitto-acl
namespace: mosquitto
type: Opaque
stringData:
acl: |
user pubuser
topic readwrite #
user subuser
topic read #
+1 -1
View File
@@ -5,4 +5,4 @@ metadata:
namespace: mosquitto namespace: mosquitto
type: Opaque type: Opaque
data: data:
passwd: bW9zcXVpdHRvOiQ3JDEwMSRUQXFxNU0rZUhpNzNDK3ZrJEV3Yy9hWWs3Z1I2R3lqWDBVL0d1aGxYOEVVVlQvSDBQRjd5STlWbS9VaUZjR2I3THpCcWVMa0dZQUIzcjhNWXR2dEJDL0hMUlBCL1FUZ1JVanhudDN3PT0= passwd: cHVidXNlcjokNyQxMDEkNVpqdWxBaTdRS1dMRk1XRiRhM3VJeExDeVBaaTVJS3J4U2NTWGVSeiswLzVVbzFjSzJzb1E1WEphNFE0allXeTNXUFVlTUdiWjR1ZzBuM1hsTHVaekdncS9YcHBZNHN0OXlNd2Q4Zz09CnN1YnVzZXI6JDckMTAxJDEyc3BWb3JmeEJKdGVHdVQkanh0RlFFWVRaRnEyUjZ2elFuYysreXR1R2FId3IwdzNqTDVGdk1MMlBWVXEvSlQyczRZR2hnWUJ6V2NBVE5oUi9SZFN3bU1jd2l2N3MzUnZpSWdlcnc9PQ==