300 lines
8.6 KiB
YAML
300 lines
8.6 KiB
YAML
immich:
|
|
controllers:
|
|
main:
|
|
type: deployment
|
|
replicas: 0
|
|
strategy: Recreate
|
|
revisionHistoryLimit: 3
|
|
containers:
|
|
main:
|
|
image:
|
|
repository: ghcr.io/immich-app/immich-server
|
|
tag: v2.0.1
|
|
pullPolicy: IfNotPresent
|
|
env:
|
|
- name: TZ
|
|
value: US/Central
|
|
- name: IMMICH_TELEMETRY_INCLUDE
|
|
value: all
|
|
- name: IMMICH_CONFIG_FILE
|
|
value: /config/immich.json
|
|
- name: IMMICH_MACHINE_LEARNING_URL
|
|
value: http://immich-machine-learning.immich:3003
|
|
- name: REDIS_HOSTNAME
|
|
value: redis-replication-immich-master
|
|
- name: DB_VECTOR_EXTENSION
|
|
value: vectorchord
|
|
- name: DB_HOSTNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: immich-postgresql-16-b-cluster-app
|
|
key: host
|
|
- name: DB_DATABASE_NAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: immich-postgresql-16-b-cluster-app
|
|
key: dbname
|
|
- name: DB_PORT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: immich-postgresql-16-b-cluster-app
|
|
key: port
|
|
- name: DB_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: immich-postgresql-16-b-cluster-superuser
|
|
key: user
|
|
- name: DB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: immich-postgresql-16-b-cluster-superuser
|
|
key: password
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
custom: true
|
|
spec:
|
|
httpGet:
|
|
path: /api/server/ping
|
|
port: 2283
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 10
|
|
timeoutSeconds: 1
|
|
failureThreshold: 3
|
|
readiness:
|
|
enabled: true
|
|
custom: true
|
|
spec:
|
|
httpGet:
|
|
path: /api/server/ping
|
|
port: 2283
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 10
|
|
timeoutSeconds: 1
|
|
failureThreshold: 3
|
|
startup:
|
|
enabled: true
|
|
custom: true
|
|
spec:
|
|
httpGet:
|
|
path: /api/server/ping
|
|
port: 2283
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 10
|
|
timeoutSeconds: 1
|
|
failureThreshold: 30
|
|
resources:
|
|
limits:
|
|
gpu.intel.com/i915: 1
|
|
requests:
|
|
gpu.intel.com/i915: 1
|
|
cpu: 10m
|
|
memory: 512Mi
|
|
machine-learning:
|
|
type: deployment
|
|
replicas: 0
|
|
strategy: Recreate
|
|
revisionHistoryLimit: 3
|
|
containers:
|
|
main:
|
|
image:
|
|
repository: ghcr.io/immich-app/immich-machine-learning
|
|
tag: v2.0.1
|
|
pullPolicy: IfNotPresent
|
|
env:
|
|
- name: TRANSFORMERS_CACHE
|
|
value: /cache
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
custom: true
|
|
spec:
|
|
httpGet:
|
|
path: /ping
|
|
port: 3003
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 10
|
|
timeoutSeconds: 1
|
|
failureThreshold: 3
|
|
readiness:
|
|
enabled: true
|
|
custom: true
|
|
spec:
|
|
httpGet:
|
|
path: /ping
|
|
port: 3003
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 10
|
|
timeoutSeconds: 1
|
|
failureThreshold: 3
|
|
startup:
|
|
enabled: false
|
|
resources:
|
|
limits:
|
|
gpu.intel.com/i915: 1
|
|
requests:
|
|
gpu.intel.com/i915: 1
|
|
cpu: 10m
|
|
memory: 256Mi
|
|
service:
|
|
main:
|
|
controller: main
|
|
ports:
|
|
http:
|
|
port: 2283
|
|
targetPort: 2283
|
|
protocol: TCP
|
|
metrics-api:
|
|
port: 8081
|
|
targetPort: 8081
|
|
protocol: TCP
|
|
metrics-ms:
|
|
port: 8082
|
|
targetPort: 8082
|
|
protocol: TCP
|
|
machine-learning:
|
|
controller: machine-learning
|
|
ports:
|
|
http:
|
|
port: 3003
|
|
targetPort: 3003
|
|
protocol: TCP
|
|
persistence:
|
|
config:
|
|
enabled: true
|
|
type: secret
|
|
name: immich-config-secret
|
|
advancedMounts:
|
|
main:
|
|
main:
|
|
- path: /config/immich.json
|
|
readOnly: true
|
|
mountPropagation: None
|
|
subPath: immich.json
|
|
cache:
|
|
storageClass: ceph-block
|
|
accessMode: ReadWriteOnce
|
|
size: 10Gi
|
|
retain: true
|
|
advancedMounts:
|
|
machine-learning:
|
|
main:
|
|
- path: /cache
|
|
readOnly: false
|
|
media:
|
|
existingClaim: immich-nfs-storage
|
|
advancedMounts:
|
|
main:
|
|
main:
|
|
- path: /usr/src/app/upload
|
|
readOnly: false
|
|
postgres-16-cluster:
|
|
# Tensorchord
|
|
#--- https://github.com/immich-app/immich/discussions/9060
|
|
#--- https://docs.pgvecto.rs/admin/kubernetes.html
|
|
#--- https://github.com/tensorchord/cloudnative-pgvecto.rs
|
|
#--- https://github.com/immich-app/immich/discussions/17025
|
|
type: tensorchord
|
|
mode: standalone
|
|
cluster:
|
|
image:
|
|
repository: ghcr.io/tensorchord/cloudnative-pgvecto.rs
|
|
tag: 16.3-v0.2.1
|
|
storage:
|
|
storageClass: local-path
|
|
walStorage:
|
|
storageClass: local-path
|
|
resources:
|
|
requests:
|
|
memory: 384Mi
|
|
cpu: 200m
|
|
enableSuperuserAccess: true
|
|
monitoring:
|
|
enabled: true
|
|
prometheusRule:
|
|
enabled: true
|
|
postgresql:
|
|
parameters:
|
|
shared_buffers: 256MB
|
|
recovery:
|
|
method: objectStore
|
|
objectStore:
|
|
endpointURL: https://nyc3.digitaloceanspaces.com
|
|
destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/immich/immich-postgresql-16-cluster
|
|
endpointCredentials: immich-postgresql-17-cluster-backup-secret
|
|
recoveryIndex: 2
|
|
backup:
|
|
enabled: false
|
|
# endpointURL: https://nyc3.digitaloceanspaces.com
|
|
# destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/immich/immich-postgresql-16-cluster
|
|
# endpointCredentials: immich-postgresql-16-cluster-backup-secret
|
|
# backupIndex: 2
|
|
# retentionPolicy: "3d"
|
|
|
|
postgres-16-b-cluster:
|
|
nameOverride: immich-postgresql-16-b
|
|
mode: recovery
|
|
cluster:
|
|
image:
|
|
repository: ghcr.io/immich-app/postgres
|
|
tag: 16-vectorchord0.4.3-pgvectors0.2.1
|
|
storage:
|
|
storageClass: local-path
|
|
walStorage:
|
|
storageClass: local-path
|
|
postgresUID: 26
|
|
postgresGID: 26
|
|
enableSuperuserAccess: true
|
|
monitoring:
|
|
enabled: true
|
|
prometheusRule:
|
|
enabled: true
|
|
postgresql:
|
|
parameters:
|
|
shared_buffers: 256MB
|
|
shared_preload_libraries:
|
|
- "vchord.so"
|
|
initdb:
|
|
postInitSQL:
|
|
- CREATE EXTENSION IF NOT EXISTS "vector";
|
|
- CREATE EXTENSION IF NOT EXISTS "vchord" CASCADE;
|
|
- CREATE EXTENSION IF NOT EXISTS "cube" CASCADE;
|
|
- CREATE EXTENSION IF NOT EXISTS "earthdistance" CASCADE;
|
|
recovery:
|
|
method: import
|
|
recoveryServerName: immich-postgresql-16-backup-2
|
|
objectStore:
|
|
destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/immich/immich-postgresql-16-cluster
|
|
index: 2
|
|
import:
|
|
type: "microservice"
|
|
databases:
|
|
- app
|
|
postImportApplicationSQL:
|
|
- CREATE EXTENSION IF NOT EXISTS "vector";
|
|
- CREATE EXTENSION IF NOT EXISTS "vectors";
|
|
- CREATE EXTENSION IF NOT EXISTS "vchord" CASCADE;
|
|
- CREATE EXTENSION IF NOT EXISTS "cube" CASCADE;
|
|
- CREATE EXTENSION IF NOT EXISTS "earthdistance" CASCADE;
|
|
source:
|
|
host: immich-postgresql-16-cluster-rw
|
|
port: 5432
|
|
username: postgres
|
|
database: postgres
|
|
sslMode: disable
|
|
passwordSecret:
|
|
name: immich-postgresql-16-cluster-superuser
|
|
key: password
|
|
|
|
# backup:
|
|
# objectStore:
|
|
# - name: external
|
|
# destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/immich/immich-postgresql-17-cluster
|
|
# index: 1
|
|
# retentionPolicy: "3d"
|
|
# scheduledBackups:
|
|
# - name: daily-backup
|
|
# suspend: true
|
|
# schedule: "0 0 0 * * *"
|
|
# backupName: external
|