continuos deploy
This commit is contained in:
60
deploy/deployment.yaml
Normal file
60
deploy/deployment.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: home-assistant-config
|
||||
namespace: home-assistant
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 8Gi
|
||||
storageClassName: local-path
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: home-assistant
|
||||
namespace: home-assistant
|
||||
labels:
|
||||
app: home-assistant
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: home-assistant
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: home-assistant
|
||||
spec:
|
||||
dnsPolicy: ClusterFirstWithHostNet # ensures pod uses cluster DNS (CoreDNS) for service discovery even with host networking
|
||||
hostNetwork: true
|
||||
# delays start so host have time to start on low memory resources
|
||||
# initContainers:
|
||||
# - name: delay-start
|
||||
# image: busybox:latest
|
||||
# command: ["sh", "-c", "sleep 60"]
|
||||
containers:
|
||||
- name: home-assistant
|
||||
image: "homeassistant/home-assistant"
|
||||
env:
|
||||
- name: TZ
|
||||
value: Europe/Lisbon # set timezone
|
||||
volumeMounts:
|
||||
- name: home-assistant-config
|
||||
mountPath: /config
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "400m"
|
||||
limits:
|
||||
memory: "724Mi"
|
||||
cpu: "1000m"
|
||||
volumes:
|
||||
- name: home-assistant-config
|
||||
persistentVolumeClaim:
|
||||
claimName: home-assistant-config
|
||||
Reference in New Issue
Block a user