-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: mount separate external library volume for previews #358
Merged
+19
−7
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- kubernetes/apps/preview/immich-release/app Kustomization: flux-system/preview-immich-release PersistentVolumeClaim: preview/preview-immich-release-library
+++ kubernetes/apps/preview/immich-release/app Kustomization: flux-system/preview-immich-release PersistentVolumeClaim: preview/preview-immich-release-library
@@ -1,18 +0,0 @@
----
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- labels:
- app.kubernetes.io/name: preview-immich-release
- kustomize.toolkit.fluxcd.io/name: preview-immich-release
- kustomize.toolkit.fluxcd.io/namespace: flux-system
- name: preview-immich-release-library
- namespace: preview
-spec:
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 100Gi
- storageClassName: zfs
-
--- kubernetes/apps/preview/immich-release/app Kustomization: flux-system/preview-immich-release Cluster: preview/preview-immich-release
+++ kubernetes/apps/preview/immich-release/app Kustomization: flux-system/preview-immich-release Cluster: preview/preview-immich-release
@@ -1,24 +0,0 @@
----
-apiVersion: postgresql.cnpg.io/v1
-kind: Cluster
-metadata:
- labels:
- app.kubernetes.io/name: preview-immich-release
- kustomize.toolkit.fluxcd.io/name: preview-immich-release
- kustomize.toolkit.fluxcd.io/namespace: flux-system
- name: preview-immich-release
- namespace: preview
-spec:
- backup:
- volumeSnapshot:
- className: zfs
- enableSuperuserAccess: true
- imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:14.12-v0.3.0
- instances: 1
- postgresql:
- shared_preload_libraries:
- - vectors.so
- storage:
- size: 10Gi
- storageClass: zfs
-
--- kubernetes/apps/preview/immich-release/app Kustomization: flux-system/preview-immich-release HelmRelease: preview/preview-immich-release
+++ kubernetes/apps/preview/immich-release/app Kustomization: flux-system/preview-immich-release HelmRelease: preview/preview-immich-release
@@ -1,80 +0,0 @@
----
-apiVersion: helm.toolkit.fluxcd.io/v2
-kind: HelmRelease
-metadata:
- labels:
- app.kubernetes.io/name: preview-immich-release
- kustomize.toolkit.fluxcd.io/name: preview-immich-release
- kustomize.toolkit.fluxcd.io/namespace: flux-system
- name: preview-immich-release
- namespace: preview
-spec:
- chart:
- spec:
- chart: immich
- interval: 1m
- sourceRef:
- kind: HelmRepository
- name: immich-charts
- namespace: flux-system
- version: 0.9.0
- interval: 5m
- upgrade:
- remediation:
- retries: 3
- values:
- env:
- DB_DATABASE_NAME:
- valueFrom:
- secretKeyRef:
- key: dbname
- name: preview-immich-release-app
- DB_HOSTNAME:
- valueFrom:
- secretKeyRef:
- key: host
- name: preview-immich-release-superuser
- DB_PASSWORD:
- valueFrom:
- secretKeyRef:
- key: password
- name: preview-immich-release-superuser
- DB_USERNAME:
- valueFrom:
- secretKeyRef:
- key: user
- name: preview-immich-release-superuser
- LOG_LEVEL: verbose
- image:
- tag: v1.124.2
- immich:
- persistence:
- library:
- existingClaim: preview-immich-release-library
- machine-learning:
- image:
- pullPolicy: Always
- postgres:
- enabled: false
- redis:
- enabled: true
- server:
- image:
- pullPolicy: Always
- ingress:
- main:
- annotations:
- cert-manager.io/cluster-issuer: letsencrypt-production
- nginx.ingress.kubernetes.io/proxy-body-size: '0'
- className: nginx
- enabled: true
- hosts:
- - host: release-preview.internal.immich.cloud
- paths:
- - path: /
- pathType: Prefix
- tls:
- - hosts:
- - release-preview.internal.immich.cloud
- secretName: preview-immich-release-tls
-
--- kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/preview-immich-release
+++ kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/preview-immich-release
@@ -9,13 +9,13 @@
namespace: flux-system
spec:
commonMetadata:
labels:
app.kubernetes.io/name: preview-immich-release
interval: 30m
- path: ./kubernetes/apps/preview/immich-release/app
+ path: ./templates/kubernetes/immich-preview
postBuild:
substitute:
HOST: release-preview.internal.immich.cloud
NAME: preview-immich-release
TAG: v1.124.2
prune: true
--- templates/kubernetes/immich-preview Kustomization: flux-system/preview-immich-release PersistentVolumeClaim: preview/preview-immich-release-library
+++ templates/kubernetes/immich-preview Kustomization: flux-system/preview-immich-release PersistentVolumeClaim: preview/preview-immich-release-library
@@ -0,0 +1,18 @@
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ labels:
+ app.kubernetes.io/name: preview-immich-release
+ kustomize.toolkit.fluxcd.io/name: preview-immich-release
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: preview-immich-release-library
+ namespace: preview
+spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 100Gi
+ storageClassName: zfs
+
--- templates/kubernetes/immich-preview Kustomization: flux-system/preview-immich-release PersistentVolumeClaim: preview/preview-immich-release-external
+++ templates/kubernetes/immich-preview Kustomization: flux-system/preview-immich-release PersistentVolumeClaim: preview/preview-immich-release-external
@@ -0,0 +1,18 @@
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ labels:
+ app.kubernetes.io/name: preview-immich-release
+ kustomize.toolkit.fluxcd.io/name: preview-immich-release
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: preview-immich-release-external
+ namespace: preview
+spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 100Gi
+ storageClassName: zfs
+
--- templates/kubernetes/immich-preview Kustomization: flux-system/preview-immich-release Cluster: preview/preview-immich-release
+++ templates/kubernetes/immich-preview Kustomization: flux-system/preview-immich-release Cluster: preview/preview-immich-release
@@ -0,0 +1,24 @@
+---
+apiVersion: postgresql.cnpg.io/v1
+kind: Cluster
+metadata:
+ labels:
+ app.kubernetes.io/name: preview-immich-release
+ kustomize.toolkit.fluxcd.io/name: preview-immich-release
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: preview-immich-release
+ namespace: preview
+spec:
+ backup:
+ volumeSnapshot:
+ className: zfs
+ enableSuperuserAccess: true
+ imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:14.12-v0.3.0
+ instances: 1
+ postgresql:
+ shared_preload_libraries:
+ - vectors.so
+ storage:
+ size: 10Gi
+ storageClass: zfs
+
--- templates/kubernetes/immich-preview Kustomization: flux-system/preview-immich-release HelmRelease: preview/preview-immich-release
+++ templates/kubernetes/immich-preview Kustomization: flux-system/preview-immich-release HelmRelease: preview/preview-immich-release
@@ -0,0 +1,85 @@
+---
+apiVersion: helm.toolkit.fluxcd.io/v2
+kind: HelmRelease
+metadata:
+ labels:
+ app.kubernetes.io/name: preview-immich-release
+ kustomize.toolkit.fluxcd.io/name: preview-immich-release
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: preview-immich-release
+ namespace: preview
+spec:
+ chart:
+ spec:
+ chart: immich
+ interval: 1m
+ sourceRef:
+ kind: HelmRepository
+ name: immich-charts
+ namespace: flux-system
+ version: 0.9.0
+ interval: 5m
+ upgrade:
+ remediation:
+ retries: 3
+ values:
+ env:
+ DB_DATABASE_NAME:
+ valueFrom:
+ secretKeyRef:
+ key: dbname
+ name: preview-immich-release-app
+ DB_HOSTNAME:
+ valueFrom:
+ secretKeyRef:
+ key: host
+ name: preview-immich-release-superuser
+ DB_PASSWORD:
+ valueFrom:
+ secretKeyRef:
+ key: password
+ name: preview-immich-release-superuser
+ DB_USERNAME:
+ valueFrom:
+ secretKeyRef:
+ key: user
+ name: preview-immich-release-superuser
+ LOG_LEVEL: verbose
+ image:
+ tag: v1.124.2
+ immich:
+ persistence:
+ library:
+ existingClaim: preview-immich-release-library
+ machine-learning:
+ image:
+ pullPolicy: Always
+ postgres:
+ enabled: false
+ redis:
+ enabled: true
+ server:
+ image:
+ pullPolicy: Always
+ ingress:
+ main:
+ annotations:
+ cert-manager.io/cluster-issuer: letsencrypt-production
+ nginx.ingress.kubernetes.io/proxy-body-size: '0'
+ className: nginx
+ enabled: true
+ hosts:
+ - host: release-preview.internal.immich.cloud
+ paths:
+ - path: /
+ pathType: Prefix
+ tls:
+ - hosts:
+ - release-preview.internal.immich.cloud
+ secretName: preview-immich-release-tls
+ persistence:
+ external:
+ enabled: true
+ existingClaim: preview-immich-release-external
+ mountPath: /external
+ |
--- HelmRelease: preview/preview-immich-release Deployment: preview/preview-immich-release-server
+++ HelmRelease: preview/preview-immich-release Deployment: preview/preview-immich-release-server
@@ -59,12 +59,14 @@
value: preview-immich-release-redis-master
ports:
- name: http
containerPort: 2283
protocol: TCP
volumeMounts:
+ - name: external
+ mountPath: /external
- name: library
mountPath: /usr/src/app/upload
livenessProbe:
failureThreshold: 3
httpGet:
path: /api/server/ping
@@ -86,10 +88,13 @@
path: /api/server/ping
port: http
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
volumes:
+ - name: external
+ persistentVolumeClaim:
+ claimName: preview-immich-release-external
- name: library
persistentVolumeClaim:
claimName: preview-immich-release-library
|
zackpollard
approved these changes
Jan 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.