initial refactor

This commit is contained in:
2025-06-07 16:33:55 -04:00
parent 5ac011f02b
commit b09446668d
249 changed files with 74 additions and 186 deletions

32
apps/immich/cluster.yaml Normal file
View File

@@ -0,0 +1,32 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: immich-postgres
namespace: immich
spec:
imageName: ghcr.io/tensorchord/cloudnative-vectorchord:17-0.3.0
instances: 1
postgresql:
shared_preload_libraries:
- "vchord.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 "vchord" CASCADE;
- CREATE EXTENSION IF NOT EXISTS "earthdistance" CASCADE;
storage:
size: 8Gi
storageClass: longhorn

View File

@@ -0,0 +1,15 @@
apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
name: immich.michaelthomson.dev
namespace: immich
spec:
endpoints:
- dnsName: immich.michaelthomson.dev
recordTTL: 180
recordType: CNAME
targets:
- michaelthomson.ddns.net
providerSpecific:
- name: external-dns.alpha.kubernetes.io/cloudflare-proxied
value: "true"

View File

@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: immich-postgres-user
namespace: immich
type: Opaque
stringData:
username: immich
password: immich

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: immich

12
apps/immich/pvc-data.yaml Normal file
View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: immich-data
namespace: immich
spec:
accessModes:
- ReadWriteOnce
storageClassName: nfs-client
resources:
requests:
storage: 1Ti

52
apps/immich/release.yaml Normal file
View File

@@ -0,0 +1,52 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: immich
namespace: immich
spec:
chart:
spec:
chart: immich
version: 0.x
sourceRef:
kind: HelmRepository
name: immich
interval: 15m
timeout: 5m
releaseName: immich
values:
env:
DB_HOSTNAME: "immich-postgres-rw"
DB_USERNAME: "immich"
DB_DATABASE_NAME: "immich"
DB_PASSWORD: "immich"
image:
tag: v1.134.0
immich:
persistence:
library:
existingClaim: immich-data
redis:
enabled: true
server:
enabled: true
ingress:
main:
enabled: true
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
hosts:
- host: immich.michaelthomson.dev
paths:
- path: "/"
tls:
- hosts:
- immich.michaelthomson.dev
secretName: letsencrypt-wildcard-cert-michaelthomson.dev
machine-learning:
enabled: true

View File

@@ -0,0 +1,8 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: immich
namespace: immich
spec:
interval: 15m
url: https://immich-app.github.io/immich-charts