Sunnypup-Helm/templates/homeassistant.yaml

83 lines
1.7 KiB
YAML
Raw Normal View History

apiVersion: v1
kind: Service
metadata:
name: homeassistant
labels:
app: homeassistant
spec:
selector:
app: homeassistant
type: ClusterIP
clusterIP: None
ports:
- name: http-port
port: 8123
targetPort: 8123
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: homeassistant
spec:
replicas: 1
selector:
matchLabels:
app: homeassistant
template:
metadata:
labels:
app: homeassistant
spec:
containers:
- name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
securityContext:
privileged: true
ports:
- name: http-port
containerPort: 8123
env:
- name: TZ
value: "America/Los_Angeles"
volumeMounts:
- name: config-directory
mountPath: /config
- name: zigbee-dongle
mountPath: /dev/ttyUSB0
volumes:
- name: config-directory
persistentVolumeClaim:
claimName: homeassistant-pvc
- name: zigbee-dongle
hostPath:
path: /dev/ttyUSB0
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: homeassistant-pv
labels:
pvc_type: homeassistant-pv
spec:
capacity:
storage: 1000Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
hostPath:
path: {{ .Values.homeassistant.path }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: homeassistant-pvc
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
storageClassName: ""
volumeName: homeassistant-pv
resources:
requests:
storage: 1000Gi