mirror of
https://github.com/morten-olsen/homelab-apps.git
synced 2026-02-08 01:36:28 +01:00
migate homeassistant
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
name: home-assistant
|
name: home-assistant
|
||||||
|
dependencies:
|
||||||
|
- name: common
|
||||||
|
version: 1.0.0
|
||||||
|
repository: file://../../common
|
||||||
|
|||||||
@@ -1,10 +1 @@
|
|||||||
apiVersion: homelab.mortenolsen.pro/v1
|
{{ include "common.oidc" . }}
|
||||||
kind: OidcClient
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}"
|
|
||||||
spec:
|
|
||||||
environment: "{{ .Values.globals.environment }}"
|
|
||||||
redirectUris:
|
|
||||||
- path: /auth/openid/callback
|
|
||||||
subdomain: "{{ .Values.subdomain }}"
|
|
||||||
matchingMode: strict
|
|
||||||
|
|||||||
@@ -1,51 +1 @@
|
|||||||
apiVersion: apps/v1
|
{{ include "common.deployment" . }}
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}"
|
|
||||||
spec:
|
|
||||||
strategy:
|
|
||||||
type: Recreate
|
|
||||||
replicas: 1
|
|
||||||
revisionHistoryLimit: 0
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: "{{ .Release.Name }}"
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: "{{ .Release.Name }}"
|
|
||||||
spec:
|
|
||||||
hostNetwork: true
|
|
||||||
dnsPolicy: ClusterFirstWithHostNet
|
|
||||||
|
|
||||||
containers:
|
|
||||||
- name: "{{ .Release.Name }}"
|
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
||||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
|
||||||
env:
|
|
||||||
- name: TZ
|
|
||||||
value: "{{ .Values.globals.timezone }}"
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8123
|
|
||||||
protocol: TCP
|
|
||||||
livenessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: http
|
|
||||||
readinessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: http
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /config
|
|
||||||
name: config
|
|
||||||
- mountPath: /media/misc
|
|
||||||
name: misc
|
|
||||||
securityContext:
|
|
||||||
privileged: true
|
|
||||||
volumes:
|
|
||||||
- name: config
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: "{{ .Release.Name }}-config"
|
|
||||||
- name: misc
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: misc
|
|
||||||
|
|||||||
@@ -1,11 +1 @@
|
|||||||
kind: PersistentVolumeClaim
|
{{ include "common.pvc" . }}
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-config"
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- "ReadWriteOnce"
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: "1Gi"
|
|
||||||
storageClassName: "{{ .Values.globals.environment }}"
|
|
||||||
|
|||||||
@@ -1,15 +1 @@
|
|||||||
apiVersion: v1
|
{{ include "common.service" . }}
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}"
|
|
||||||
labels:
|
|
||||||
app: "{{ .Release.Name }}"
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
targetPort: 8123
|
|
||||||
protocol: TCP
|
|
||||||
name: http
|
|
||||||
selector:
|
|
||||||
app: "{{ .Release.Name }}"
|
|
||||||
|
|||||||
@@ -1,39 +1 @@
|
|||||||
apiVersion: networking.istio.io/v1
|
{{ include "common.virtualService" . }}
|
||||||
kind: VirtualService
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-public"
|
|
||||||
namespace: "{{ .Release.Namespace }}"
|
|
||||||
spec:
|
|
||||||
gateways:
|
|
||||||
- "{{ .Values.globals.istio.gateways.public }}"
|
|
||||||
- mesh
|
|
||||||
hosts:
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- mesh
|
|
||||||
http:
|
|
||||||
- route:
|
|
||||||
- destination:
|
|
||||||
host: "{{ .Release.Name }}"
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: networking.istio.io/v1
|
|
||||||
kind: VirtualService
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-private"
|
|
||||||
namespace: "{{ .Release.Namespace }}"
|
|
||||||
spec:
|
|
||||||
gateways:
|
|
||||||
- "{{ .Values.globals.istio.gateways.private }}"
|
|
||||||
- mesh
|
|
||||||
hosts:
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- mesh
|
|
||||||
http:
|
|
||||||
- route:
|
|
||||||
- destination:
|
|
||||||
host: "{{ .Release.Name }}"
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,57 @@ image:
|
|||||||
repository: ghcr.io/home-assistant/home-assistant
|
repository: ghcr.io/home-assistant/home-assistant
|
||||||
tag: 2025.12.5@sha256:9a5a3eb4a213dfb25932dee9dc6815c9305f78cecb5afa716fa2483163d8fb5b
|
tag: 2025.12.5@sha256:9a5a3eb4a213dfb25932dee9dc6815c9305f78cecb5afa716fa2483163d8fb5b
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
subdomain: home-assistant
|
subdomain: home-assistant
|
||||||
|
|
||||||
|
# Deployment configuration
|
||||||
|
deployment:
|
||||||
|
strategy: Recreate
|
||||||
|
replicas: 1
|
||||||
|
hostNetwork: true
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
|
|
||||||
|
# Container configuration
|
||||||
|
container:
|
||||||
|
port: 8123
|
||||||
|
healthProbe:
|
||||||
|
type: tcpSocket
|
||||||
|
port: http # Use named port
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
|
||||||
|
# Service configuration
|
||||||
|
service:
|
||||||
|
port: 80
|
||||||
|
type: ClusterIP
|
||||||
|
|
||||||
|
# VirtualService configuration
|
||||||
|
virtualService:
|
||||||
|
enabled: true
|
||||||
|
gateways:
|
||||||
|
public: true
|
||||||
|
private: true
|
||||||
|
|
||||||
|
# OIDC client configuration
|
||||||
|
oidc:
|
||||||
|
enabled: true
|
||||||
|
redirectUris:
|
||||||
|
- "/auth/openid/callback"
|
||||||
|
subjectMode: user_username
|
||||||
|
|
||||||
|
# Volume configuration
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
mountPath: /config
|
||||||
|
persistentVolumeClaim: config
|
||||||
|
- name: misc
|
||||||
|
mountPath: /media/misc
|
||||||
|
persistentVolumeClaim: misc # External PVC, not prefixed
|
||||||
|
|
||||||
|
# Persistent volume claims
|
||||||
|
persistentVolumeClaims:
|
||||||
|
- name: config
|
||||||
|
size: 1Gi
|
||||||
piper:
|
piper:
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/morten-olsen/glados-voice
|
repository: ghcr.io/morten-olsen/glados-voice
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ subdomain: n8n
|
|||||||
deployment:
|
deployment:
|
||||||
strategy: RollingUpdate
|
strategy: RollingUpdate
|
||||||
replicas: 1
|
replicas: 1
|
||||||
revisionHistoryLimit: 0
|
|
||||||
|
|
||||||
# Container configuration (multiple ports)
|
# Container configuration (multiple ports)
|
||||||
container:
|
container:
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ subdomain: readeck
|
|||||||
deployment:
|
deployment:
|
||||||
strategy: Recreate
|
strategy: Recreate
|
||||||
replicas: 1
|
replicas: 1
|
||||||
revisionHistoryLimit: 0
|
|
||||||
|
|
||||||
# Container configuration
|
# Container configuration
|
||||||
container:
|
container:
|
||||||
|
|||||||
@@ -286,7 +286,11 @@ spec:
|
|||||||
strategy:
|
strategy:
|
||||||
type: {{ include "common.deploymentStrategy" . }}
|
type: {{ include "common.deploymentStrategy" . }}
|
||||||
replicas: {{ .Values.deployment.replicas | default 1 }}
|
replicas: {{ .Values.deployment.replicas | default 1 }}
|
||||||
revisionHistoryLimit: {{ .Values.deployment.revisionHistoryLimit | default 2 }}
|
{{- if hasKey .Values.deployment "revisionHistoryLimit" }}
|
||||||
|
revisionHistoryLimit: {{ .Values.deployment.revisionHistoryLimit }}
|
||||||
|
{{- else }}
|
||||||
|
revisionHistoryLimit: 2
|
||||||
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "common.selectorLabels" . | nindent 6 }}
|
{{- include "common.selectorLabels" . | nindent 6 }}
|
||||||
@@ -301,6 +305,9 @@ spec:
|
|||||||
{{- if .Values.deployment.hostNetwork }}
|
{{- if .Values.deployment.hostNetwork }}
|
||||||
hostNetwork: {{ .Values.deployment.hostNetwork }}
|
hostNetwork: {{ .Values.deployment.hostNetwork }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.deployment.dnsPolicy }}
|
||||||
|
dnsPolicy: {{ .Values.deployment.dnsPolicy }}
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
@@ -313,6 +320,10 @@ spec:
|
|||||||
readinessProbe:
|
readinessProbe:
|
||||||
{{ include "common.healthProbe" . | indent 12 }}
|
{{ include "common.healthProbe" . | indent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.container.securityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.container.securityContext | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.volumes }}
|
{{- if .Values.volumes }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
{{ include "common.volumeMounts" . | indent 12 }}
|
{{ include "common.volumeMounts" . | indent 12 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user