remove homeassistant proxy and rely fully on the container deployment

Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
Ava Apples Affine 2025-07-22 23:06:12 -07:00
parent a74de574eb
commit f841ae6c0e
3 changed files with 49 additions and 50 deletions

View file

@ -17,7 +17,7 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: homeassistant-proxy
name: homeassistant
spec:
replicas: 1
selector:
@ -29,50 +29,54 @@ spec:
app: homeassistant
spec:
containers:
- name: nginx
image: nginx
- name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
securityContext:
privileged: true
ports:
- name: http-port
containerPort: 8123
env:
- name: TZ
value: "America/Los_Angeles"
volumeMounts:
- name: config-volume
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
- name: config-directory
mountPath: /config
- name: zigbee-dongle
mountPath: /dev/ttyUSB0
volumes:
- name: config-volume
configMap:
name: homeassistant-proxy-nginx-conf
items:
- key: nginx.conf
path: nginx.conf
- name: config-directory
persistentVolumeClaim:
claimName: homeassistant-pvc
- name: zigbee-dongle
hostPath:
path: /dev/ttyUSB0
---
apiVersion: v1
kind: ConfigMap
kind: PersistentVolume
metadata:
name: homeassistant-proxy-nginx-conf
namespace: default
data:
nginx.conf: |
worker_processes auto;
events {
worker_connections 2048;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
error_log stdout;
access_log stdout;
listen 8123;
listen [::]:8123;
proxy_buffering off;
location / {
proxy_pass http://172.30.32.1:8123;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
}
name: homeassistant-pv
labels:
pvc_type: homeassistant-pv
spec:
capacity:
storage: 1000Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
hostPath:
path: {{ .Values.homeassistant.path }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: homeassistant-pvc
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
storageClassName: ""
volumeName: homeassistant-pv
resources:
requests:
storage: 1000Gi

View file

@ -1,11 +1,3 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: nginx-ingress
data:
otel-exporter-endpoint: "observability:4317"
otel-trace-in-http: "true"
---
apiVersion: v1
kind: Secret
metadata:
@ -44,9 +36,9 @@ spec:
- cloud.sunnypup.io
- office.sunnypup.io
- echo.sunnypup.io
- home.sunnypup.io
- hephaestus.sunnypup.io
- mimir.sunnypup.io
- annwn.sunnypup.io
---
apiVersion: cert-manager.io/v1
kind: Certificate
@ -170,7 +162,7 @@ metadata:
labels:
acme.cert-manager.io/http01-solver: "true"
spec:
host: home.sunnypup.io
host: annwn.sunnypup.io
tls:
cert-manager:
cluster-issuer: letsencrypt

View file

@ -77,3 +77,6 @@ observability:
grafana: "/srv/sunnypup/otel/grafana"
p8s: "/srv/sunnypup/otel/p8s"
pyroscope: "/srv/sunnypup/otel/pyroscope"
homeassistant:
path: "/srv/sunnypup/homeassistant"