ci / lint-compose (push) Successful in 3s
ci / lint-actionlint (push) Successful in 1s
ci / lint-shellcheck (push) Successful in 2s
ci / lint-prettier (push) Successful in 3s
ci / lint-ruff (push) Successful in 1s
ci / lint-yaml (push) Successful in 2s
ci / lint-dockerfiles (push) Successful in 2s
ci / scan-deps (push) Successful in 18s
ci / test-backend (push) Successful in 8s
ci / test-frontend (push) Successful in 11s
ci / validate (push) Successful in 3s
renovate-ci / validate-renovate (push) Successful in 13s
ci / build (push) Successful in 1m30s
RollingUpdate with default maxSurge needs a spare pod the single node does not have (99% CPU requested), so multi-workload restarts end Pending and verify times out. Recreate on all replicas:1 Deployments (immich-server and bentopdf keep RollingUpdate at replicas 2). Also trims CPU/memory requests toward measured use (adguard, authentik, gitea, netbox, uptime-kuma, netbird-server) and gives traefik requests/limits so it is no longer BestEffort.
95 lines
2.3 KiB
YAML
95 lines
2.3 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: immich-machine-learning
|
|
namespace: immich
|
|
spec:
|
|
selector:
|
|
app: immich-machine-learning
|
|
ports:
|
|
- name: http
|
|
port: 3003
|
|
targetPort: 3003
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: immich-machine-learning-deployment
|
|
namespace: immich
|
|
labels:
|
|
app: immich-machine-learning
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: immich-machine-learning
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: immich-machine-learning
|
|
spec:
|
|
containers:
|
|
- name: immich-machine-learning
|
|
image: ghcr.io/immich-app/immich-machine-learning:v3
|
|
envFrom:
|
|
- configMapRef:
|
|
name: immich-config
|
|
- secretRef:
|
|
name: immich-secrets
|
|
ports:
|
|
- name: http
|
|
containerPort: 3003
|
|
volumeMounts:
|
|
- name: model-cache
|
|
mountPath: /cache
|
|
# The first request pulls a model over the internet, so a cold start
|
|
# is slower than a container start.
|
|
startupProbe:
|
|
httpGet:
|
|
path: /ping
|
|
port: http
|
|
failureThreshold: 60
|
|
periodSeconds: 5
|
|
timeoutSeconds: 5
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /ping
|
|
port: http
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /ping
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
timeoutSeconds: 5
|
|
# Same reasoning as the server: the request covers the idle cost
|
|
# only, because the node has no spare cores to schedule against.
|
|
# Recognition is the burst - a busy import wants both cores.
|
|
resources:
|
|
requests:
|
|
cpu: "100m"
|
|
memory: "1Gi"
|
|
limits:
|
|
cpu: "2000m"
|
|
memory: "3Gi"
|
|
volumes:
|
|
- name: model-cache
|
|
persistentVolumeClaim:
|
|
claimName: immich-model-cache-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: immich-model-cache-pvc
|
|
namespace: immich
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 2Gi
|