[mosquitto] Add option for selectively adding listener (#1711)

Using TLS in Mosquitto does not work if the listener option is present
in the main mosquitto.conf. This is why an option is added to prevent
it from being added to support TLS usage without hacking the chart
locally.

Signed-off-by: Tero Paloheimo <tero.paloheimo@iki.fi>
This commit is contained in:
Tero Paloheimo 2022-07-29 21:50:29 +03:00 committed by GitHub
parent fa3028961e
commit a4d622cbb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 6 deletions

View File

@ -3,7 +3,7 @@ apiVersion: v2
appVersion: 2.0.14 appVersion: 2.0.14
description: Eclipse Mosquitto - An open source MQTT broker description: Eclipse Mosquitto - An open source MQTT broker
name: mosquitto name: mosquitto
version: 4.5.1 version: 4.6.0
kubeVersion: ">=1.16.0-0" kubeVersion: ">=1.16.0-0"
keywords: keywords:
- mosquitto - mosquitto
@ -22,5 +22,5 @@ dependencies:
version: 4.4.2 version: 4.4.2
annotations: annotations:
artifacthub.io/changes: |- artifacthub.io/changes: |-
- kind: changed - kind: added
description: Use appVersion as image tag by default description: Option to disable adding of the listener option to the config

View File

@ -80,21 +80,22 @@ N/A
| image.repository | string | `"eclipse-mosquitto"` | image repository | | image.repository | string | `"eclipse-mosquitto"` | image repository |
| image.tag | string | chart.appVersion | image tag | | image.tag | string | chart.appVersion | image tag |
| perListenerSettings | bool | `false` | By enabling this, authentication and access control settings will be controlled on a per-listener basis | | perListenerSettings | bool | `false` | By enabling this, authentication and access control settings will be controlled on a per-listener basis |
| addListener | bool | `true` | When enabled the `listener` option is added to the mosquitto config. |
| persistence.configinc | object | See values.yaml | Configure a persistent volume to place *.conf mosquitto-config-files in. When enabled, this gets set as `include_dir` in the mosquitto config. | | persistence.configinc | object | See values.yaml | Configure a persistent volume to place *.conf mosquitto-config-files in. When enabled, this gets set as `include_dir` in the mosquitto config. |
| persistence.data | object | See values.yaml | Configure a persistent volume to place mosquitto data in. When enabled, this enables `persistence` and `persistence_location` in the mosquitto config. | | persistence.data | object | See values.yaml | Configure a persistent volume to place mosquitto data in. When enabled, this enables `persistence` and `persistence_location` in the mosquitto config. |
| service | object | See values.yaml | Configures service settings for the chart. Normally this does not need to be modified. | | service | object | See values.yaml | Configures service settings for the chart. Normally this does not need to be modified. |
## Changelog ## Changelog
### Version 4.5.1 ### Version 4.6.0
#### Added #### Added
N/A * Option to disable adding of the `listener` option to the config
#### Changed #### Changed
* Use appVersion as image tag by default N/A
#### Fixed #### Fixed

View File

@ -9,7 +9,9 @@ metadata:
data: data:
mosquitto.conf: | mosquitto.conf: |
per_listener_settings {{ .Values.perListenerSettings }} per_listener_settings {{ .Values.perListenerSettings }}
{{- if .Values.addListener }}
listener {{ .Values.service.main.ports.mqtt.port }} listener {{ .Values.service.main.ports.mqtt.port }}
{{- end}}
{{- if .Values.auth.enabled }} {{- if .Values.auth.enabled }}
allow_anonymous false allow_anonymous false
{{- else }} {{- else }}

View File

@ -32,6 +32,10 @@ auth:
# -- By enabling this, authentication and access control settings will be controlled on a per-listener basis # -- By enabling this, authentication and access control settings will be controlled on a per-listener basis
perListenerSettings: false perListenerSettings: false
# -- When enabled, this adds the `listener` option to the mosquitto config.
# Change this to false when using TLS.
addListener: true
persistence: persistence:
# -- Configure a persistent volume to place mosquitto data in. # -- Configure a persistent volume to place mosquitto data in.
# When enabled, this enables `persistence` and `persistence_location` in the mosquitto config. # When enabled, this enables `persistence` and `persistence_location` in the mosquitto config.