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
|
||||
version: 1.0.0
|
||||
name: home-assistant
|
||||
dependencies:
|
||||
- name: common
|
||||
version: 1.0.0
|
||||
repository: file://../../common
|
||||
|
||||
@@ -1,10 +1 @@
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: OidcClient
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
redirectUris:
|
||||
- path: /auth/openid/callback
|
||||
subdomain: "{{ .Values.subdomain }}"
|
||||
matchingMode: strict
|
||||
{{ include "common.oidc" . }}
|
||||
|
||||
@@ -1,51 +1 @@
|
||||
apiVersion: apps/v1
|
||||
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
|
||||
{{ include "common.deployment" . }}
|
||||
|
||||
@@ -1,11 +1 @@
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-config"
|
||||
spec:
|
||||
accessModes:
|
||||
- "ReadWriteOnce"
|
||||
resources:
|
||||
requests:
|
||||
storage: "1Gi"
|
||||
storageClassName: "{{ .Values.globals.environment }}"
|
||||
{{ include "common.pvc" . }}
|
||||
|
||||
@@ -1,15 +1 @@
|
||||
apiVersion: v1
|
||||
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 }}"
|
||||
{{ include "common.service" . }}
|
||||
|
||||
@@ -1,39 +1 @@
|
||||
apiVersion: networking.istio.io/v1
|
||||
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
|
||||
|
||||
{{ include "common.virtualService" . }}
|
||||
|
||||
@@ -2,7 +2,57 @@ image:
|
||||
repository: ghcr.io/home-assistant/home-assistant
|
||||
tag: 2025.12.5@sha256:9a5a3eb4a213dfb25932dee9dc6815c9305f78cecb5afa716fa2483163d8fb5b
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
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:
|
||||
image:
|
||||
repository: ghcr.io/morten-olsen/glados-voice
|
||||
|
||||
@@ -15,7 +15,6 @@ subdomain: n8n
|
||||
deployment:
|
||||
strategy: RollingUpdate
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 0
|
||||
|
||||
# Container configuration (multiple ports)
|
||||
container:
|
||||
|
||||
@@ -9,7 +9,6 @@ subdomain: readeck
|
||||
deployment:
|
||||
strategy: Recreate
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 0
|
||||
|
||||
# Container configuration
|
||||
container:
|
||||
|
||||
@@ -286,7 +286,11 @@ spec:
|
||||
strategy:
|
||||
type: {{ include "common.deploymentStrategy" . }}
|
||||
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:
|
||||
matchLabels:
|
||||
{{- include "common.selectorLabels" . | nindent 6 }}
|
||||
@@ -301,6 +305,9 @@ spec:
|
||||
{{- if .Values.deployment.hostNetwork }}
|
||||
hostNetwork: {{ .Values.deployment.hostNetwork }}
|
||||
{{- end }}
|
||||
{{- if .Values.deployment.dnsPolicy }}
|
||||
dnsPolicy: {{ .Values.deployment.dnsPolicy }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
@@ -313,6 +320,10 @@ spec:
|
||||
readinessProbe:
|
||||
{{ include "common.healthProbe" . | indent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.container.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.container.securityContext | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.volumes }}
|
||||
volumeMounts:
|
||||
{{ include "common.volumeMounts" . | indent 12 }}
|
||||
|
||||
Reference in New Issue
Block a user