Skip to content

Commit

Permalink
feat(apps): deploy home assistant
Browse files Browse the repository at this point in the history
  • Loading branch information
luissimas committed Oct 19, 2024
1 parent 9fa9d1c commit 8f45dd7
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 0 deletions.
31 changes: 31 additions & 0 deletions apps/home-assistant/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: home-assistant
namespace: home-assistant
labels:
app.kubernetes.io/name: home-assistant
spec:
selector:
matchLabels:
app.kubernetes.io/name: home-assistant
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/name: home-assistant
spec:
containers:
- name: home-assistant
image: "ghcr.io/home-assistant/home-assistant:stable"
ports:
- name: http
containerPort: 8123
protocol: TCP
volumeMounts:
- mountPath: /config
name: config
volumes:
- name: config
persistentVolumeClaim:
claimName: home-assistant-data
30 changes: 30 additions & 0 deletions apps/home-assistant/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: home-assistant
namespace: home-assistant
labels:
app.kubernetes.io/name: home-assistant
annotations:
gethomepage.dev/name: home-assistant
gethomepage.dev/description: Home
gethomepage.dev/enabled: "true"
gethomepage.dev/group: Recipes
gethomepage.dev/icon: home-assistant.png
gethomepage.dev/pod-selector: "app.kubernetes.io/name=home-assistant"
spec:
tls:
- hosts:
- home-assistant.totorinho.duckdns.org
secretName: duckdns-wildcard-cert-totorinho.duckdns.org
rules:
- host: home-assistant.totorinho.duckdns.org
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: home-assistant
port:
number: 8123
8 changes: 8 additions & 0 deletions apps/home-assistant/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./pvc.yaml
- ./deployment.yaml
- ./ingress.yaml
- ./service.yaml
4 changes: 4 additions & 0 deletions apps/home-assistant/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: home-assistant
15 changes: 15 additions & 0 deletions apps/home-assistant/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: home-assistant-data
namespace: home-assistant
labels:
app.kubernetes.io/name: home-assistant
spec:
storageClassName: local-path
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

13 changes: 13 additions & 0 deletions apps/home-assistant/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: home-assistant
namespace: home-assistant
labels:
app.kubernetes.io/name: home-assistant
spec:
selector:
app.kubernetes.io/name: home-assistant
ports:
- port: 8123
targetPort: 8123
1 change: 1 addition & 0 deletions apps/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ resources:
- zettelkasten-exporter
- traggo
- shiori
- home-assistant

0 comments on commit 8f45dd7

Please sign in to comment.