changes
This commit is contained in:
@@ -8,14 +8,10 @@ kubectl create namespace $NAMESPACE \
|
|||||||
kubectl -f - apply
|
kubectl -f - apply
|
||||||
|
|
||||||
echo "Applying certificate ..."
|
echo "Applying certificate ..."
|
||||||
kubectl apply -f $DEPLOYMENT_DIR/certificate.yml -n $NAMESPACE
|
kubectl apply -f certificate.yml -n $NAMESPACE
|
||||||
|
|
||||||
echo "Applyiny configuration ..."
|
echo "Applyiny configuration ..."
|
||||||
kubectl create configmap mosquitto-broker-config
|
./update-config.sh
|
||||||
--from-file=mosquitto.conf=mosquitto.conf
|
|
||||||
--from-file=pwfile=pwfile
|
|
||||||
--namespace=$NAMESPACE
|
|
||||||
--dry-run=client -o yaml | kubectl apply -f - -n $NAMESPACE
|
|
||||||
|
|
||||||
echo "Waiting for certificate secret to be created..."
|
echo "Waiting for certificate secret to be created..."
|
||||||
kubectl wait --for=condition=Ready certificate/mosquitto-broker-cert -n $NAMESPACE --timeout=300s
|
kubectl wait --for=condition=Ready certificate/mosquitto-broker-cert -n $NAMESPACE --timeout=300s
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ spec:
|
|||||||
- name: mosquitto-broker-config
|
- name: mosquitto-broker-config
|
||||||
mountPath: /mosquitto/config/
|
mountPath: /mosquitto/config/
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: mosquitto-broker-tls-config
|
- name: mosquitto-broker-cert
|
||||||
mountPath: /mosquitto/config/ssl
|
mountPath: /mosquitto/config/ssl
|
||||||
readOnly: true
|
readOnly: true
|
||||||
volumes:
|
volumes:
|
||||||
@@ -52,9 +52,9 @@ spec:
|
|||||||
path: mosquitto.conf
|
path: mosquitto.conf
|
||||||
- key: pwfile
|
- key: pwfile
|
||||||
path: pwfile
|
path: pwfile
|
||||||
- name: mosquitto-broker-tls-conf
|
- name: mosquitto-broker-cert
|
||||||
secret:
|
secret:
|
||||||
secretName: mosquitto-broker-tls-conf
|
secretName: mosquitto-broker-cert
|
||||||
defaultMode: 0644
|
defaultMode: 0644
|
||||||
items:
|
items:
|
||||||
- key: tls.crt
|
- key: tls.crt
|
||||||
@@ -90,7 +90,7 @@ spec:
|
|||||||
app: mosquitto-broker
|
app: mosquitto-broker
|
||||||
ports:
|
ports:
|
||||||
- name: mqtt-anon
|
- name: mqtt-anon
|
||||||
port: 1884
|
port: 1883
|
||||||
targetPort: 1884
|
targetPort: 1884
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
pid_file /mosquitto/config/mosquitto.pid
|
pid_file /tmp/mosquitto.pid
|
||||||
log_dest stdout
|
log_dest stdout
|
||||||
log_type all
|
log_type all
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user