Compare commits
2 Commits
abbbfd91c0
...
5599645d0e
Author | SHA1 | Date |
---|---|---|
Massaki Archambault | 5599645d0e | |
Massaki Archambault | fe0fa3913e |
|
@ -0,0 +1,9 @@
|
|||
default_config:
|
||||
|
||||
frontend:
|
||||
themes: !include_dir_merge_named themes
|
||||
|
||||
http:
|
||||
use_x_forwarded_for: true
|
||||
trusted_proxies:
|
||||
- 10.0.0.0/8
|
|
@ -0,0 +1,97 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: server
|
||||
labels:
|
||||
app.kubernetes.io/name: home-assistant
|
||||
app.kubernetes.io/component: server
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: home-assistant
|
||||
app.kubernetes.io/component: server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: home-assistant
|
||||
app.kubernetes.io/component: server
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
# TODO: eviction policy
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
# need a zigbee receiver
|
||||
- key: badjnet.home/zigbee-receiver
|
||||
operator: Exists
|
||||
initContainers:
|
||||
- image: busybox:1.36.1
|
||||
name: cp-config
|
||||
command: ["cp", "/server-config/configuration.yaml", "/config"]
|
||||
volumeMounts:
|
||||
- name: home-assistant-pv
|
||||
mountPath: /config
|
||||
- name: server-config
|
||||
mountPath: /server-config
|
||||
readOnly: true
|
||||
containers:
|
||||
- image: homeassistant/home-assistant:2023.5.4
|
||||
name: home-assistant
|
||||
securityContext:
|
||||
privileged: true
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8123
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 500Mi
|
||||
limits:
|
||||
cpu: 250m
|
||||
memory: 500Mi
|
||||
volumeMounts:
|
||||
- name: home-assistant-pv
|
||||
mountPath: /config
|
||||
- name: zigbee-receiver
|
||||
mountPath: /dev/ttyUSB0
|
||||
volumes:
|
||||
- name: zigbee-receiver
|
||||
hostPath:
|
||||
path: /dev/ttyUSB0
|
||||
- name: home-assistant-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: server-pvc
|
||||
- name: server-config
|
||||
configMap:
|
||||
name: server-config
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: server-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: server
|
||||
labels:
|
||||
app.kubernetes.io/name: home-assistant
|
||||
app.kubernetes.io/component: server
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: home-assistant
|
||||
app.kubernetes.io/component: server
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: http
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: server
|
||||
labels:
|
||||
app.kubernetes.io/name: home-assistant
|
||||
probe: blackbox-http
|
||||
spec:
|
||||
rules:
|
||||
- host: ${HOMEASSISTANT_EXTERNAL_HOST}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: server
|
||||
port:
|
||||
name: http
|
|
@ -0,0 +1,28 @@
|
|||
resources:
|
||||
- home-assistant-deployment.yaml
|
||||
- home-assistant-ingress.yaml
|
||||
|
||||
namePrefix: home-assistant-
|
||||
|
||||
commonLabels:
|
||||
app.kubernetes.io/name: home-assistant
|
||||
|
||||
configMapGenerator:
|
||||
- name: server-config
|
||||
files:
|
||||
- configuration.yaml=configurations/configuration.yaml
|
||||
- name: kustomize-generated-config
|
||||
literals:
|
||||
- HOMEASSISTANT_EXTERNAL_HOST=hass.badjware.dev
|
||||
|
||||
replacements:
|
||||
- source:
|
||||
kind: ConfigMap
|
||||
name: kustomize-generated-config
|
||||
fieldPath: data.HOMEASSISTANT_EXTERNAL_HOST
|
||||
targets:
|
||||
- select:
|
||||
kind: Ingress
|
||||
name: server
|
||||
fieldPaths:
|
||||
- spec.rules.0.host
|
|
@ -57,7 +57,7 @@ spec:
|
|||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 3Gi
|
||||
storage: 5Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
|
|
@ -7,6 +7,7 @@ resources:
|
|||
# - ../../overlays/gitlab
|
||||
- ../../overlays/monitoring
|
||||
- ../../overlays/nextcloud
|
||||
- ../../overlays/home-assistant
|
||||
|
||||
# resources:
|
||||
# - probes/external-services-bobcat-miner.yaml
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
resources:
|
||||
- namespace.yaml
|
||||
- ../../bases/home-assistant
|
||||
|
||||
namespace: home-assistant
|
|
@ -0,0 +1,4 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: home-assistant
|
Loading…
Reference in New Issue