170 lines
3.5 KiB
YAML
170 lines
3.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: hassio
|
|
labels:
|
|
app: hassio
|
|
release: latest
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: hassio
|
|
release: latest
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: hassio
|
|
release: latest
|
|
spec:
|
|
containers:
|
|
- name: hassio
|
|
image: "homeassistant/home-assistant:latest"
|
|
imagePullPolicy: Always
|
|
env:
|
|
- name: TZ
|
|
value: Europe/Berlin
|
|
volumeMounts:
|
|
- name: hassio-storage
|
|
mountPath: /config
|
|
ports:
|
|
- name: http
|
|
containerPort: 8123
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 5
|
|
resources:
|
|
requests:
|
|
memory: "92Mi"
|
|
cpu: "250m"
|
|
limits:
|
|
memory: "256Mi"
|
|
cpu: "500m"
|
|
- name: configurator
|
|
image: "causticlab/hass-configurator-docker:arm"
|
|
imagePullPolicy: Always
|
|
env:
|
|
- name: HC_HASS_API
|
|
value: http://127.0.0.1:8123/api/
|
|
- name: HC_HASS_API_PASSWORD
|
|
value: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhMzBmYjU1ZjcyZGE0Yzc2YmU2NmY0NjljNTAyMjdjZCIsImlhdCI6MTYxMjg4MzI5NywiZXhwIjoxOTI4MjQzMjk3fQ.1ICsHliUXR0CG4H8vQRYJ5jVqFwmqKSB0fScSitC-Q4
|
|
ports:
|
|
- name: adm
|
|
containerPort: 3218
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3218
|
|
initialDelaySeconds: 3
|
|
periodSeconds: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3218
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
volumeMounts:
|
|
- name: hassio-storage
|
|
mountPath: /hass-config
|
|
- name: hassio-conf-storage
|
|
mountPath: /config
|
|
volumes:
|
|
- name: hassio-storage
|
|
persistentVolumeClaim:
|
|
claimName: hassio-storage
|
|
- name: hassio-conf-storage
|
|
persistentVolumeClaim:
|
|
claimName: hassio-configurator
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: hassio-storage
|
|
labels:
|
|
app: hassio
|
|
spec:
|
|
storageClassName: nfs-ssd
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 20Mi
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: hassio-configurator
|
|
labels:
|
|
app: hassio
|
|
spec:
|
|
storageClassName: nfs-ssd
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 20Mi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: hassio
|
|
labels:
|
|
app: hassio
|
|
release: latest
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
targetPort: http
|
|
protocol: TCP
|
|
name: http
|
|
selector:
|
|
app: hassio
|
|
release: latest
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: hassio-conf
|
|
labels:
|
|
app: hassio
|
|
release: latest
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
targetPort: adm
|
|
protocol: TCP
|
|
name: adm
|
|
selector:
|
|
app: hassio
|
|
release: latest
|
|
---
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: hassio
|
|
spec:
|
|
rules:
|
|
- host: hassio.lan
|
|
http:
|
|
paths:
|
|
- backend:
|
|
serviceName: hassio
|
|
servicePort: http
|
|
- host: hassio-conf.lan
|
|
http:
|
|
paths:
|
|
- backend:
|
|
serviceName: hassio-conf
|
|
servicePort: adm
|