Hassio/manifests/deployment.yaml

49 lines
1.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: homeassistant
name: homeassistant
namespace: home-automation
spec:
selector:
matchLabels:
app: homeassistant
template:
metadata:
labels:
app: homeassistant
spec:
initContainers:
- name: config-binder
image: alpine
command: ["sh", "-c", "cp /binder/configuration.yaml /config/configuration.yaml"]
volumeMounts:
- mountPath: /binder/configuration.yaml
name: homeassistant-config
subPath: configuration.yaml
- mountPath: /config
name: homeassistant-data
containers:
- name: homeassistant
image: ghcr.io/home-assistant/home-assistant:stable
ports:
- containerPort: 8123
name: http
volumeMounts:
- mountPath: /config
name: homeassistant-data
- mountPath: /config/recorder.yaml
name: homeassistant-recorder
subPath: recorder.yaml
volumes:
- name: homeassistant-config
configMap:
name: homeassistant-config
- name: homeassistant-data
persistentVolumeClaim:
claimName: homeassistant-pvc
- name: homeassistant-recorder
secret:
secretName: homeassistant-recorder