This commit is contained in:
Steffen Illium 2024-05-03 09:58:49 +02:00
parent d9eda3e533
commit 054859528f
11 changed files with 248 additions and 0 deletions

View File

@ -0,0 +1,15 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: immich
namespace: immich
spec:
entryPoints:
- websecure-local
tls: {}
routes:
- match: Host(`embyk.steffenillium.de`)
kind: Rule
services:
- name: immich-server
port: http

View File

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ingress.yaml
- pvc.yaml
- service.yaml

27
apps/immich/base/pvc.yaml Normal file
View File

@ -0,0 +1,27 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: pgdata
name: pgdata
spec:
storageClassName: rook-cephfs
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: model-cache
name: model-cache
spec:
storageClassName: rook-cephfs
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: immich-server
name: immich-server
spec:
ports:
- name: "http"
port: 2283
targetPort: 3001
selector:
app: immich-server

View File

@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: database
name: database
spec:
replicas: 1
selector:
matchLabels:
app: database
strategy:
type: Recreate
template:
metadata:
labels:
app: database
spec:
containers:
- image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
name: immich-postgres
envFrom:
- secretRef:
name: immich-secret
resources: {}
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: pgdata
restartPolicy: Always
volumes:
- name: pgdata
persistentVolumeClaim:
claimName: pgdata

View File

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- database.yaml
- machine-learning.yaml
- microservices.yaml
- redis.yaml
- server.yaml

View File

@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: immich-machine-learning
name: immich-machine-learning
spec:
replicas: 1
selector:
matchLabels:
app: immich-machine-learning
strategy:
type: Recreate
template:
metadata:
labels:
app: immich-machine-learning
spec:
containers:
- image: ghcr.io/immich-app/immich-machine-learning:release
name: immich-machine-learning
resources: {}
volumeMounts:
- mountPath: /cache
name: model-cache
restartPolicy: Always
volumes:
- name: model-cache
persistentVolumeClaim:
claimName: model-cache

View File

@ -0,0 +1,40 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: immich-microservices
name: immich-microservices
spec:
replicas: 1
selector:
matchLabels:
app: immich-microservices
strategy:
type: Recreate
template:
metadata:
labels:
app: immich-microservices
spec:
containers:
- args:
- start.sh
- microservices
envFrom:
- secretRef:
name: immich-secret
image: ghcr.io/immich-app/immich-server:release
name: immich-microservices
resources: {}
volumeMounts:
- mountPath: /usr/src/app/upload
name: photos
subPath: upload
- mountPath: /usr/src/app/external
name: photos
restartPolicy: Always
volumes:
- name: photos
nfs:
server: 192.168.178.4
path: /mnt/photos

View File

@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: redis
name: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
strategy: {}
template:
metadata:
labels:
app: redis
spec:
containers:
- image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
name: immich-redis
resources: {}
restartPolicy: Always

View File

@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: immich-server
name: immich-server
spec:
replicas: 1
selector:
matchLabels:
app: immich-server
strategy:
type: Recreate
template:
metadata:
labels:
app: immich-server
spec:
containers:
- args:
- start.sh
- immich
envFrom:
- secretRef:
name: immich-secret
image: ghcr.io/immich-app/immich-server:release
name: immich-server
ports:
- name: http
containerPort: 3001
hostPort: 2283
protocol: TCP
resources: {}
volumeMounts:
- mountPath: /usr/src/app/upload
name: photos
subPath: upload
- mountPath: /usr/src/app/external
name: photos
restartPolicy: Always
volumes:
- name: photos
nfs:
server: 192.168.178.4
path: /mnt/photos
readOnly: true

View File

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: immich
resources:
- base
- deployment