diff --git a/kubernetes/apps/immich/machine-learning.yaml b/kubernetes/apps/immich/machine-learning.yaml index bcfc9972..fcca0ae1 100644 --- a/kubernetes/apps/immich/machine-learning.yaml +++ b/kubernetes/apps/immich/machine-learning.yaml @@ -70,3 +70,36 @@ spec: ports: - port: 3003 targetPort: http +--- +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: immich-machine-learning + namespace: immich +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: immich-machine-learning + minReplicas: 1 + maxReplicas: 2 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 70 + behavior: + scaleUp: + stabilizationWindowSeconds: 0 + policies: + - type: Pods + value: 1 + periodSeconds: 120 + scaleDown: + stabilizationWindowSeconds: 600 + policies: + - type: Pods + value: 1 + periodSeconds: 300