From 2f8b47a5e5378204980ce9a239e53370de53d7b9 Mon Sep 17 00:00:00 2001 From: ab Date: Mon, 12 May 2025 16:28:13 +0000 Subject: [PATCH] Update k8s/apps/immich/deployments.yaml --- k8s/apps/immich/deployments.yaml | 39 ++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/k8s/apps/immich/deployments.yaml b/k8s/apps/immich/deployments.yaml index c63c8c2..2695705 100644 --- a/k8s/apps/immich/deployments.yaml +++ b/k8s/apps/immich/deployments.yaml @@ -55,13 +55,14 @@ spec: hostPath: path: /etc/localtime type: File + --- apiVersion: apps/v1 kind: Deployment metadata: name: immich-machine-learning spec: - replicas: 20 + replicas: 15 selector: matchLabels: app: immich-ml @@ -70,23 +71,30 @@ spec: labels: app: immich-ml spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - nas.homenet - - home.homenet topologySpreadConstraints: - - maxSkew: 1 + - maxSkew: 2 topologyKey: kubernetes.io/hostname whenUnsatisfiable: DoNotSchedule labelSelector: matchLabels: app: immich-ml + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 30 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - nas.homenet + - weight: 70 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - home.homenet containers: - name: immich-ml image: ghcr.io/immich-app/immich-machine-learning:release @@ -94,6 +102,13 @@ spec: env: - name: TZ value: Asia/Nicosia + resources: + requests: + cpu: "0.5" + memory: "1Gi" + limits: + cpu: "1" + memory: "2Gi" volumeMounts: - mountPath: /cache name: model-cache