38 lines
867 B
YAML
38 lines
867 B
YAML
apiVersion: v1
|
|
data:
|
|
mosquitto.conf: |
|
|
per_listener_settings false
|
|
listener 8883
|
|
protocol websockets
|
|
allow_anonymous false
|
|
listener 1883
|
|
protocol websockets
|
|
allow_anonymous false
|
|
password_file /mosquitto/temp/password.txt
|
|
wait.sh: |
|
|
#!/bin/ash
|
|
|
|
encrypt_password() {
|
|
echo "${MQ_USERNAME}:${MQ_PASSWORD}" > /mosquitto/temp/password.txt
|
|
mosquitto_passwd -U /mosquitto/temp/password.txt
|
|
chmod 0700 /mosquitto/temp/password.txt
|
|
}
|
|
|
|
main(){
|
|
|
|
encrypt_password
|
|
echo "Starting MQ..."
|
|
# Run the main container command.
|
|
/docker-entrypoint.sh
|
|
/usr/sbin/mosquitto -c /mosquitto/config/mosquitto.conf
|
|
|
|
}
|
|
|
|
main "${@}"
|
|
kind: ConfigMap
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/instance: mosquitto
|
|
app.kubernetes.io/name: mosquitto
|
|
name: mosquitto-config
|
|
namespace: netmaker |