diff --git a/charts/home-assistant/Chart.yaml b/charts/home-assistant/Chart.yaml deleted file mode 100644 index d2209d3..0000000 --- a/charts/home-assistant/Chart.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v2 -name: home-assistant -version: 0.1.16 -description: Chart for Home Assistant -keywords: - - home-automation -sources: - - https://github.com/home-assistant -maintainers: - - name: alexlebens -icon: https://avatars.githubusercontent.com/u/13844975?s=200&v=4 -appVersion: v2024.5.4 diff --git a/charts/home-assistant/README.md b/charts/home-assistant/README.md deleted file mode 100644 index e63ac23..0000000 --- a/charts/home-assistant/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## Introduction - -[Home Assistant](https://www.home-assistant.io/) - -Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. - -This chart bootstraps a [Home-Assistant](https://github.com/home-assistant) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -## Prerequisites - -- Kubernetes -- Helm -- Traefik v2 / IngressRoute -- Authentik / Auth - -## Parameters - -See the [values files](values.yaml). diff --git a/charts/home-assistant/templates/deployment.yaml b/charts/home-assistant/templates/deployment.yaml deleted file mode 100644 index dadd0e2..0000000 --- a/charts/home-assistant/templates/deployment.yaml +++ /dev/null @@ -1,98 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: home-assistant - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} -spec: - revisionHistoryLimit: 3 - replicas: {{ .Values.deployment.replicas }} - strategy: - type: {{ .Values.deployment.strategy }} - selector: - matchLabels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - spec: - serviceAccountName: {{ .Release.Name }} - automountServiceAccountToken: true - containers: - - name: {{ .Release.Name }} - image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}" - imagePullPolicy: {{ .Values.deployment.image.imagePullPolicy }} - ports: - - name: http - containerPort: {{ .Values.service.http.port }} - protocol: TCP - env: - {{- range $k,$v := .Values.deployment.env }} - - name: {{ $k }} - value: {{ $v | quote }} - {{- end }} - {{- with .Values.deployment.envFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - volumeMounts: - - mountPath: /config - name: home-assistant-config - resources: - {{- toYaml .Values.deployment.resources | nindent 12 }} - livenessProbe: - tcpSocket: - port: {{ .Values.service.http.port }} - initialDelaySeconds: 0 - failureThreshold: 3 - timeoutSeconds: 1 - periodSeconds: 10 - readinessProbe: - tcpSocket: - port: {{ .Values.service.http.port }} - initialDelaySeconds: 0 - failureThreshold: 3 - timeoutSeconds: 1 - periodSeconds: 10 - startupProbe: - tcpSocket: - port: {{ .Values.service.http.port }} - initialDelaySeconds: 0 - failureThreshold: 30 - timeoutSeconds: 1 - periodSeconds: 5 - {{- if .Values.codeserver.enabled }} - - name: codeserver - image: "{{ .Values.codeserver.image.repository }}:{{ .Values.codeserver.image.tag }}" - imagePullPolicy: {{ .Values.codeserver.image.imagePullPolicy }} - ports: - - containerPort: {{ .Values.codeserver.service.http.port }} - name: codeserver-http - protocol: TCP - env: - {{- range $k,$v := .Values.codeserver.env }} - - name: {{ $k }} - value: {{ $v | quote }} - {{- end }} - {{- with .Values.codeserver.envFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.codeserver.securityContext | nindent 12 }} - volumeMounts: - - mountPath: /config/home-assistant - name: home-assistant-config - {{- end }} - volumes: - - name: home-assistant-config - persistentVolumeClaim: - claimName: "{{ .Release.Name }}-config" diff --git a/charts/home-assistant/templates/ingress-route.yaml b/charts/home-assistant/templates/ingress-route.yaml deleted file mode 100644 index 1c82f22..0000000 --- a/charts/home-assistant/templates/ingress-route.yaml +++ /dev/null @@ -1,72 +0,0 @@ -{{- if .Values.ingressRoute.enabled }} -apiVersion: traefik.io/v1alpha1 -kind: IngressRoute -metadata: - name: {{ .Release.Name }} - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} -spec: - entryPoints: - - websecure - routes: - - kind: Rule - match: "Host(`{{ .Values.ingressRoute.host }}`)" - middlewares: - - name: "authentik-{{ .Release.Name }}" - namespace: {{ .Release.Namespace }} - priority: 10 - services: - - kind: Service - name: {{ .Release.Name }} - port: {{ .Values.service.http.port }} - - kind: Rule - match: "Host(`{{ .Values.ingressRoute.host }}`) && PathPrefix(`/outpost.goauthentik.io/`)" - priority: 15 - services: - - kind: Service - name: {{ .Values.ingressRoute.authentik.outpost }} - port: {{ .Values.ingressRoute.authentik.port }} - namespace: {{ .Values.ingressRoute.authentik.namespace }} -{{- end }} - ---- -{{- if and .Values.codeserver.ingressRoute.enabled .Values.codeserver.enabled }} -apiVersion: traefik.io/v1alpha1 -kind: IngressRoute -metadata: - name: "{{ .Release.Name }}-codeserver" - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} -spec: - entryPoints: - - websecure - routes: - - kind: Rule - match: "Host(`{{ .Values.codeserver.ingressRoute.host }}`)" - middlewares: - - name: "authentik-{{ .Release.Name }}" - namespace: {{ .Release.Namespace }} - priority: 10 - services: - - kind: Service - name: "{{ .Release.Name }}-codeserver" - port: {{ .Values.codeserver.service.http.port }} - - kind: Rule - match: "Host(`{{ .Values.ingressRoute.host }}`) && PathPrefix(`/outpost.goauthentik.io/`)" - priority: 15 - services: - - kind: Service - name: {{ .Values.ingressRoute.authentik.outpost }} - port: {{ .Values.ingressRoute.authentik.port }} - namespace: {{ .Values.ingressRoute.authentik.namespace }} -{{- end }} diff --git a/charts/home-assistant/templates/middleware.yaml b/charts/home-assistant/templates/middleware.yaml deleted file mode 100644 index b34c03b..0000000 --- a/charts/home-assistant/templates/middleware.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if .Values.ingressRoute.enabled }} -apiVersion: traefik.io/v1alpha1 -kind: Middleware -metadata: - name: "authentik-{{ .Release.Name }}" - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: auth - app.kubernetes.io/part-of: {{ .Release.Name }} -spec: - forwardAuth: - address: "http://{{ .Values.ingressRoute.authentik.outpost }}.authentik:{{ .Values.ingressRoute.authentik.port }}/outpost.goauthentik.io/auth/traefik" - trustForwardHeader: true - authResponseHeaders: - - X-authentik-username - - X-authentik-groups - - X-authentik-email - - X-authentik-name - - X-authentik-uid - - X-authentik-jwt - - X-authentik-meta-jwks - - X-authentik-meta-outpost - - X-authentik-meta-provider - - X-authentik-meta-app - - X-authentik-meta-version -{{- end }} diff --git a/charts/home-assistant/templates/persistant-volume-claim.yaml b/charts/home-assistant/templates/persistant-volume-claim.yaml deleted file mode 100644 index 3bd781a..0000000 --- a/charts/home-assistant/templates/persistant-volume-claim.yaml +++ /dev/null @@ -1,19 +0,0 @@ -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: "{{ .Release.Name }}-config" - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.persistence.config.storageSize }} - storageClassName: {{ .Values.persistence.config.storageClassName }} - volumeMode: {{ .Values.persistence.config.volumeMode }} diff --git a/charts/home-assistant/templates/prometheus-rule.yaml b/charts/home-assistant/templates/prometheus-rule.yaml deleted file mode 100644 index 8088d3e..0000000 --- a/charts/home-assistant/templates/prometheus-rule.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - name: {{ .Release.Name }} - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} -spec: - groups: - - name: {{ .Release.Name }} - rules: - {{- toYaml .Values.metrics.prometheusRule.rules | nindent 8 }} -{{- end }} diff --git a/charts/home-assistant/templates/service-account.yaml b/charts/home-assistant/templates/service-account.yaml deleted file mode 100644 index a437092..0000000 --- a/charts/home-assistant/templates/service-account.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Release.Name }} - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} diff --git a/charts/home-assistant/templates/service-monitor.yaml b/charts/home-assistant/templates/service-monitor.yaml deleted file mode 100644 index 604f0d9..0000000 --- a/charts/home-assistant/templates/service-monitor.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if .Values.metrics.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ .Release.Name }} - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} -spec: - selector: - matchLabels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - endpoints: - - port: http - interval: {{ .Values.metrics.serviceMonitor.interval }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - path: /api/prometheus - bearerTokenSecret: - name: {{ .Values.metrics.serviceMonitor.bearerTokenSecret.name }} - key: {{ .Values.metrics.serviceMonitor.bearerTokenSecret.key }} -{{- end }} diff --git a/charts/home-assistant/templates/service.yaml b/charts/home-assistant/templates/service.yaml deleted file mode 100644 index 831c486..0000000 --- a/charts/home-assistant/templates/service.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Release.Name }} - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} -spec: - type: ClusterIP - ports: - - port: {{ .Values.service.http.port }} - targetPort: http - protocol: TCP - name: http - selector: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - ---- -{{- if .Values.codeserver.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: "{{ .Release.Name }}-codeserver" - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} -spec: - type: ClusterIP - ports: - - port: {{ .Values.codeserver.service.http.port }} - targetPort: codeserver-http - protocol: TCP - name: codeserver-http - selector: - app.kubernetes.io/name: {{ .Release.Name }} - app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} diff --git a/charts/home-assistant/values.yaml b/charts/home-assistant/values.yaml deleted file mode 100644 index 41d42b3..0000000 --- a/charts/home-assistant/values.yaml +++ /dev/null @@ -1,75 +0,0 @@ -deployment: - replicas: 1 - strategy: Recreate - image: - repository: homeassistant/home-assistant - tag: 2024.5.4 - imagePullPolicy: IfNotPresent - env: - TZ: UTC - envFrom: - resources: - requests: - memory: 512Mi - cpu: 50m - limits: - memory: 1Gi - cpu: 500m -service: - http: - port: 8123 -ingressRoute: - enabled: true - host: - authentik: - outpost: "" - port: 9000 - namespace: "" -metrics: - enabled: false - serviceMonitor: - interval: 1m - scrapeTimeout: 30s - ## See https://www.home-assistant.io/docs/authentication/ for where to find - ## long lived access token creation under your account profile, which is - ## needed to monitor Home Assistant - bearerTokenSecret: - name: "" - key: "" - prometheusRule: - enabled: false - rules: - - alert: HomeAssistantAbsent - annotations: - description: Home Assistant has disappeared from Prometheus service discovery. - summary: Home Assistant is down. - expr: | - absent(up{job=~".*home-assistant.*"} == 1) - for: 5m - labels: - severity: critical -persistence: - config: - storageClassName: default - storageSize: 1Gi - volumeMode: Filesystem -codeserver: - enabled: false - image: - repository: linuxserver/code-server - tag: 4.89.1 - imagePullPolicy: IfNotPresent - env: - TZ: UTC - PUID: 1000 - PGID: 1000 - DEFAULT_WORKSPACE: /config - envFrom: - securityContext: - runAsUser: 0 - service: - http: - port: 8443 - ingressRoute: - enabled: false - host: