From b591bdc4fda31577e2875103495b1fe17f449c06 Mon Sep 17 00:00:00 2001 From: Ariel Sosnovsky Date: Wed, 22 Nov 2023 13:15:55 -0500 Subject: [PATCH] immich refactor --- bin/dryrun-app.sh | 19 +- k8s/apps/db-users/values.yaml | 1 + k8s/apps/photos/Chart.yaml | 3 - .../photos/templates/immich/_heplers.yaml | 103 +++++ .../templates/immich/config-shared-envs.yaml | 26 ++ k8s/apps/photos/templates/immich/deploy.yaml | 8 + .../photos/templates/immich/secret-db.yaml | 32 ++ .../photos/templates/immich/secret-envs.yaml | 10 + .../photos/templates/machine-learning.yaml | 46 --- k8s/apps/photos/templates/microservices.yaml | 25 -- k8s/apps/photos/templates/proxy.yaml | 23 -- k8s/apps/photos/templates/server.yaml | 49 --- k8s/apps/photos/templates/typesense.yaml | 39 -- k8s/apps/photos/templates/web.yaml | 27 -- k8s/apps/photos/values.yaml | 367 ++++++++++++------ k8s/argoapps/values.yaml | 17 +- 16 files changed, 458 insertions(+), 337 deletions(-) create mode 100644 k8s/apps/photos/templates/immich/_heplers.yaml create mode 100644 k8s/apps/photos/templates/immich/config-shared-envs.yaml create mode 100644 k8s/apps/photos/templates/immich/deploy.yaml create mode 100644 k8s/apps/photos/templates/immich/secret-db.yaml create mode 100644 k8s/apps/photos/templates/immich/secret-envs.yaml delete mode 100644 k8s/apps/photos/templates/machine-learning.yaml delete mode 100644 k8s/apps/photos/templates/microservices.yaml delete mode 100644 k8s/apps/photos/templates/proxy.yaml delete mode 100644 k8s/apps/photos/templates/server.yaml delete mode 100644 k8s/apps/photos/templates/typesense.yaml delete mode 100644 k8s/apps/photos/templates/web.yaml diff --git a/bin/dryrun-app.sh b/bin/dryrun-app.sh index 5435b27..667c681 100755 --- a/bin/dryrun-app.sh +++ b/bin/dryrun-app.sh @@ -6,15 +6,30 @@ deployment=${2:-dev} app=$(basename $full_path) location=$(dirname $full_path) tmp_path=".tmp/$location/$deployment-$app.yaml" +chart_checksum_path=".tmp/.checksums/$location/$deployment-$app.chart.yaml.checksum" echo "Running for $app:$deployment" mkdir -p $(dirname $tmp_path) -echo " > updating dependencies..." +previous_checksum="" +if [ -f "$chart_checksum_path" ]; then + previous_checksum=$(cat $chart_checksum_path) +else + mkdir -p $(dirname $chart_checksum_path) +fi pushd $full_path &> /dev/null -helm dependency update +chart_checksum=$(sha256sum Chart.yaml | cut -d ' ' -f 1) +echo " > Current Chart.yaml checksum: $chart_checksum" +echo " > Previous Chart.yaml checksum: $previous_checksum" +if [ "$chart_checksum" == "$previous_checksum" ]; then + echo " > skipping helm update!" +else + echo " > updating dependencies..." + helm dependency update +fi popd &> /dev/null +echo $chart_checksum > $chart_checksum_path if [ -f "$tmp_path" ]; then echo " > found existing file" diff --git a/k8s/apps/db-users/values.yaml b/k8s/apps/db-users/values.yaml index 241be8d..1648b9d 100644 --- a/k8s/apps/db-users/values.yaml +++ b/k8s/apps/db-users/values.yaml @@ -6,6 +6,7 @@ userGeneration: - radarr - sonarr - prowlarr + - immich users_dbs: radarr: [log] sonarr: [log] diff --git a/k8s/apps/photos/Chart.yaml b/k8s/apps/photos/Chart.yaml index 88fb516..06ed5e5 100644 --- a/k8s/apps/photos/Chart.yaml +++ b/k8s/apps/photos/Chart.yaml @@ -5,9 +5,6 @@ type: application version: 0.1.0 appVersion: "edge" dependencies: - - name: common - repository: https://bjw-s.github.io/helm-charts - version: 1.4.0 - name: redis condition: redis.enabled repository: https://charts.bitnami.com/bitnami diff --git a/k8s/apps/photos/templates/immich/_heplers.yaml b/k8s/apps/photos/templates/immich/_heplers.yaml new file mode 100644 index 0000000..2513816 --- /dev/null +++ b/k8s/apps/photos/templates/immich/_heplers.yaml @@ -0,0 +1,103 @@ +{{ define "homelab.immich.deployment" }} +--- +apiVersion: v1 +kind: Service +metadata: + name: immich-{{ .name }} +spec: + type: ClusterIP + ports: + - port: {{ .port }} + targetPort: http + protocol: TCP + name: http + selector: + homelab/name: immich + app.kubernetes.io/name: {{ .name }} + app.kubernetes.io/instance: photos + +{{- range $key, $val := .persistence }} +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: immich-{{ .name }}-{{ $key }} +spec: + storageClassName: {{ $.global.nfs.storageClass }} + accessModes: + {{- $val.accessModes | toYaml | nindent 4 }} + resources: + {{- $val.resources | toYaml | nindent 4 }} +{{ end -}} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: immich-{{ .name }} +spec: + revisionHistoryLimit: 2 + replicas: "{{ .replicas }}" + updateStrategy: + rollingUpdate: + partition: "25%" + type: RollingUpdate + strategy: + type: Recreate + selector: + matchLabels: + homelab/name: immich + app.kubernetes.io/name: {{ .name }} + app.kubernetes.io/instance: photos + template: + metadata: + labels: + homelab/name: immich + app.kubernetes.io/name: {{ .name }} + app.kubernetes.io/instance: photos + spec: + containers: + - name: {{ .name }} + image: "{{.image}}:{{ .version }}" + imagePullPolicy: IfNotPresent + envFrom: + - configMapRef: + name: immich-shared-envs + - secretRef: + name: immich-shared-envs + {{ if .env }} + env: + {{ .env | toYaml | nindent 24 }} + {{ end }} + ports: + - name: http + containerPort: "{{ .port }}" + protocol: TCP + volumeMounts: + - name: library + mountPath: "{{ .libraryMountPath }}" +{{- range $key, $val := .persistence }} + - name: {{ $key }} + mountPath: {{ $val.mountPath }} +{{ end }} + {{ if .livenessProbe }} + livenessProbe: + {{ .livenessProbe | toYaml | nindent 24 }} + {{ end }} + {{ if .readinessProbe }} + readinessProbe: + {{ .readinessProbe | toYaml | nindent 24 }} + {{ end }} + {{ if .startupProbe }} + startupProbe: + {{ .startupProbe | toYaml | nindent 24 }} + {{ end }} + volumes: + - name: library + {{- .libraryPVC | toYaml | nindent 20 }} +{{- range $key, $val := .persistence }} + - name: {{ $key }} + persistentVolumeClaim: + claimName: immich-{{ .name }}-{{ $key }} +{{ end }} + +{{ end }} \ No newline at end of file diff --git a/k8s/apps/photos/templates/immich/config-shared-envs.yaml b/k8s/apps/photos/templates/immich/config-shared-envs.yaml new file mode 100644 index 0000000..4121bd8 --- /dev/null +++ b/k8s/apps/photos/templates/immich/config-shared-envs.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: immich-shared-envs +data: + # general + TZ: {{ $.Values.global.timezone }} + LOG_LEVEL: log + PUBLIC_LOGIN_PAGE_MESSAGE: Sosnovsky + IMMICH_MEDIA_LOCATION: /shared/media/ + # ports + PORT: "{{ $.Values.immich.apps.web.port }}" + SERVER_PORT: "{{ $.Values.immich.apps.server.port }}" + MICROSERVICES_PORT: "{{ $.Values.immich.apps.microservices.port }}" + MACHINE_LEARNING_PORT: "{{ $.Values.immich.apps.machineLearning.port }}" + MACHINE_LEARNING_HOST: immich-ml.{{ $.Release.Namespace }}.svc.cluster.local + IMMICH_MACHINE_LEARNING_URL: "http://immich-ml.{{ $.Release.Namespace }}.svc.cluster.local:{{ $.Values.immich.apps.machineLearning.port }}" + IMMICH_SERVER_URL: "http://immich-server.{{ $.Release.Namespace }}.svc.cluster.local:{{ $.Values.immich.apps.server.port }}" + IMMICH_WEB_URL: "http://immich-web.{{ $.Release.Namespace }}.svc.cluster.local:{{ $.Values.immich.apps.web.port }}" + # db & redis + REDIS_HOSTNAME: "immich-redis.{{ $.Release.Namespace }}.svc.cluster.local" + # typesense + TYPESENSE_ENABLED: "true" + TYPESENSE_HOST: "immich-typesense.{{ $.Release.Namespace }}.svc.cluster.local" + TYPESENSE_PORT: "{{ $.Values.immich.apps.typesense.port }}" \ No newline at end of file diff --git a/k8s/apps/photos/templates/immich/deploy.yaml b/k8s/apps/photos/templates/immich/deploy.yaml new file mode 100644 index 0000000..1d53e2c --- /dev/null +++ b/k8s/apps/photos/templates/immich/deploy.yaml @@ -0,0 +1,8 @@ +{{ $shared := .Values.immich.shared }} +{{- range $key, $val := .Values.immich.apps }} + {{- $settings := deepCopy $.Values.immich.shared | merge $val -}} + {{ $_ := set $settings "name" $key }} + {{ $_ := set $settings "global" $.Values.global }} + + {{ include "homelab.immich.deployment" $settings }} +{{ end -}} \ No newline at end of file diff --git a/k8s/apps/photos/templates/immich/secret-db.yaml b/k8s/apps/photos/templates/immich/secret-db.yaml new file mode 100644 index 0000000..ca816eb --- /dev/null +++ b/k8s/apps/photos/templates/immich/secret-db.yaml @@ -0,0 +1,32 @@ +--- +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: "immich-db" +spec: + refreshInterval: 1h + secretStoreRef: + kind: ClusterSecretStore + name: chart-database + target: + name: "password.pg.immich" + data: + - secretKey: "DB_USERNAME" + remoteRef: + key: "password.pg.immich" + property: username + + - secretKey: "DB_PASSWORD" + remoteRef: + key: "password.pg.immich" + property: password + + - secretKey: "DB_HOSTNAME" + remoteRef: + key: "password.pg.immich" + property: host + + - secretKey: "DB_PORT" + remoteRef: + key: "password.pg.immich" + property: host diff --git a/k8s/apps/photos/templates/immich/secret-envs.yaml b/k8s/apps/photos/templates/immich/secret-envs.yaml new file mode 100644 index 0000000..398f595 --- /dev/null +++ b/k8s/apps/photos/templates/immich/secret-envs.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: immich-shared-envs + annotations: + secret-generator.v1.mittwald.de/autogenerate: TYPESENSE_API_KEY +stringData: + DB_DATABASE_NAME: immich \ No newline at end of file diff --git a/k8s/apps/photos/templates/machine-learning.yaml b/k8s/apps/photos/templates/machine-learning.yaml deleted file mode 100644 index 4d2cf14..0000000 --- a/k8s/apps/photos/templates/machine-learning.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{{- define "immich.machine-learning.hardcodedValues" -}} -global: - nameOverride: machine-learning - -service: - main: - enabled: true - primary: true - type: ClusterIP - ports: - http: - enabled: true - primary: true - port: 3003 - protocol: HTTP - -probes: - liveness: &probes - enabled: true - custom: true - spec: - httpGet: - path: /ping - port: http - initialDelaySeconds: 0 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 3 - readiness: *probes - startup: - enabled: false - -persistence: - library: - enabled: true - mountPath: /usr/src/app/upload - existingClaim: {{ .Values.immich.persistence.library.existingClaim }} -{{- end }} - -{{- /* Have to reference with index here because the dash breaks a normal dereference */}} -{{ if (index .Values "machine-learning").enabled }} -{{- $ctx := deepCopy . -}} -{{- $_ := get .Values "machine-learning" | mergeOverwrite $ctx.Values -}} -{{- $_ = include "immich.machine-learning.hardcodedValues" . | fromYaml | merge $ctx.Values -}} -{{- include "bjw-s.common.loader.all" $ctx }} -{{ end }} \ No newline at end of file diff --git a/k8s/apps/photos/templates/microservices.yaml b/k8s/apps/photos/templates/microservices.yaml deleted file mode 100644 index 272c369..0000000 --- a/k8s/apps/photos/templates/microservices.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- define "immich.microservices.hardcodedValues" -}} -global: - nameOverride: microservices - -command: "/bin/sh" -args: - - "./start-microservices.sh" - -service: - main: - enabled: false - -persistence: - library: - enabled: true - mountPath: /usr/src/app/upload - existingClaim: {{ .Values.immich.persistence.library.existingClaim }} -{{- end }} - -{{ if .Values.microservices.enabled }} -{{- $ctx := deepCopy . -}} -{{- $_ := get .Values "microservices" | mergeOverwrite $ctx.Values -}} -{{- $_ = include "immich.microservices.hardcodedValues" . | fromYaml | merge $ctx.Values -}} -{{- include "bjw-s.common.loader.all" $ctx }} -{{ end }} \ No newline at end of file diff --git a/k8s/apps/photos/templates/proxy.yaml b/k8s/apps/photos/templates/proxy.yaml deleted file mode 100644 index a620223..0000000 --- a/k8s/apps/photos/templates/proxy.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- define "immich.proxy.hardcodedValues" -}} -global: - nameOverride: proxy - -service: - main: - enabled: true - primary: true - type: ClusterIP - ports: - http: - enabled: true - primary: true - port: 8080 - protocol: HTTP -{{- end }} - -{{ if .Values.proxy.enabled }} -{{- $ctx := deepCopy . -}} -{{- $_ := get .Values "proxy" | mergeOverwrite $ctx.Values -}} -{{- $_ = include "immich.proxy.hardcodedValues" . | fromYaml | merge $ctx.Values -}} -{{- include "bjw-s.common.loader.all" $ctx }} -{{ end }} \ No newline at end of file diff --git a/k8s/apps/photos/templates/server.yaml b/k8s/apps/photos/templates/server.yaml deleted file mode 100644 index 3b7d973..0000000 --- a/k8s/apps/photos/templates/server.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- define "immich.server.hardcodedValues" -}} -global: - nameOverride: server - -command: "/bin/sh" -args: - - "./start-server.sh" - -service: - main: - enabled: true - primary: true - type: ClusterIP - ports: - http: - enabled: true - primary: true - port: 3001 - protocol: HTTP - -probes: - liveness: &probes - enabled: true - custom: true - spec: - httpGet: - path: /server-info/ping - port: http - initialDelaySeconds: 0 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 3 - readiness: *probes - startup: - enabled: false - -persistence: - library: - enabled: true - mountPath: /usr/src/app/upload - existingClaim: {{ .Values.immich.persistence.library.existingClaim }} -{{- end }} - -{{ if .Values.server.enabled }} -{{- $ctx := deepCopy . -}} -{{- $_ := get .Values "server" | mergeOverwrite $ctx.Values -}} -{{- $_ = include "immich.server.hardcodedValues" . | fromYaml | merge $ctx.Values -}} -{{- include "bjw-s.common.loader.all" $ctx }} -{{ end }} \ No newline at end of file diff --git a/k8s/apps/photos/templates/typesense.yaml b/k8s/apps/photos/templates/typesense.yaml deleted file mode 100644 index 3db250e..0000000 --- a/k8s/apps/photos/templates/typesense.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- define "immich.typesense.hardcodedValues" -}} -global: - nameOverride: typesense - -service: - main: - enabled: true - primary: true - type: ClusterIP - ports: - http: - enabled: true - primary: true - port: 8108 - protocol: HTTP - -probes: - liveness: &probes - enabled: true - custom: true - spec: - httpGet: - path: /health - port: http - initialDelaySeconds: 0 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 3 - readiness: *probes - startup: - enabled: false -{{- end }} - -{{ if .Values.typesense.enabled }} -{{- $ctx := deepCopy . -}} -{{- $_ := get .Values "typesense" | mergeOverwrite $ctx.Values -}} -{{- $_ = include "immich.typesense.hardcodedValues" . | fromYaml | merge $ctx.Values -}} -{{- include "bjw-s.common.loader.all" $ctx }} -{{ end }} \ No newline at end of file diff --git a/k8s/apps/photos/templates/web.yaml b/k8s/apps/photos/templates/web.yaml deleted file mode 100644 index a01be8c..0000000 --- a/k8s/apps/photos/templates/web.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- define "immich.web.hardcodedValues" -}} -global: - nameOverride: web - -service: - main: - enabled: true - primary: true - type: ClusterIP - ports: - http: - enabled: true - primary: true - port: 3000 - protocol: HTTP - -command: "/bin/sh" -args: - - "./entrypoint.sh" -{{- end }} - -{{ if .Values.web.enabled }} -{{- $ctx := deepCopy . -}} -{{- $_ := get .Values "web" | mergeOverwrite $ctx.Values -}} -{{- $_ = include "immich.web.hardcodedValues" . | fromYaml | merge $ctx.Values -}} -{{- include "bjw-s.common.loader.all" $ctx }} -{{ end }} \ No newline at end of file diff --git a/k8s/apps/photos/values.yaml b/k8s/apps/photos/values.yaml index d81266b..ba28778 100644 --- a/k8s/apps/photos/values.yaml +++ b/k8s/apps/photos/values.yaml @@ -1,44 +1,137 @@ -## This chart relies on the common library chart from bjw-s -## You can find it at https://github.com/bjw-s/helm-charts/tree/main/charts/library/common -## Refer there for more detail about the supported values -# These entries are shared between all the Immich components - -env: - REDIS_HOSTNAME: '{{ printf "%s-redis-master" .Release.Name }}' - 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 }}" - TYPESENSE_ENABLED: "{{ .Values.typesense.enabled }}" - TYPESENSE_API_KEY: "{{ .Values.typesense.env.TYPESENSE_API_KEY }}" - TYPESENSE_HOST: '{{ printf "%s-typesense" .Release.Name }}' - IMMICH_WEB_URL: '{{ printf "http://%s-web:3000" .Release.Name }}' - IMMICH_SERVER_URL: '{{ printf "http://%s-server:3001" .Release.Name }}' - IMMICH_MACHINE_LEARNING_URL: '{{ printf "http://%s-machine-learning:3003" .Release.Name }}' - -image: - tag: v1.79.1 +global: + timezone: changeme + nfs: + storageClass: changeme immich: - persistence: - # Main data store for all photos shared between different components. - library: - # Automatically creating the library volume is not supported by this chart - # You have to specify an existing PVC to use - existingClaim: - -# Dependencies - -postgresql: - enabled: false - global: - postgresql: - auth: - username: immich - database: immich - password: immich + shared: + version: v1.79.1 + libraryPVC: + nfs: + path: changeme + server: changeme + apps: + web: + replicas: 1 + port: 80 + image: ghcr.io/immich-app/immich-web + livenessProbePath: "/web-info/ping" + readinessProbePath: "/web-info/ping" + livenessProbe: + failureThreshold: 3 + initialDelaySeconds: 0 + periodSeconds: 10 + tcpSocket: + port: 3000 + timeoutSeconds: 1 + readinessProbe: + failureThreshold: 3 + initialDelaySeconds: 0 + periodSeconds: 10 + tcpSocket: + port: 3000 + timeoutSeconds: 1 + startupProbe: + failureThreshold: 30 + initialDelaySeconds: 0 + periodSeconds: 5 + tcpSocket: + port: 3000 + timeoutSeconds: 1 + server: + replicas: 1 + port: 80 + image: ghcr.io/immich-app/immich-server + livenessProbePath: "/server-info/ping" + readinessProbePath: "/server-info/ping" + livenessProbe: + failureThreshold: 3 + httpGet: + path: /server-info/ping + port: http + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /server-info/ping + port: http + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + microservices: + replicas: 1 + port: 80 + livenessProbePath: "" + readinessProbePath: "" + machineLearning: + replicas: 1 + port: 80 + image: ghcr.io/immich-app/immich-machine-learning + env: + - name: TRANSFORMERS_CACHE + value: /cache + persistence: + cache: + mountPath: /cache + accessModes: + - ReadWriteMany + resources: + limits: + storage: 5Gi + requests: + storage: 5Gi + livenessProbe: + failureThreshold: 3 + httpGet: + path: /ping + port: http + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /ping + port: http + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + typesense: + port: 8108 + image: docker.io/typesense/typesense + version: 0.24.0 + env: + - name: TYPESENSE_DATA_DIR + value: /tsdata + persistence: + tsdata: + mountPath: /tsdata + accessModes: + - ReadWriteMany + resources: + limits: + storage: 5Gi + requests: + storage: 5Gi + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: http + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: http + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 redis: enabled: false @@ -46,85 +139,135 @@ redis: auth: enabled: false -typesense: - enabled: true - env: - TYPESENSE_DATA_DIR: /tsdata - TYPESENSE_API_KEY: typesense - persistence: - tsdata: - enabled: true - accessMode: ReadWriteOnce - size: 1Gi - # storageClass: storage-class - image: - repository: docker.io/typesense/typesense - tag: 0.24.0 - pullPolicy: IfNotPresent -# Immich components -server: - enabled: true - image: - repository: ghcr.io/immich-app/immich-server - pullPolicy: IfNotPresent -microservices: - enabled: true - env: - REVERSE_GEOCODING_DUMP_DIRECTORY: /geodata-cache - persistence: - geodata-cache: - enabled: true - size: 1Gi - accessMode: ReadWriteMany - # storageClass: your-class - image: - repository: ghcr.io/immich-app/immich-server - pullPolicy: IfNotPresent +# ## This chart relies on the common library chart from bjw-s +# ## You can find it at https://github.com/bjw-s/helm-charts/tree/main/charts/library/common +# ## Refer there for more detail about the supported values -machine-learning: - enabled: true - image: - repository: ghcr.io/immich-app/immich-machine-learning - pullPolicy: IfNotPresent - env: - TRANSFORMERS_CACHE: /cache - persistence: - cache: - enabled: true - size: 10Gi - accessMode: ReadWriteMany - # storageClass: your-class +# # These entries are shared between all the Immich components -web: - enabled: true - image: - repository: ghcr.io/immich-app/immich-web - pullPolicy: IfNotPresent - persistence: - library: - enabled: false +# env: +# REDIS_HOSTNAME: '{{ printf "%s-redis-master" .Release.Name }}' +# 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 }}" +# TYPESENSE_ENABLED: "{{ .Values.typesense.enabled }}" +# TYPESENSE_API_KEY: "{{ .Values.typesense.env.TYPESENSE_API_KEY }}" +# TYPESENSE_HOST: '{{ printf "%s-typesense" .Release.Name }}' +# IMMICH_WEB_URL: '{{ printf "http://%s-web:3000" .Release.Name }}' +# IMMICH_SERVER_URL: '{{ printf "http://%s-server:3001" .Release.Name }}' +# IMMICH_MACHINE_LEARNING_URL: '{{ printf "http://%s-machine-learning:3003" .Release.Name }}' -proxy: - enabled: false - image: - repository: ghcr.io/immich-app/immich-proxy - pullPolicy: IfNotPresent +# image: +# tag: v1.79.1 - persistence: - library: - enabled: false +# immich: +# persistence: +# # Main data store for all photos shared between different components. +# library: +# # Automatically creating the library volume is not supported by this chart +# # You have to specify an existing PVC to use +# existingClaim: - ingress: - main: - enabled: false - annotations: - # proxy-body-size is set to 0 to remove the body limit on file uploads - nginx.ingress.kubernetes.io/proxy-body-size: "0" - hosts: - - host: immich.local - paths: - - path: "/" - tls: [] \ No newline at end of file +# # Dependencies + +# postgresql: +# enabled: false +# global: +# postgresql: +# auth: +# username: immich +# database: immich +# password: immich + + +# typesense: +# enabled: true +# env: +# TYPESENSE_DATA_DIR: /tsdata +# TYPESENSE_API_KEY: typesense +# persistence: +# tsdata: +# enabled: true +# accessMode: ReadWriteOnce +# size: 1Gi +# # storageClass: storage-class +# image: +# repository: docker.io/typesense/typesense +# tag: 0.24.0 +# pullPolicy: IfNotPresent + +# # Immich components + +# server: +# enabled: true +# image: +# repository: ghcr.io/immich-app/immich-server +# pullPolicy: IfNotPresent + +# microservices: +# enabled: true +# env: +# REVERSE_GEOCODING_DUMP_DIRECTORY: /geodata-cache +# persistence: +# geodata-cache: +# enabled: true +# size: 1Gi +# accessMode: ReadWriteMany +# # storageClass: your-class +# image: +# repository: ghcr.io/immich-app/immich-server +# pullPolicy: IfNotPresent + +# machine-learning: +# enabled: true +# image: +# repository: ghcr.io/immich-app/immich-machine-learning +# pullPolicy: IfNotPresent +# env: +# TRANSFORMERS_CACHE: /cache +# persistence: +# cache: +# enabled: true +# size: 10Gi +# accessMode: ReadWriteMany +# # storageClass: your-class + +# web: +# enabled: true +# image: +# repository: ghcr.io/immich-app/immich-web +# pullPolicy: IfNotPresent +# persistence: +# library: +# enabled: true +# size: 10Gi +# accessMode: ReadWriteMany + +# proxy: +# enabled: true +# image: +# repository: ghcr.io/immich-app/immich-proxy +# pullPolicy: IfNotPresent + +# persistence: +# library: +# enabled: true +# size: 10Gi +# accessMode: ReadWriteMany + +# ingress: +# main: +# enabled: false +# annotations: +# # proxy-body-size is set to 0 to remove the body limit on file uploads +# nginx.ingress.kubernetes.io/proxy-body-size: "0" +# hosts: +# - host: immich.local +# paths: +# - path: "/" +# tls: [] \ No newline at end of file diff --git a/k8s/argoapps/values.yaml b/k8s/argoapps/values.yaml index e49cd08..943c710 100644 --- a/k8s/argoapps/values.yaml +++ b/k8s/argoapps/values.yaml @@ -42,17 +42,12 @@ videohosting: apps: photos: values: |- - typesense: - persistence: - storageClass: {{ .Values.global.nfs.storageClass }} - microservices: - persistence: - geodata-cache: - storageClass: {{ .Values.global.nfs.storageClass }} - machine-learning: - persistence: - cache: - storageClass: {{ .Values.global.nfs.storageClass }} + immich: + shared: + mediaPVC: + nfs: + path: {{ .Values.global.nfs.additionalShares.familyphotos }} + server: {{ .Values.global.nfs.server }} videohosting: values: |- {{ .Values.videohosting | toYaml }}