Files
homelab/k8s/apps/immich/deployments.yaml
T

205 lines
5.1 KiB
YAML
Raw Normal View History

2025-05-13 00:15:12 +00:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: immich-server
spec:
replicas: 1
selector:
matchLabels:
app: immich-server
template:
metadata:
labels:
app: immich-server
spec:
containers:
- name: immich-server
image: ghcr.io/immich-app/immich-server:release
imagePullPolicy: Always
2025-07-18 13:46:54 +03:00
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "4Gi"
2025-11-24 13:19:04 +02:00
cpu: "3000m"
2025-05-13 00:15:12 +00:00
ports:
- containerPort: 2283
env:
- name: UPLOAD_LOCATION
value: /usr/src/app/upload
2025-05-13 12:50:21 +00:00
- name: DB_URL
2025-05-13 13:54:54 +00:00
value: postgresql://postgres:postgres@immich-rw.immich:5432/immich
2025-05-13 00:15:12 +00:00
- name: REDIS_HOST
value: redis
- name: REDIS_PORT
value: "6379"
- name: TZ
value: Asia/Nicosia
volumeMounts:
- mountPath: /usr/src/app/upload
name: upload-storage
- mountPath: /GPHOTO
name: gphoto-storage
2025-05-13 21:22:56 +00:00
- mountPath: /Camera
name: camera
2025-05-13 00:15:12 +00:00
- mountPath: /etc/localtime
name: localtime
readOnly: true
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
2025-09-09 19:47:01 +00:00
- weight: 90
2025-05-13 00:15:12 +00:00
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- home.homenet
2025-09-09 19:47:01 +00:00
- weight: 10
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- nas.homenet
2025-05-13 00:15:12 +00:00
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- home.homenet
- nas.homenet
volumes:
- name: upload-storage
2026-01-28 12:04:41 +02:00
persistentVolumeClaim:
claimName: immich-upload-pvc
2025-05-13 00:15:12 +00:00
- name: gphoto-storage
2026-01-28 12:04:41 +02:00
persistentVolumeClaim:
claimName: immich-gphoto-pvc
2025-05-13 21:22:56 +00:00
- name: camera
2026-01-28 12:04:41 +02:00
persistentVolumeClaim:
claimName: immich-camera-pvc
2025-05-13 21:22:56 +00:00
readOnly: true
2025-05-13 00:15:12 +00:00
- name: localtime
hostPath:
path: /etc/localtime
type: File
2025-05-12 17:04:42 +00:00
2025-04-12 19:42:34 +01:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: immich-machine-learning
spec:
2025-05-24 15:01:24 +00:00
replicas: 4
2025-04-12 19:42:34 +01:00
selector:
matchLabels:
app: immich-ml
template:
metadata:
labels:
app: immich-ml
spec:
2025-05-12 15:52:11 +00:00
affinity:
nodeAffinity:
2025-05-13 14:35:00 +00:00
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- home.homenet
- master.tail2fe2d.ts.net
2025-05-13 15:53:07 +00:00
- nas.homenet
2025-05-12 16:37:02 +00:00
2025-05-12 16:28:13 +00:00
preferredDuringSchedulingIgnoredDuringExecution:
2025-05-13 15:41:28 +00:00
- weight: 4
2025-05-13 14:29:02 +00:00
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
2025-05-13 14:33:27 +00:00
- home.homenet
2025-05-13 15:43:41 +00:00
- weight: 6
2025-05-12 16:28:13 +00:00
preference:
matchExpressions:
2025-05-12 16:21:55 +00:00
- key: kubernetes.io/hostname
operator: In
values:
2025-05-13 14:25:08 +00:00
- master.tail2fe2d.ts.net
2025-05-13 14:33:27 +00:00
- weight: 1
2025-05-12 16:28:13 +00:00
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
2025-09-09 19:47:01 +00:00
- nas.homenet
2025-05-13 14:33:27 +00:00
2025-05-12 16:30:32 +00:00
topologySpreadConstraints:
- maxSkew: 2
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: immich-ml
2025-04-12 19:42:34 +01:00
containers:
2025-05-12 16:21:55 +00:00
- name: immich-ml
image: ghcr.io/immich-app/immich-machine-learning:release
imagePullPolicy: Always
2025-07-18 13:46:54 +03:00
resources:
requests:
memory: "2Gi"
cpu: "1000m"
limits:
memory: "8Gi"
2025-11-24 13:19:04 +02:00
cpu: "6000m"
2025-05-12 16:21:55 +00:00
env:
- name: TZ
value: Asia/Nicosia
2025-05-13 15:05:07 +00:00
- name: IMMICH_MACHINE_LEARNING_MODEL_FACE
value: buffalo_l
- name: IMMICH_MACHINE_LEARNING_MODEL_CLIP
value: ViT-L/14
- name: IMMICH_MACHINE_LEARNING_USE_GPU
value: "true"
2025-05-12 16:21:55 +00:00
volumeMounts:
- mountPath: /cache
name: model-cache
2025-04-12 19:42:34 +01:00
volumes:
2025-05-12 16:21:55 +00:00
- name: model-cache
emptyDir: {}
2025-05-12 15:52:11 +00:00
2025-04-12 19:42:34 +01:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:6.2-alpine
2025-07-18 13:46:54 +03:00
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
2025-11-24 13:19:04 +02:00
cpu: "750m"
2025-04-12 19:42:34 +01:00
readinessProbe:
exec:
command: ["redis-cli", "ping"]
nodeSelector:
2025-04-16 16:46:02 +03:00
kubernetes.io/hostname: nas.homenet