diff --git a/k8s/apps/immich/deployments.yaml b/k8s/apps/immich/deployments.yaml index b2d16f8..3f774fb 100644 --- a/k8s/apps/immich/deployments.yaml +++ b/k8s/apps/immich/deployments.yaml @@ -1,76 +1,80 @@ -#--- -#apiVersion: apps/v1 -#kind: Deployment -#metadata: -# name: immich-server -#spec: -# replicas: 1 -# selector: -# matchLabels: -# app: immich-server -# template: -# metadata: -# labels: -# app: immich-server -# spec: -# containers: -# - name: immich-server -# image: ghcr.io/immich-app/immich-server:release -# imagePullPolicy: Always -# ports: -# - containerPort: 2283 -# env: -# - name: UPLOAD_LOCATION -# value: /usr/src/app/upload -# - name: DB_PASSWORD -# value: postgres -# - name: DB_USERNAME -# value: postgres -# - name: DB_DATABASE_NAME -# value: immich -# - name: REDIS_HOST -# value: redis -# - name: REDIS_PORT -# value: "6379" -# - name: TZ -# value: Asia/Nicosia -# volumeMounts: -# - mountPath: /usr/src/app/upload -# name: upload-storage -# - mountPath: /GPHOTO -# name: gphoto-storage -# - mountPath: /etc/localtime -# name: localtime -# readOnly: true -# affinity: -# nodeAffinity: -# preferredDuringSchedulingIgnoredDuringExecution: -# - weight: 100 -# preference: -# matchExpressions: -# - key: kubernetes.io/hostname -# operator: In -# values: -# - home.homenet -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: kubernetes.io/hostname -# operator: In -# values: -# - home.homenet -# - nas.homenet -# volumes: -# - name: upload-storage -# persistentVolumeClaim: -# claimName: immich-upload-pvc -# - name: gphoto-storage -# persistentVolumeClaim: -# claimName: immich-gphoto-pvc -# - name: localtime -# hostPath: -# path: /etc/localtime -# type: File +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: immich-server +spec: + replicas: 1 + selector: + matchLabels: + app: immich-server + template: + metadata: + labels: + app: immich-server + spec: + containers: + - name: immich-server + image: ghcr.io/immich-app/immich-server:release + imagePullPolicy: Always + ports: + - containerPort: 2283 + env: + - name: UPLOAD_LOCATION + value: /usr/src/app/upload + - name: DB_PASSWORD + value: postgres + - name: DB_USERNAME + value: postgres + - name: DB_DATABASE_NAME + value: immich + - name: REDIS_HOST + value: redis + - name: REDIS_PORT + value: "6379" + - name: TZ + value: Asia/Nicosia + volumeMounts: + - mountPath: /usr/src/app/upload + name: upload-storage + - mountPath: /GPHOTO + name: gphoto-storage + - mountPath: /etc/localtime + name: localtime + readOnly: true + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - home.homenet + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - home.homenet + - nas.homenet + volumes: + - name: upload-storage + nfs: + server: nas.homenet + path: /mnt/storage/Storage/k8s/immich/library/ + readOnly: false + - name: gphoto-storage + nfs: + server: nas.homenet + path: /mnt/storage/Storage/k8s/immich/GPHOTO/ + readOnly: false + - name: localtime + hostPath: + path: /etc/localtime + type: File #--- #apiVersion: apps/v1 #kind: Deployment