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;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name ha.alexmickelson.guru;
include /config/nginx/ssl.conf;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
# server {
# listen 443 ssl;
# listen [::]:443 ssl;
# server_name ha.alexmickelson.guru;
# include /config/nginx/ssl.conf;
# include /config/nginx/proxy.conf;
# include /config/nginx/resolver.conf;
location / {
proxy_pass http://host.docker.internal:8123;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
# location / {
# proxy_pass http://host.docker.internal:8123;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_http_version 1.1;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection $connection_upgrade;
# }
# }
server {
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
kind: Ingress
metadata:
name: home-assistant-ingress
namespace: projects
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
---
apiVersion: v1
kind: Service
metadata:
name: home-assistant
namespace: projects
spec:
ports:
- port: 8123
targetPort: 8123
protocol: TCP
---
apiVersion: discovery.k8s.io/v1
kind: EndpointSlice
metadata:
name: home-assistant
namespace: projects
labels:
kubernetes.io/service-name: home-assistant
addressType: IPv4
ports:
- name: http
port: 8123
protocol: TCP
endpoints:
- addresses:
- 100.122.128.107
conditions:
ready: true
# apiVersion: networking.k8s.io/v1
# kind: Ingress
# metadata:
# name: home-assistant-ingress
# namespace: projects
# 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
# ---
# apiVersion: v1
# kind: Service
# metadata:
# name: home-assistant
# namespace: projects
# spec:
# ports:
# - port: 8123
# targetPort: 8123
# protocol: TCP
# ---
# apiVersion: discovery.k8s.io/v1
# kind: EndpointSlice
# metadata:
# name: home-assistant
# namespace: projects
# labels:
# kubernetes.io/service-name: home-assistant
# addressType: IPv4
# ports:
# - name: http
# port: 8123
# protocol: TCP
# endpoints:
# - addresses:
# - 100.122.128.107
# conditions:
# ready: true