From 9bedb4c51901adca5c11fd951168ad397682db0f Mon Sep 17 00:00:00 2001 From: ab Date: Mon, 12 May 2025 15:52:11 +0000 Subject: [PATCH] Update k8s/apps/immich/deployments.yaml --- k8s/apps/immich/deployments.yaml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/k8s/apps/immich/deployments.yaml b/k8s/apps/immich/deployments.yaml index 7ed3195..63d01cf 100644 --- a/k8s/apps/immich/deployments.yaml +++ b/k8s/apps/immich/deployments.yaml @@ -61,7 +61,7 @@ kind: Deployment metadata: name: immich-machine-learning spec: - replicas: 1 + replicas: 2 selector: matchLabels: app: immich-ml @@ -70,6 +70,23 @@ 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 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule + labelSelector: + matchLabels: + app: immich-ml containers: - name: immich-ml image: ghcr.io/immich-app/immich-machine-learning:release @@ -80,11 +97,10 @@ spec: volumeMounts: - mountPath: /cache name: model-cache - nodeSelector: - kubernetes.io/hostname: nas.homenet volumes: - name: model-cache emptyDir: {} + --- apiVersion: apps/v1 kind: Deployment