mirror of
https://github.com/outbackdingo/homelab-v.git
synced 2026-09-02 09:39:29 +00:00
fix(hass): Creating PV and PVC for Home Assistant
This commit is contained in:
@@ -9,17 +9,24 @@ spec:
|
||||
app: home-assistant
|
||||
template:
|
||||
spec:
|
||||
volumes:
|
||||
- name: home-assistant-config
|
||||
hostPath:
|
||||
path: "/disk/etc/home-assistant"
|
||||
containers:
|
||||
- image: homeassistant/home-assistant
|
||||
imagePullPolicy: Always
|
||||
name: home-assistant
|
||||
volumeMounts:
|
||||
- mountPath: "/config"
|
||||
name: home-assistant-config
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 8123
|
||||
containerPort: 8123
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
volumes:
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
claimName: hass-config-pvc
|
||||
@@ -5,6 +5,8 @@ commonLabels:
|
||||
app: home-assistant
|
||||
|
||||
resources:
|
||||
- pv-hass-config.yaml
|
||||
- pvc-hass-config.yaml
|
||||
- service.yaml
|
||||
- deployment.yaml
|
||||
- ingress.yaml
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: hass-config-pv
|
||||
spec:
|
||||
capacity:
|
||||
storage: 16Gi
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: hass-config-sc
|
||||
local:
|
||||
path: /disk/etc/home-assistant
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- gauss
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: hass-config-pvc
|
||||
spec:
|
||||
storageClassName: hass-config-sc
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 16Gi
|
||||
Reference in New Issue
Block a user