Skip to content

Commit

Permalink
Allow MQTT broker container config
Browse files Browse the repository at this point in the history
fixes #502
  • Loading branch information
hardillb committed Nov 22, 2024
1 parent f9a2e7d commit 996f016
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions helm/flowforge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ To use STMP to send email
### MQTT Broker

- `forge.broker.enabled` (default `false`)
- `forge.broker.image` Allows the mosquitto broker container image to be overidden (default `iegomez/mosquitto-go-auth`)
- `forge.broker.url` URL to access the broker from inside the cluster (default `mqtt://flowforge-broker.[namespace]:1883`)
- `forge.broker.public_url` URL to access the broker from outside the cluster (default `ws://mqtt.[forge.domain]`, uses `wss://` if `forge.https` is `true`)
- `forge.broker.hostname` the custom Fully Qualified Domain Name (FQDN) where the broker will be hosted (default `mqtt.[forge.domain]`)
Expand Down
10 changes: 1 addition & 9 deletions helm/flowforge/templates/broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
{{- toYaml .Values.forge.broker.podSecurityContext | nindent 8 }}
containers:
- name: broker
image: iegomez/mosquitto-go-auth
image: {{ .Values.forge.broker.image | default "iegomez/mosquitto-go-auth" | quote }}
imagePullPolicy: Always
volumeMounts:
- name: config
Expand Down Expand Up @@ -126,8 +126,6 @@ spec:
{{- if .Values.forge.broker.affinity }}
affinity: {{ toYaml .Values.forge.broker.affinity | nindent 8 }}
{{- end }}
{{- end }}
{{- if eq .Values.forge.broker.enabled true -}}
---
apiVersion: v1
kind: Service
Expand All @@ -146,11 +144,5 @@ spec:
protocol: TCP
name: mqtt-ws
selector:
{{- if and ( eq .Values.forge.broker.enabled true) ( eq .Values.forge.broker.teamBroker.enabled false ) -}}
{{- include "forge.brokerSelectorLabels" . | nindent 4 }}
{{- else -}}
apps.emqx.io/db-role: core
apps.emqx.io/instance: emqx
apps.emqx.io/managed-by: emqx-operator
{{- end }}
{{- end -}}
3 changes: 3 additions & 0 deletions helm/flowforge/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@
},
"createMetricsUser": {
"type": "boolean"
},
"image": {
"type": "string"
}
},
"required": [
Expand Down
1 change: 1 addition & 0 deletions helm/flowforge/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ forge:
podLabels: {}
broker:
enabled: false
image: iegomez/mosquitto-go-auth
teamBroker:
enabled: false
createMetricsUser: false
Expand Down

0 comments on commit 996f016

Please sign in to comment.