blob: 2025a6f10c229e2c3a8f8cd6b3538e9e3f34d5f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: immich
namespace: cicd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
sources:
# Deploy custom resources (PVs, PVCs, PostgreSQL, Middleware)
- repoURL: http://git-server.cicd.svc.cluster.local/conf.git
targetRevision: master
path: f3s/immich/helm-chart
# Deploy Immich Helm chart with custom values
- repoURL: https://immich-app.github.io/immich-charts/
chart: immich
targetRevision: 0.10.3
helm:
releaseName: immich
values: |
valkey:
enabled: true
controllers:
main:
containers:
main:
probes:
# NFS-aware liveness: valkey-cli must PONG AND a write to the
# NFS-backed /data volume must succeed. Catches the "reads OK but
# writes return ESTALE" stale-bind-mount state that follows a CARP
# failover / NFS remount (the default ping-only probe stays green
# because reads are served from the stale handle). On failure the
# container restarts, which re-binds hostPath to the now-healthy
# host NFS mount and clears the stale handle.
liveness:
enabled: true
custom: true
spec:
exec:
command:
- sh
- -c
- "valkey-cli ping | grep -q PONG && echo probe > /data/.nfs-write-probe && rm -f /data/.nfs-write-probe"
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 10
failureThreshold: 3
persistence:
data:
enabled: true
type: persistentVolumeClaim
size: 1Gi
storageClass: ""
existingClaim: "immich-valkey-pvc"
immich:
persistence:
library:
existingClaim: "immich-library-pvc"
server:
enabled: true
controllers:
main:
pod:
labels:
# Opt in to the node-level nfs-mount-monitor stale-bind-mount
# reaper. The server's liveness probe is an HTTP /ping that
# never touches the NFS volume, so a stale /data bind-mount
# (writes return ESTALE, uploads 500) leaves the pod Running
# and Ready and cannot self-heal. The chart hardcodes the
# httpGet liveness and its value-merge refills httpGet, so an
# in-pod exec write-probe cannot be set via Helm values (as is
# done for valkey). Instead the node monitor execs a write
# probe into this pod and recreates it when writes fail.
nfs.stale-restart/enabled: "true"
containers:
main:
image:
tag: v2.7.5
resources:
requests:
cpu: 500m
memory: 512Mi
limits:
memory: 4Gi
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- machine-learning
topologyKey: "kubernetes.io/hostname"
persistence:
ext-albena-rw:
enabled: true
type: persistentVolumeClaim
existingClaim: immich-ext-albena-pvc
globalMounts:
- path: /external-albena-rw
ext-paul-rw:
enabled: true
type: persistentVolumeClaim
existingClaim: immich-ext-paul-pvc
globalMounts:
- path: /external-paul-rw
ext-videos-rw:
enabled: true
type: persistentVolumeClaim
existingClaim: immich-ext-videos-rw-pvc
globalMounts:
- path: /external-videos-rw
ext-videos-ro:
enabled: true
type: persistentVolumeClaim
existingClaim: immich-ext-videos-ro-pvc
globalMounts:
- path: /external-videos-ro
readOnly: true
ingress:
main:
enabled: true
annotations:
spec.ingressClassName: traefik
traefik.ingress.kubernetes.io/router.entrypoints: web
traefik.ingress.kubernetes.io/router.middlewares: services-immich-body-size@kubernetescrd
hosts:
- host: immich.f3s.buetow.org
paths:
- path: "/"
service:
identifier: main
port: 2283
machine-learning:
enabled: true
controllers:
main:
containers:
main:
image:
tag: v2.7.5
env:
MACHINE_LEARNING_MODEL_INTRA_OP_THREADS: "4"
MACHINE_LEARNING_MODEL_INTER_OP_THREADS: "1"
MACHINE_LEARNING_WORKER_TIMEOUT: "300"
resources:
requests:
cpu: 500m
memory: 512Mi
limits:
memory: 4Gi
pod:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- server
topologyKey: "kubernetes.io/hostname"
- weight: 80
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- immich-postgres
topologyKey: "kubernetes.io/hostname"
persistence:
cache:
enabled: true
type: persistentVolumeClaim
size: 10Gi
storageClass: ""
existingClaim: "immich-ml-cache-pvc"
controllers:
main:
containers:
main:
env:
DB_HOSTNAME: immich-postgres
DB_DATABASE_NAME: immich
DB_USERNAME: immich
DB_PASSWORD:
valueFrom:
secretKeyRef:
name: immich-db-secret
key: password
destination:
server: https://kubernetes.default.svc
namespace: services
syncPolicy:
automated:
prune: false
selfHeal: true
syncOptions:
- CreateNamespace=false
retry:
limit: 3
backoff:
duration: 5s
factor: 2
maxDuration: 1m
|