Skip to content

Commit

Permalink
feat: add home assistant
Browse files Browse the repository at this point in the history
  • Loading branch information
egvimo committed Oct 10, 2024
1 parent 6c539f1 commit a8f16ee
Show file tree
Hide file tree
Showing 11 changed files with 160 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/home-assistant/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
11 changes: 11 additions & 0 deletions charts/home-assistant/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v2
name: home-assistant
description: Home automation that puts local control and privacy first
type: application
version: 0.1.0
# renovate: image=ghcr.io/home-assistant/home-assistant
appVersion: "2024.10.1"
dependencies:
- name: common
version: 0.1.0
repository: file://../common
5 changes: 5 additions & 0 deletions charts/home-assistant/ci/max-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
persistence:
enabled: true
size: 100Mi

timezone: America/New_York
2 changes: 2 additions & 0 deletions charts/home-assistant/ci/min-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
persistence:
enabled: false
7 changes: 7 additions & 0 deletions charts/home-assistant/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{- include "common.configmap" (list . "home-assistant.configmap") -}}
{{- define "home-assistant.configmap" -}}
data:
configuration.yaml: |-
default_config:
{{- .Values.config | toYaml | nindent 4 }}
{{- end -}}
43 changes: 43 additions & 0 deletions charts/home-assistant/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{{- include "common.deployment" (list . "home-assistant.deployment") -}}
{{- define "home-assistant.deployment" -}}
spec:
strategy:
type: Recreate
template:
spec:
containers:
- env:
- name: TZ
value: {{ .Values.timezone | default "Europe/Berlin" | quote }}
ports:
- name: http
containerPort: 8123
protocol: TCP
livenessProbe:
httpGet:
path: /manifest.json
port: http
readinessProbe:
httpGet:
path: /manifest.json
port: http
volumeMounts:
- name: config
mountPath: /config
- name: configuration
mountPath: /config/configuration.yaml
subPath: configuration.yaml
{{- include "common.container" . | nindent 10 }}
hostNetwork: true
volumes:
- name: config
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "common.fullname" . }}
{{- else }}
emptyDir: {}
{{- end }}
- name: configuration
configMap:
name: {{ include "common.fullname" . }}
{{- end -}}
1 change: 1 addition & 0 deletions charts/home-assistant/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "common.ingress" . }}
1 change: 1 addition & 0 deletions charts/home-assistant/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "common.pvc" . }}
1 change: 1 addition & 0 deletions charts/home-assistant/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "common.service" . }}
1 change: 1 addition & 0 deletions charts/home-assistant/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "common.test-connection" . }}
65 changes: 65 additions & 0 deletions charts/home-assistant/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
replicaCount: 1

image:
repository: ghcr.io/home-assistant/home-assistant
pullPolicy: IfNotPresent
tag: "" # Defaults to chart appVersion

nameOverride: ""
fullnameOverride: ""

podAnnotations: {}

podSecurityContext: {}

securityContext:
privileged: true
capabilities:
add:
- NET_ADMIN
- NET_RAW
- SYS_ADMIN

service:
type: ClusterIP
port: 80

ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: traefik
hosts:
- host: home-assistant.192-168-178-31.sslip.io
paths:
- path: /
pathType: ImplementationSpecific

resources:
requests:
memory: "256Mi"
cpu: "150m"
limits:
memory: "512Mi"
cpu: "1500m"

nodeSelector: {}

tolerations: []

affinity: {}

persistence:
enabled: false
annotations: {}
storageClass: ""
accessModes:
- ReadWriteOnce
size: 250Mi

timezone: "" # Defaults to 'Europe/Berlin'

config:
http:
use_x_forwarded_for: true
trusted_proxies:
- 10.42.0.0/16

0 comments on commit a8f16ee

Please sign in to comment.