home assistant in kube
All checks were successful
Apply Kuberentes Configs / update-repo (push) Successful in 0s
Apply Kuberentes Configs / update-infrastructure (push) Successful in 1s
Manage Jellyfin Playlists / update-repo (push) Successful in 0s
Manage Jellyfin Playlists / run-python (push) Successful in 50s
Libation / update-repo (push) Successful in 0s
Libation / sync-audiobooks (push) Successful in 5s

This commit is contained in:
2026-02-15 10:42:27 -07:00
parent 90076edfac
commit 6e83dea4a3
3 changed files with 167 additions and 70 deletions

View File

@@ -6,24 +6,24 @@ server {
return 301 https://$host$request_uri; return 301 https://$host$request_uri;
} }
server { # server {
listen 443 ssl; # listen 443 ssl;
listen [::]:443 ssl; # listen [::]:443 ssl;
server_name ha.alexmickelson.guru; # server_name ha.alexmickelson.guru;
include /config/nginx/ssl.conf; # include /config/nginx/ssl.conf;
include /config/nginx/proxy.conf; # include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf; # include /config/nginx/resolver.conf;
location / { # location / {
proxy_pass http://host.docker.internal:8123; # proxy_pass http://host.docker.internal:8123;
proxy_set_header Host $host; # proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1; # proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade; # proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade; # proxy_set_header Connection $connection_upgrade;
} # }
} # }
server { server {
listen 443 ssl; listen 443 ssl;

View File

@@ -0,0 +1,97 @@
apiVersion: v1
kind: Namespace
metadata:
name: homeassistant
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: homeassistant
namespace: homeassistant
spec:
replicas: 1
selector:
matchLabels:
app: homeassistant
template:
metadata:
labels:
app: homeassistant
spec:
hostNetwork: true
containers:
- name: homeassistant
image: homeassistant/home-assistant:stable
imagePullPolicy: Always
env:
- name: TZ
value: "America/Denver"
- name: OPENAI_BASE_URL
value: "http://openwebui.beefalo-newton.ts.net/v1"
volumeMounts:
- name: config
mountPath: /config
- name: localtime
mountPath: /etc/localtime
readOnly: true
- name: zigbee-dongle
mountPath: /dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_0cad0783fc73ef11b46be21e313510fd-if00-port0
securityContext:
privileged: true
capabilities:
add:
- NET_ADMIN
- NET_RAW
volumes:
- name: config
hostPath:
path: /data/homeAssistant/config
type: Directory
- name: localtime
hostPath:
path: /etc/localtime
type: File
- name: zigbee-dongle
hostPath:
path: /dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_0cad0783fc73ef11b46be21e313510fd-if00-port0
type: CharDevice
---
apiVersion: v1
kind: Service
metadata:
name: home-assistant
namespace: homeassistant
spec:
selector:
app: homeassistant
ports:
- name: http
protocol: TCP
port: 8123
targetPort: 8123
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: home-assistant-ingress
namespace: homeassistant
annotations:
cert-manager.io/cluster-issuer: cloudflare-issuer
spec:
ingressClassName: nginx
tls:
- hosts:
- ha.alexmickelson.guru
secretName: ha-tls-cert
rules:
- host: ha.alexmickelson.guru
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: home-assistant
port:
number: 8123

View File

@@ -1,53 +1,53 @@
apiVersion: networking.k8s.io/v1 # apiVersion: networking.k8s.io/v1
kind: Ingress # kind: Ingress
metadata: # metadata:
name: home-assistant-ingress # name: home-assistant-ingress
namespace: projects # namespace: projects
annotations: # annotations:
cert-manager.io/cluster-issuer: cloudflare-issuer # cert-manager.io/cluster-issuer: cloudflare-issuer
spec: # spec:
ingressClassName: nginx # ingressClassName: nginx
tls: # tls:
- hosts: # - hosts:
- ha.alexmickelson.guru # - ha.alexmickelson.guru
secretName: ha-tls-cert # secretName: ha-tls-cert
rules: # rules:
- host: ha.alexmickelson.guru # - host: ha.alexmickelson.guru
http: # http:
paths: # paths:
- path: / # - path: /
pathType: Prefix # pathType: Prefix
backend: # backend:
service: # service:
name: home-assistant # name: home-assistant
port: # port:
number: 8123 # number: 8123
--- # ---
apiVersion: v1 # apiVersion: v1
kind: Service # kind: Service
metadata: # metadata:
name: home-assistant # name: home-assistant
namespace: projects # namespace: projects
spec: # spec:
ports: # ports:
- port: 8123 # - port: 8123
targetPort: 8123 # targetPort: 8123
protocol: TCP # protocol: TCP
--- # ---
apiVersion: discovery.k8s.io/v1 # apiVersion: discovery.k8s.io/v1
kind: EndpointSlice # kind: EndpointSlice
metadata: # metadata:
name: home-assistant # name: home-assistant
namespace: projects # namespace: projects
labels: # labels:
kubernetes.io/service-name: home-assistant # kubernetes.io/service-name: home-assistant
addressType: IPv4 # addressType: IPv4
ports: # ports:
- name: http # - name: http
port: 8123 # port: 8123
protocol: TCP # protocol: TCP
endpoints: # endpoints:
- addresses: # - addresses:
- 100.122.128.107 # - 100.122.128.107
conditions: # conditions:
ready: true # ready: true