From 2628e9d7a97e9f88e246bd0a1c36efe619bdbe2d Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Thu, 18 Dec 2025 21:58:06 +0100 Subject: [PATCH] add immich --- apps/charts/immich.disabled/Chart.yaml | 3 + .../immich.disabled/templates/client.yaml | 10 ++ .../immich.disabled/templates/database.yaml | 6 + .../immich.disabled/templates/deployment.yaml | 105 ++++++++++++++++++ .../templates/external-http-service.yaml | 11 ++ .../immich.disabled/templates/service.yaml | 33 ++++++ .../templates/virtual-service.yaml | 18 +++ apps/charts/immich.disabled/values.yaml | 16 +++ 8 files changed, 202 insertions(+) create mode 100644 apps/charts/immich.disabled/Chart.yaml create mode 100644 apps/charts/immich.disabled/templates/client.yaml create mode 100644 apps/charts/immich.disabled/templates/database.yaml create mode 100644 apps/charts/immich.disabled/templates/deployment.yaml create mode 100644 apps/charts/immich.disabled/templates/external-http-service.yaml create mode 100644 apps/charts/immich.disabled/templates/service.yaml create mode 100644 apps/charts/immich.disabled/templates/virtual-service.yaml create mode 100644 apps/charts/immich.disabled/values.yaml diff --git a/apps/charts/immich.disabled/Chart.yaml b/apps/charts/immich.disabled/Chart.yaml new file mode 100644 index 0000000..3457753 --- /dev/null +++ b/apps/charts/immich.disabled/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +version: 1.0.0 +name: immich diff --git a/apps/charts/immich.disabled/templates/client.yaml b/apps/charts/immich.disabled/templates/client.yaml new file mode 100644 index 0000000..e20f15d --- /dev/null +++ b/apps/charts/immich.disabled/templates/client.yaml @@ -0,0 +1,10 @@ +apiVersion: homelab.mortenolsen.pro/v1 +kind: OidcClient +metadata: + name: "{{ .Release.Name }}" +spec: + environment: "{{ .Values.globals.environment }}" + redirectUris: + - path: /api/oauth/mobile-redirect + subdomain: "{{ .Values.subdomain }}" + matchingMode: strict diff --git a/apps/charts/immich.disabled/templates/database.yaml b/apps/charts/immich.disabled/templates/database.yaml new file mode 100644 index 0000000..6a30b53 --- /dev/null +++ b/apps/charts/immich.disabled/templates/database.yaml @@ -0,0 +1,6 @@ +apiVersion: homelab.mortenolsen.pro/v1 +kind: PostgresDatabase +metadata: + name: '{{ .Release.Name }}' +spec: + environment: '{{ .Values.globals.environment }}' diff --git a/apps/charts/immich.disabled/templates/deployment.yaml b/apps/charts/immich.disabled/templates/deployment.yaml new file mode 100644 index 0000000..6b7441f --- /dev/null +++ b/apps/charts/immich.disabled/templates/deployment.yaml @@ -0,0 +1,105 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: "{{ .Release.Name }}-server" +spec: + strategy: + type: Recreate + replicas: 1 + revisionHistoryLimit: 0 + selector: + matchLabels: + app: "{{ .Release.Name }}-server" + template: + metadata: + labels: + app: "{{ .Release.Name }}-server" + spec: + containers: + - name: "{{ .Release.Name }}-server" + image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}" + imagePullPolicy: "{{ .Values.server.image.pullPolicy }}" + env: + - name: DB_URL + valueFrom: + secretKeyRef: + name: "{{ .Release.Name }}-pg-connection" + key: url + - name: DB_VECTOR_EXTENSION + value: pgvector + - name: REDIS_HOST + value: "{{ .Release.name }}-valkey.{{ .Release.Namespace }}.svc.cluster.local" + - name: IMMICH_PORT + value: "3003" + ports: + - name: http + containerPort: 3003 + protocol: TCP + livenessProbe: + tcpSocket: + port: http + readinessProbe: + tcpSocket: + port: http + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: "{{ .Release.Name }}-ml" +spec: + strategy: + type: Recreate + replicas: 1 + revisionHistoryLimit: 0 + selector: + matchLabels: + app: "{{ .Release.Name }}-ml" + template: + metadata: + labels: + app: "{{ .Release.Name }}-ml" + spec: + containers: + - name: "{{ .Release.Name }}-ml" + image: "{{ .Values.ml.image.repository }}:{{ .Values.ml.image.tag }}" + imagePullPolicy: "{{ .Values.ml.image.pullPolicy }}" + env: + - name: DB_URL + valueFrom: + secretKeyRef: + name: "{{ .Release.Name }}-pg-connection" + key: url + # - name: DB_VECTOR_EXTENSION + # value: pgvector + - name: REDIS_HOST + value: "{{ .Release.name }}-valkey" + - name: IMMICH_PORT + value: "3003" +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: "{{ .Release.Name }}-valkey" +spec: + strategy: + type: Recreate + replicas: 1 + revisionHistoryLimit: 0 + selector: + matchLabels: + app: "{{ .Release.Name }}-valkey" + template: + metadata: + labels: + app: "{{ .Release.Name }}-valkey" + spec: + containers: + - name: "{{ .Release.Name }}-valkey" + image: "{{ .Values.valkey.image.repository }}:{{ .Values.valkey.image.tag }}" + imagePullPolicy: "{{ .Values.valkey.image.pullPolicy }}" + ports: + - name: tcp + containerPort: 6379 + protocol: TCP + diff --git a/apps/charts/immich.disabled/templates/external-http-service.yaml b/apps/charts/immich.disabled/templates/external-http-service.yaml new file mode 100644 index 0000000..f865728 --- /dev/null +++ b/apps/charts/immich.disabled/templates/external-http-service.yaml @@ -0,0 +1,11 @@ +apiVersion: homelab.mortenolsen.pro/v1 +kind: ExternalHttpService +metadata: + name: "{{ .Release.Name }}" +spec: + environment: "{{ .Values.globals.environment }}" + subdomain: "{{ .Values.subdomain }}" + destination: + host: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local" + port: + number: 80 diff --git a/apps/charts/immich.disabled/templates/service.yaml b/apps/charts/immich.disabled/templates/service.yaml new file mode 100644 index 0000000..8ad857d --- /dev/null +++ b/apps/charts/immich.disabled/templates/service.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +kind: Service +metadata: + name: "{{ .Release.Name }}-valkey" + labels: + app: "{{ .Release.Name }}-valkey" +spec: + type: ClusterIP + ports: + - port: 6379 + targetPort: 6379 + protocol: TCP + name: tcp + selector: + app: "{{ .Release.Name }}-valkey" + +--- +apiVersion: v1 +kind: Service +metadata: + name: "{{ .Release.Name }}" + labels: + app: "{{ .Release.Name }}" +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: 3003 + protocol: TCP + name: http + selector: + app: "{{ .Release.Name }}" + diff --git a/apps/charts/immich.disabled/templates/virtual-service.yaml b/apps/charts/immich.disabled/templates/virtual-service.yaml new file mode 100644 index 0000000..0af9b24 --- /dev/null +++ b/apps/charts/immich.disabled/templates/virtual-service.yaml @@ -0,0 +1,18 @@ +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: "{{ .Release.Name }}" + namespace: "{{ .Release.Namespace }}" +spec: + gateways: + - "{{ .Values.globals.istio.gateway }}" + - mesh + hosts: + - "{{ .Values.subdomain }}.{{ .Values.globals.domain }}" + - mesh + http: + - route: + - destination: + host: "{{ .Release.Name }}" + port: + number: 80 diff --git a/apps/charts/immich.disabled/values.yaml b/apps/charts/immich.disabled/values.yaml new file mode 100644 index 0000000..43fc55f --- /dev/null +++ b/apps/charts/immich.disabled/values.yaml @@ -0,0 +1,16 @@ +subdomain: penpot +server: + image: + repository: ghcr.io/immich-app/immich-server + tag: release + pullPolicy: IfNotPresent +ml: + image: + repository: ghcr.io/immich-app/immich-machine-learning + tag: release + pullPolicy: IfNotPresent +valkey: + image: + repository: valkey/valkey + tag: 9.0@sha256:fb8d272e529ea567b9bf1302245796f21a2672b8368ca3fcb938ac334e613c8f + pullPolicy: IfNotPresent