summaryrefslogtreecommitdiff
path: root/f3s/argocd-apps/services/immich.yaml
blob: 790bdb19ba672da62edd98d31ec1e5e43a6e3899 (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
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
            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:
                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