chore(immich): First immich deployment
All checks were successful
Validate K8s manifests / validate-manifests (push) Successful in 1m6s

This commit is contained in:
Daniël Groothuis
2025-10-25 20:02:23 +02:00
parent fd175b27cf
commit 96513f659c
5 changed files with 112 additions and 16 deletions

View File

@@ -0,0 +1,30 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: immich-postgres
namespace: immich
spec:
imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.5-v0.3.0@sha256:be3f025d79aa1b747817f478e07e71be43236e14d00d8a9eb3914146245035ba
instances: 1
postgresql:
shared_preload_libraries:
- "vectors.so"
managed:
roles:
- name: immich
superuser: true
login: true
bootstrap:
initdb:
database: immich
owner: immich
secret:
name: immich-postgres-user
postInitSQL:
- CREATE EXTENSION IF NOT EXISTS "vectors";
- CREATE EXTENSION IF NOT EXISTS "cube" CASCADE;
- CREATE EXTENSION IF NOT EXISTS "earthdistance" CASCADE;
storage:
size: 4Gi
storageClass: local-path

View File

@@ -4,9 +4,14 @@ kind: Kustomization
metadata:
name: immich
resources:
- secret.yaml
- db-cluster.yaml
- volumeClaims.yaml
helmCharts:
- name: immich/immich
repo: https://immich-app.github.io/immich-charts
- name: immich
repo: https://immich-app.github.io/immich-charts/immich
version: 0.10.1
releaseName: immich
namespace: immich

View File

@@ -0,0 +1,33 @@
---
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: immich
spec:
refreshInterval: 1h
secretStoreRef:
name: platform
kind: ClusterSecretStore
target:
name: immich-postgres-user
data:
- secretKey: DB_USERNAME
remoteRef:
key: immich/db
property: DB_USERNAME
- secretKey: DB_DATABASE_NAME
remoteRef:
key: immich/db
property: DB_DATABASE_NAME
- secretKey: DB_PASSWORD
remoteRef:
key: immich/db
property: DB_PASSWORD
- secretKey: username
remoteRef:
key: immich/db
property: username
- secretKey: password
remoteRef:
key: immich/db
property: password

View File

@@ -1,9 +1,3 @@
## This chart relies on the common library chart from bjw-s
## You can find it at https://github.com/bjw-s-labs/helm-charts/tree/common-4.3.0/charts/library/common
## Refer there for more detail about the supported values
# These entries are shared between all the Immich components
controllers:
main:
containers:
@@ -13,7 +7,19 @@ controllers:
env:
REDIS_HOSTNAME: '{{ printf "%s-valkey" .Release.Name }}'
IMMICH_MACHINE_LEARNING_URL: '{{ printf "http://%s-machine-learning:3003" .Release.Name }}'
# Add the env vars to connect to your database here.
DB_HOSTNAME: "{{ .Release.Name }}-postgres-rw.immich.svc.cluster.local"
DB_USERNAME:
secretKeyRef:
name: immich-postgres-user
key: username
DB_DATABASE_NAME:
secretKeyRef:
name: immich-postgres-user
key: DB_DATABASE_NAME
DB_PASSWORD:
secretKeyRef:
name: immich-postgres-user
key: password
immich:
metrics:
@@ -24,7 +30,7 @@ immich:
library:
# Automatically creating the library volume is not supported by this chart
# You have to specify an existing PVC to use
existingClaim:
existingClaim: immich-library-pvc
# configuration is immich-config.json converted to yaml
# ref: https://immich.app/docs/install/config-file/
#
@@ -98,12 +104,10 @@ machine-learning:
pullPolicy: IfNotPresent
env:
TRANSFORMERS_CACHE: /cache
HF_XET_CACHE: /cache/huggingface-xet
MPLCONFIGDIR: /cache/matplotlib-config
persistence:
cache:
enabled: true
size: 10Gi
# Optional: Set this to persistentVolumeClaim to avoid downloading the ML models every start.
type: emptyDir
accessMode: ReadWriteMany
# storageClass: your-class
existingClaim: immich-ml-pvc

View File

@@ -0,0 +1,24 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: immich-ml-pvc
spec:
storageClassName: local-path
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: immich-library-pvc
spec:
storageClassName: local-path
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 250Gi