added homeassistant
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
namespace: homeassistant
|
||||
name: home-assistant
|
||||
labels:
|
||||
app: home-assistant
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: home-assistant
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: home-assistant
|
||||
spec:
|
||||
containers:
|
||||
- name: home-assistant
|
||||
image: "ghcr.io/home-assistant/home-assistant:stable"
|
||||
imagePullPolicy: Always
|
||||
securityContext:
|
||||
privileged: true
|
||||
ports:
|
||||
- containerPort: 8123
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: home-assistant-config-volume
|
||||
- mountPath: /etc/localtime
|
||||
name: home-assistant-time-volume
|
||||
readOnly: true
|
||||
#hostNetwork: true
|
||||
volumes:
|
||||
- name: home-assistant-config-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: home-assistant-pvc
|
||||
- name: home-assistant-time-volume
|
||||
hostPath:
|
||||
path: /etc/localtime
|
||||
@@ -0,0 +1,4 @@
|
||||
kind: Namespace
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: homeassistant
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
annotations:
|
||||
pv.kubernetes.io/provisioned-by: nfs.csi.k8s.io
|
||||
name: home-assistant-config-pv
|
||||
spec:
|
||||
capacity:
|
||||
storage: 20Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: nfs-csi
|
||||
mountOptions:
|
||||
- nfsvers=4.1
|
||||
csi:
|
||||
driver: nfs.csi.k8s.io
|
||||
# volumeHandle format: {nfs-server-address}#{sub-dir-name}#{share-name}
|
||||
# make sure this value is unique for every share in the cluster
|
||||
volumeHandle: nfs-server.default.svc.cluster.local/share##
|
||||
volumeAttributes:
|
||||
server: 192.168.0.40
|
||||
share: /volume1/kubernetes/homeassistant
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: home-assistant-pvc
|
||||
namespace: homeassistant
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
||||
volumeName: home-assistant-config-pv
|
||||
storageClassName: nfs-csi
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: home-assistant-lb
|
||||
namespace: homeassistant
|
||||
labels:
|
||||
app: home-assistant
|
||||
spec:
|
||||
ports:
|
||||
- port: 8123
|
||||
targetPort: 8123
|
||||
name: home-assistant-web
|
||||
selector:
|
||||
app: home-assistant
|
||||
type: LoadBalancer
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "false"
|
||||
name: host-path
|
||||
provisioner: kubernetes.io/host-path
|
||||
reclaimPolicy: Delete
|
||||
volumeBindingMode: Immediate
|
||||
Reference in New Issue
Block a user