This commit is contained in:
Sense T
2023-09-06 04:41:05 +00:00
parent d5933d6be0
commit 54b5e8d6f9
10 changed files with 211 additions and 0 deletions

35
hass/mqtt/deployment.yaml Normal file
View File

@@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mosquitto
spec:
selector:
matchLabels:
app: mosquitto
template:
metadata:
labels:
app: mosquitto
spec:
volumes:
- name: config
configMap:
name: mosquitto
- name: data
hostPath:
path: /data/home-assistant/mqtt
containers:
- name: mosquitto
image: mosquitto
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 1883
name: mqtt
volumeMounts:
- mountPath: /data
name: data
- mountPath: /mosquitto/config
name: config

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml

16
hass/mqtt/service.yaml Normal file
View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: mosquitto
spec:
selector:
app: mosquitto
ports:
- port: 1883
targetPort: mqtt
name: mqtt
type: LoadBalancer
ipFamilyPolicy: PreferDualStack
ipFamilies:
- IPv4
- IPv6