From abc4d19ebbb8d1b19c0082907a7f2ea6bd8abcd3 Mon Sep 17 00:00:00 2001 From: Roger Oriol Date: Wed, 28 Jan 2026 00:11:26 +0100 Subject: [PATCH] homeassistant config map --- homeassistant/config/configuration.yaml | 4 - homeassistant/homeassistant.txt | 146 ------------------------ homeassistant/homeassistant.yaml | 21 ++++ 3 files changed, 21 insertions(+), 150 deletions(-) delete mode 100644 homeassistant/config/configuration.yaml delete mode 100644 homeassistant/homeassistant.txt diff --git a/homeassistant/config/configuration.yaml b/homeassistant/config/configuration.yaml deleted file mode 100644 index b5112c2..0000000 --- a/homeassistant/config/configuration.yaml +++ /dev/null @@ -1,4 +0,0 @@ -http: - use_x_forwarded_for: true - trusted_proxies: - - 10.88.88.0/24 diff --git a/homeassistant/homeassistant.txt b/homeassistant/homeassistant.txt deleted file mode 100644 index b075c1f..0000000 --- a/homeassistant/homeassistant.txt +++ /dev/null @@ -1,146 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: home-assistant ---- -apiVersion: v1 -kind: Service -metadata: - namespace: home-assistant - name: home-assistant -spec: - selector: - app: home-assistant - type: ClusterIP - ports: - - name: http - protocol: TCP - port: 80 - targetPort: 8123 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - namespace: home-assistant - name: home-assistant - labels: - app: home-assistant -spec: - replicas: 1 - selector: - matchLabels: - app: home-assistant - template: - metadata: - labels: - app: home-assistant - spec: - containers: - - name: bluez - image: ghcr.io/mysticrenji/bluez-service:v1.0.0 - securityContext: - privileged: true - - name: home-assistant - image: ghcr.io/mysticrenji/homeassistant-arm64:2023.3.0 - resources: - requests: - memory: "256Mi" - limits: - memory: "512Mi" - ports: - - containerPort: 8123 - volumeMounts: - - mountPath: /config - name: config - - mountPath: /config/configuration.yaml - subPath: configuration.yaml - name: configmap-file - - mountPath: /config/automations.yaml - subPath: automations.yaml - name: configmap-file - - mountPath: /media - name: media-volume - # - mountPath: /run/dbus - # name: d-bus - # readOnly: true - - mountPath: /dev/ttyUSB1 - name: zigbee - #- mountPath: /dev/video0 - # name: cam - securityContext: - privileged: true - capabilities: - add: - - NET_ADMIN - - NET_RAW - - SYS_ADMIN - hostNetwork: true - volumes: - - name: config - persistentVolumeClaim: - claimName: home-assistant-pvc - - name: media-volume - hostPath: - path: /tmp/media - - name: configmap-file - configMap: - name: home-assistant-configmap - # hostPath: - # path: /tmp/home-assistant - # type: DirectoryOrCreate - # - name: d-bus - # hostPath: - # path: /run/dbus - - name: zigbee - hostPath: - path: /dev/ttyACM0 - #- name: cam - # hostPath: - # path: /dev/video0 ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: home-assistant-configmap - namespace: home-assistant -data: - known_devices.yaml: | - automations.yaml: | - configuration.yaml: |- - default_config: - frontend: - themes: !include_dir_merge_named themes - automation: !include automations.yaml - http: - use_x_forwarded_for: true - trusted_proxies: - - 10.10.0.0/16 ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: home-assistant-pvc - labels: - app: home-assistant - namespace: home-assistant -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 9Gi ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: zwavejs2mqtt-pvc - labels: - app: zwavejs2mqtt - namespace: home-assistant -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi diff --git a/homeassistant/homeassistant.yaml b/homeassistant/homeassistant.yaml index 6b1c538..78e5fdd 100644 --- a/homeassistant/homeassistant.yaml +++ b/homeassistant/homeassistant.yaml @@ -19,6 +19,21 @@ spec: port: 80 targetPort: 8123 --- +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: home-assistant + name: home-assistant-config +data: + configuration.yaml: | + # Loads default set of integrations + default_config: + + http: + use_x_forwarded_for: true + trusted_proxies: + - 10.88.88.0/24 +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -49,6 +64,9 @@ spec: volumeMounts: - name: config mountPath: /config + - name: configuration + mountPath: /config/configuration.yaml + subPath: configuration.yaml - name: localtime mountPath: /etc/localtime readOnly: true @@ -67,6 +85,9 @@ spec: - name: config persistentVolumeClaim: claimName: home-assistant-config + - name: configuration + configMap: + name: home-assistant-config - name: localtime hostPath: path: /etc/localtime