Josh Bicking hai 1 día
pai
achega
35630b368e
Modificáronse 2 ficheiros con 60 adicións e 1 borrados
  1. 15 0
      homeassistant-pvc.yaml
  2. 45 1
      homeassistant.yaml

+ 15 - 0
homeassistant-pvc.yaml

@@ -17,3 +17,18 @@ spec:
   resources:
     requests:
       storage: 100Mi
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  name: esphome-pvc
+  namespace: homeassistant
+  labels:
+    app: esphome
+spec:
+  storageClassName: ceph-block-ssd
+  accessModes:
+    - ReadWriteOnce
+  resources:
+    requests:
+      storage: 10Gi

+ 45 - 1
homeassistant.yaml

@@ -28,7 +28,7 @@ spec:
       hostNetwork: true
       containers:
       - name: homeassistant
-        image: homeassistant/home-assistant:2023.10.1
+        image: homeassistant/home-assistant:2026.1.2
         ports:
         - containerPort: 8123
           name: http-web-svc
@@ -57,6 +57,50 @@ spec:
 ---
 apiVersion: apps/v1
 kind: Deployment
+metadata:
+  name: esphome
+  namespace: homeassistant
+spec:
+  strategy:
+    type: Recreate
+  selector:
+    matchLabels:
+      app: esphome
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: esphome
+    spec:
+      affinity:
+        nodeAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            nodeSelectorTerms:
+            - matchExpressions:
+              - key: cluster-ingress
+                operator: In
+                values:
+                - "true"
+      hostNetwork: true
+      containers:
+      - name: esphome
+        image: ghcr.io/esphome/esphome:latest
+        ports:
+        - containerPort: 6052
+          name: http-web-svc
+        volumeMounts:
+        - mountPath: "/config"
+          name: data
+        envFrom:
+        - secretRef:
+            name: esphome-secret
+      volumes:
+      - name: data
+        persistentVolumeClaim:
+          claimName: esphome-pvc
+---
+apiVersion: apps/v1
+kind: Deployment
 metadata:
   name: whisper
   namespace: homeassistant