diff --git a/helm/scripts/install.sh b/helm/scripts/install.sh new file mode 100755 index 0000000..4a5f589 --- /dev/null +++ b/helm/scripts/install.sh @@ -0,0 +1 @@ +helm --kube-context homeserver install -n test test ../ \ No newline at end of file diff --git a/helm/scripts/uninstall.sh b/helm/scripts/uninstall.sh new file mode 100755 index 0000000..dd057d7 --- /dev/null +++ b/helm/scripts/uninstall.sh @@ -0,0 +1 @@ +helm --kube-context homeserver uninstall -n test test \ No newline at end of file diff --git a/helm/templates/MQTT/pvc.yml b/helm/templates/MQTT/pvc.yml index 323d3b9..8fd0a9f 100644 --- a/helm/templates/MQTT/pvc.yml +++ b/helm/templates/MQTT/pvc.yml @@ -1,7 +1,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: mosquitto-pvc + name: rabbitmq-pvc spec: accessModes: - ReadWriteOnce diff --git a/helm/templates/MQTT/service.yml b/helm/templates/MQTT/service.yml index e69de29..611db43 100644 --- a/helm/templates/MQTT/service.yml +++ b/helm/templates/MQTT/service.yml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: rabbitmq +spec: + type: NodePort + ports: + - port: 5672 + name: messagebus + targetPort: 5672 + nodePort: 30001 + protocol: TCP + - port: 15672 + name: portal + targetPort: 15672 + nodePort: 30002 + protocol: TCP + selector: + app: rabbitmq diff --git a/helm/templates/MQTT/statefulset.yml b/helm/templates/MQTT/statefulset.yml index 413e0a8..7ab86a1 100644 --- a/helm/templates/MQTT/statefulset.yml +++ b/helm/templates/MQTT/statefulset.yml @@ -1,28 +1,29 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: mosquitto + name: rabbitmq spec: - serviceName: mosquitto + serviceName: rabbitmq selector: matchLabels: - app: mosquitto + app: rabbitmq replicas: 1 template: metadata: labels: - app: mosquitto + app: rabbitmq spec: containers: - - name: mosquitto - image: eclipse-mosquitto + - name: rabbitmq + image: rabbitmq:management imagePullPolicy: "IfNotPresent" ports: - - containerPort: 5432 + - containerPort: 5672 + - containerPort: 15672 volumeMounts: - - name: mosquitto-data - mountPath: /mosquitto/data + - name: rabbitmq-data + mountPath: /rabbitmq/data volumes: - - name: mosquitto-data + - name: rabbitmq-data persistentVolumeClaim: - claimName: mosquitto-pvc \ No newline at end of file + claimName: rabbitmq-pvc \ No newline at end of file