Skip to content

Commit

Permalink
fix: update mosquitto
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Mar 31, 2024
1 parent 6fabfab commit b7d48be
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ spec:
template:
engineVersion: v2
data:
username: "{{ .MOSQUITTO_MQTT_USERNAME }}"
password: "{{ .MOSQUITTO_MQTT_PASSWORD }}"
mosquitto_pwd: |-
{{ .MOSQUITTO_MQTT_USERNAME }}:{{ .MOSQUITTO_MQTT_PASSWORD }}
dataFrom:
Expand Down
23 changes: 14 additions & 9 deletions kubernetes/main/apps/default/mosquitto/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ spec:
repository: public.ecr.aws/docker/library/eclipse-mosquitto
tag: 2.0.18@sha256:cb3afd02611b0c58b328196ab00de0158322b4c1e014841fb182d2a0ea3a79b9
command: ["/bin/sh", "-c"]
args: ["cp /tmp/secret/* /mosquitto/external_config/ && mosquitto_passwd -U /mosquitto/external_config/mosquitto_pwd"]
args:
- |
cp /tmp/secret/mosquitto_pwd /mosquitto/external_config/;
chmod 600 /mosquitto/external_config/mosquitto_pwd;
mosquitto_passwd -U /mosquitto/external_config/mosquitto_pwd;
containers:
app:
image:
Expand All @@ -55,13 +59,13 @@ spec:
requests:
cpu: 10m
limits:
memory: 16Mi
memory: 64Mi
pod:
securityContext:
runAsUser: 568
runAsGroup: 568
runAsUser: 65534
runAsGroup: 65534
runAsNonRoot: true
fsGroup: 568
fsGroup: 65534
fsGroupChangePolicy: OnRootMismatch
service:
app:
Expand All @@ -74,10 +78,8 @@ spec:
http:
port: 1883
persistence:
config:
data:
existingClaim: mosquitto
globalMounts:
- path: /data
config-file:
type: configMap
name: mosquitto-configmap
Expand All @@ -86,13 +88,16 @@ spec:
app:
- path: /mosquitto/config/mosquitto.conf
subPath: mosquitto.conf
readOnly: true
secret-file:
type: secret
name: mosquitto-secret
advancedMounts:
mosquitto:
init-config:
- path: /tmp/secret
- path: /tmp/secret/mosquitto_pwd
subPath: mosquitto_pwd
readOnly: true
external-config:
type: emptyDir
globalMounts:
Expand Down

0 comments on commit b7d48be

Please sign in to comment.