From 02b992d69dbcf7dc59cbd0a32a9d89ae4ac05d98 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sat, 10 May 2025 18:54:11 +0000 Subject: [PATCH] backup immich db daily [ci skip] --- modules/kubernetes/immich/chart_values.tpl | 13 +++++++------ modules/kubernetes/immich/main.tf | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/kubernetes/immich/chart_values.tpl b/modules/kubernetes/immich/chart_values.tpl index 1b69bc34..65cb08b3 100644 --- a/modules/kubernetes/immich/chart_values.tpl +++ b/modules/kubernetes/immich/chart_values.tpl @@ -10,11 +10,11 @@ defaultPodOptions: env: # REDIS_HOSTNAME: '{{ printf "%s-redis-master" .Release.Name }}' REDIS_HOSTNAME: "redis.redis.svc.cluster.local" - # DB_HOSTNAME: "{{ .Release.Name }}-postgresql" - # DB_USERNAME: "{{ .Values.postgresql.global.postgresql.auth.username }}" - # DB_DATABASE_NAME: "{{ .Values.postgresql.global.postgresql.auth.database }}" - # # -- You should provide your own secret outside of this helm-chart and use `postgresql.global.postgresql.auth.existingSecret` to provide credentials to the postgresql instance - # DB_PASSWORD: "{{ .Values.postgresql.global.postgresql.auth.password }}" + # DB_HOSTNAME: "postgresql.dbaas" + # DB_USERNAME: "immich" + # DB_DATABASE_NAME: "immich" + # # # -- You should provide your own secret outside of this helm-chart and use `postgresql.global.postgresql.auth.existingSecret` to provide credentials to the postgresql instance + # DB_PASSWORD: "${postgresql_password}" # TYPESENSE_ENABLED: "{{ .Values.typesense.enabled }}" # TYPESENSE_ENABLED: "1" # TYPESENSE_API_KEY: "{{ .Values.typesense.env.TYPESENSE_API_KEY }}" @@ -43,6 +43,7 @@ immich: postgresql: enabled: true + # enabled: false image: repository: tensorchord/pgvecto-rs tag: pg14-v0.2.0 @@ -78,7 +79,7 @@ machine-learning: # MACHINE_LEARNING_PRELOAD__CLIP: immich-app/ViT-H-14-378-quickgelu__dfn5b # too big(?) # MACHINE_LEARNING_PRELOAD__CLIP: immich-app/ViT-L-16-SigLIP-384__webli # too big(?) #MACHINE_LEARNING_PRELOAD__CLIP: ViT-B-32__openai # too big(?) - MACHINE_LEARNING_PRELOAD__CLIP: ViT-B-16-SigLIP2__webli + MACHINE_LEARNING_PRELOAD__CLIP: ViT-B-16-SigLIP2__webli persistence: cache: enabled: true diff --git a/modules/kubernetes/immich/main.tf b/modules/kubernetes/immich/main.tf index 1e4f57fd..cffe8799 100644 --- a/modules/kubernetes/immich/main.tf +++ b/modules/kubernetes/immich/main.tf @@ -174,7 +174,7 @@ resource "kubernetes_cron_job_v1" "postgresql-backup" { spec { concurrency_policy = "Replace" failed_jobs_history_limit = 5 - schedule = "0 */6 * * *" + schedule = "0 0 * * *" # schedule = "* * * * *" starting_deadline_seconds = 10 successful_jobs_history_limit = 10