remove homeassistant proxy and rely fully on the container deployment
Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
parent
a74de574eb
commit
f841ae6c0e
3 changed files with 49 additions and 50 deletions
|
|
@ -17,7 +17,7 @@ spec:
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: homeassistant-proxy
|
name: homeassistant
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
|
|
@ -29,50 +29,54 @@ spec:
|
||||||
app: homeassistant
|
app: homeassistant
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: homeassistant
|
||||||
image: nginx
|
image: "ghcr.io/home-assistant/home-assistant:stable"
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
ports:
|
ports:
|
||||||
- name: http-port
|
- name: http-port
|
||||||
containerPort: 8123
|
containerPort: 8123
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: "America/Los_Angeles"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config-volume
|
- name: config-directory
|
||||||
mountPath: /etc/nginx/nginx.conf
|
mountPath: /config
|
||||||
subPath: nginx.conf
|
- name: zigbee-dongle
|
||||||
|
mountPath: /dev/ttyUSB0
|
||||||
volumes:
|
volumes:
|
||||||
- name: config-volume
|
- name: config-directory
|
||||||
configMap:
|
persistentVolumeClaim:
|
||||||
name: homeassistant-proxy-nginx-conf
|
claimName: homeassistant-pvc
|
||||||
items:
|
- name: zigbee-dongle
|
||||||
- key: nginx.conf
|
hostPath:
|
||||||
path: nginx.conf
|
path: /dev/ttyUSB0
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: homeassistant-proxy-nginx-conf
|
name: homeassistant-pv
|
||||||
namespace: default
|
labels:
|
||||||
data:
|
pvc_type: homeassistant-pv
|
||||||
nginx.conf: |
|
spec:
|
||||||
worker_processes auto;
|
capacity:
|
||||||
events {
|
storage: 1000Gi
|
||||||
worker_connections 2048;
|
accessModes:
|
||||||
}
|
- ReadWriteOnce
|
||||||
http {
|
persistentVolumeReclaimPolicy: Retain
|
||||||
map $http_upgrade $connection_upgrade {
|
hostPath:
|
||||||
default upgrade;
|
path: {{ .Values.homeassistant.path }}
|
||||||
'' close;
|
---
|
||||||
}
|
apiVersion: v1
|
||||||
server {
|
kind: PersistentVolumeClaim
|
||||||
error_log stdout;
|
metadata:
|
||||||
access_log stdout;
|
name: homeassistant-pvc
|
||||||
|
spec:
|
||||||
listen 8123;
|
accessModes:
|
||||||
listen [::]:8123;
|
- ReadWriteOnce
|
||||||
proxy_buffering off;
|
volumeMode: Filesystem
|
||||||
location / {
|
storageClassName: ""
|
||||||
proxy_pass http://172.30.32.1:8123;
|
volumeName: homeassistant-pv
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
resources:
|
||||||
proxy_set_header Connection $connection_upgrade;
|
requests:
|
||||||
}
|
storage: 1000Gi
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
|
|
@ -44,9 +36,9 @@ spec:
|
||||||
- cloud.sunnypup.io
|
- cloud.sunnypup.io
|
||||||
- office.sunnypup.io
|
- office.sunnypup.io
|
||||||
- echo.sunnypup.io
|
- echo.sunnypup.io
|
||||||
- home.sunnypup.io
|
|
||||||
- hephaestus.sunnypup.io
|
- hephaestus.sunnypup.io
|
||||||
- mimir.sunnypup.io
|
- mimir.sunnypup.io
|
||||||
|
- annwn.sunnypup.io
|
||||||
---
|
---
|
||||||
apiVersion: cert-manager.io/v1
|
apiVersion: cert-manager.io/v1
|
||||||
kind: Certificate
|
kind: Certificate
|
||||||
|
|
@ -170,7 +162,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
acme.cert-manager.io/http01-solver: "true"
|
acme.cert-manager.io/http01-solver: "true"
|
||||||
spec:
|
spec:
|
||||||
host: home.sunnypup.io
|
host: annwn.sunnypup.io
|
||||||
tls:
|
tls:
|
||||||
cert-manager:
|
cert-manager:
|
||||||
cluster-issuer: letsencrypt
|
cluster-issuer: letsencrypt
|
||||||
|
|
|
||||||
|
|
@ -77,3 +77,6 @@ observability:
|
||||||
grafana: "/srv/sunnypup/otel/grafana"
|
grafana: "/srv/sunnypup/otel/grafana"
|
||||||
p8s: "/srv/sunnypup/otel/p8s"
|
p8s: "/srv/sunnypup/otel/p8s"
|
||||||
pyroscope: "/srv/sunnypup/otel/pyroscope"
|
pyroscope: "/srv/sunnypup/otel/pyroscope"
|
||||||
|
|
||||||
|
homeassistant:
|
||||||
|
path: "/srv/sunnypup/homeassistant"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue