From ab6cbbb1b032d2b5891dcf72f3a1a7b8f39ef8c5 Mon Sep 17 00:00:00 2001 From: Fabian Zimmermann Date: Sun, 14 Mar 2021 22:41:35 +0100 Subject: [PATCH] added auth and config_dir (#667) --- charts/mosquitto/Chart.yaml | 2 +- charts/mosquitto/README.md | 8 +++++++- charts/mosquitto/templates/configmap.yaml | 7 +++++++ charts/mosquitto/values.yaml | 20 ++++++++++++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/charts/mosquitto/Chart.yaml b/charts/mosquitto/Chart.yaml index e3f4141b..b55bc08b 100644 --- a/charts/mosquitto/Chart.yaml +++ b/charts/mosquitto/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 2.0.7 description: Eclipse Mosquitto - An open source MQTT broker name: mosquitto -version: 1.2.0 +version: 1.3.0 kubeVersion: ">=1.16.0-0" keywords: - mosquitto diff --git a/charts/mosquitto/README.md b/charts/mosquitto/README.md index 14241f7a..18f9d62c 100644 --- a/charts/mosquitto/README.md +++ b/charts/mosquitto/README.md @@ -83,11 +83,17 @@ N/A | persistence.data.enabled | bool | `false` | | | persistence.data.mountPath | string | `"/mosquitto/data"` | | | persistence.data.size | string | `"100Mi"` | | +| persistence.configinc.accessMode | string | `"ReadWriteOnce"` | | +| persistence.configinc.emptyDir | bool | `false` | | +| persistence.configinc.enabled | bool | `false` | | +| persistence.configinc.mountPath | string | `"/mosquitto/configinc"` | | +| persistence.configinc.size | string | `"100Mi"` | | | service.annotations | object | `{}` | | | service.port.name | string | `"mqtt"` | | | service.port.port | int | `1883` | | | service.type | string | `"ClusterIP"` | | | strategy.type | string | `"Recreate"` | | +| auth.enabled | bool | `false` | | ## Changelog @@ -119,4 +125,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Join our [Discord](https://discord.gg/sTMX7Vh) community ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0) \ No newline at end of file +Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0) diff --git a/charts/mosquitto/templates/configmap.yaml b/charts/mosquitto/templates/configmap.yaml index c9f93cf3..6c8ad3c5 100644 --- a/charts/mosquitto/templates/configmap.yaml +++ b/charts/mosquitto/templates/configmap.yaml @@ -7,9 +7,16 @@ metadata: data: mosquitto.conf: | listener {{ .Values.service.port.port }} + {{- if .Values.auth.enabled }} + allow_anonymous false + {{- else }} allow_anonymous true + {{- end }} {{- if .Values.persistence.data.enabled }} persistence true persistence_location {{ .Values.persistence.data.mountPath }} autosave_interval 1800 {{- end }} + {{- if .Values.persistence.configinc.enabled }} + include_dir {{ .Values.persistence.configinc.mountPath }} + {{- end }} diff --git a/charts/mosquitto/values.yaml b/charts/mosquitto/values.yaml index 383b6b71..923a433e 100644 --- a/charts/mosquitto/values.yaml +++ b/charts/mosquitto/values.yaml @@ -21,6 +21,9 @@ service: port: 1883 name: mqtt +auth: + enabled: false + persistence: data: enabled: false @@ -38,3 +41,20 @@ persistence: ## Do not delete the pvc upon helm uninstall # skipuninstall: false # existingClaim: "" + configinc: + # a persistent volume to place *.conf mosquitto-config-files in + enabled: false + emptyDir: false + mountPath: /mosquitto/configinc + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + # storageClass: "-" + accessMode: ReadWriteOnce + size: 100Mi + ## Do not delete the pvc upon helm uninstall + # skipuninstall: false + # existingClaim: ""