initial installation of homeassistant

This commit is contained in:
Tobias Brunner 2024-01-10 11:22:29 +01:00
parent b330867e1f
commit b66f12baa4
Signed by: tobru
SSH key fingerprint: SHA256:kywVhvCA+MIxL6eBgoQa+BfC/ROJqcfD2bpy1PR6Ebk
6 changed files with 108 additions and 0 deletions

View file

@ -0,0 +1,25 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: configuration
data:
configuration.yaml: |
homeassistant:
name: Home
latitude: 47.38507000
longitude: 8.42581000
elevation: 400
unit_system: metric
time_zone: Europe/Zurich
auth_providers:
- type: homeassistant
default_config:
http:
ip_ban_enabled: false
login_attempts_threshold: 5
use_x_forwarded_for: true
trusted_proxies:
- 10.1.0.0/16

View file

@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: homeassistant
labels:
app: homeassistant
spec:
replicas: 1
selector:
matchLabels:
app: homeassistant
template:
metadata:
labels:
app: homeassistant
spec:
containers:
- name: homeassistant
image: docker.io/homeassistant/home-assistant:2024.1
ports:
- containerPort: 8123
volumeMounts:
- mountPath: /config
name: data
- mountPath: /config/configuration.yaml
subPath: configuration.yaml
name: config
resources: {}
volumes:
- name: config
configMap:
name: configuration
- name: data
persistentVolumeClaim:
claimName: data

View file

@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- pvc.yaml
- configmap.yaml
- deployment.yaml
- service.yaml

View file

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: local-path

View file

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: homeassistant
spec:
type: ClusterIP
selector:
app: homeassistant
ports:
- name: http
protocol: TCP
port: 80
targetPort: 8123

View file

@ -0,0 +1,17 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: home-homeassistant
namespace: argocd
spec:
project: apps-home
source:
path: apps/home/homeassistant
repoURL: https://git.tbrnt.ch/tobru/gitops-zurrli.git
targetRevision: HEAD
destination:
name: home
namespace: homeassistant
syncPolicy:
syncOptions:
- CreateNamespace=true