immich-app / immich-charts

Helm chart implementation of Immich
https://immich.app
GNU Affero General Public License v3.0
107 stars 45 forks source link

Install fails with default options #43

Closed csm10495 closed 8 months ago

csm10495 commented 11 months ago

Hey folks,

I can't seem to get helm to install this directly:

csm10495@csm10495-desk:~/Desktop/immich $ helm install --create-namespace --namespace immich immich immich/immich
Error: INSTALLATION FAILED: execution error at (immich/templates/checks.yaml:1:64): .Values.immich.persistence.library.existingClaim is required.

This matches the step on the readme. Am I missing something?

mvivaldi commented 11 months ago

Hi, in the values.yaml you will find this:

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:

You need to create the PVC before using the chart.. something like this:

##pvc.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: immich-data
  namespace: immich
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 100Gi
  storageClassName: default
csm10495 commented 11 months ago

Sure but even after that i get something like this when trying to use the local chart:

csm10495@csm10495-desk:~/Desktop/immich/immich/charts/immich $ helm install --create-namespace --namespace immich immich .
Error: INSTALLATION FAILED: An error occurred while checking for chart dependencies. You may need to run `helm dependency build` to fetch missing dependencies: found in Chart.yaml, but missing in charts/ directory: common, postgresql, redis

So then trying that gets:

csm10495@csm10495-desk:~/Desktop/immich/immich/charts/immich $ helm dependency build
Error: no repository definition for https://bjw-s.github.io/helm-charts, https://charts.bitnami.com/bitnami, https://charts.bitnami.com/bitnami. Please add the missing repos via 'helm repo add'

.. which basically gives me a dead end at the moment.

When trying to use the remote one, I get:

csm10495@csm10495-desk:~/Desktop/immich/immich/charts/immich 1 $ helm install --create-namespace --namespace immich immich immich/immich -f values.yaml
Error: INSTALLATION FAILED: 6 errors occurred:
        * Service "immich" is invalid: spec.ports[0].port: Invalid value: 0: must be between 1 and 65535, inclusive
        * Service "immich" is invalid: spec.ports[0].port: Invalid value: 0: must be between 1 and 65535, inclusive
        * Service "immich" is invalid: spec.ports[0].port: Invalid value: 0: must be between 1 and 65535, inclusive
        * Deployment.apps "immich" is invalid: [spec.template.spec.containers[0].ports[0].containerPort: Required value, spec.template.spec.containers[0].livenessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].readinessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].startupProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive]
        * Deployment.apps "immich" is invalid: [spec.template.spec.containers[0].ports[0].containerPort: Required value, spec.template.spec.containers[0].livenessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].readinessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].startupProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive]
        * Deployment.apps "immich" is invalid: [spec.template.spec.containers[0].ports[0].containerPort: Required value, spec.template.spec.containers[0].livenessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].readinessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].startupProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive]

My ask would be that there be some example values and documentation to at least get something running.

For example, the docker compose options on https://documentation.immich.app/docs/install/docker-compose just worked without messing with anything really.

bo0tzz commented 11 months ago

Can you post the values.yaml you're using?

csm10495 commented 10 months ago

Sure. It's basically the regular one with an existingClaim set:

## 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

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: "{{ .Release.Name }}-my-pvc"

# Dependencies

postgresql:
  enabled: false
  global:
    postgresql:
      auth:
        username: immich
        database: immich
        password: immich

redis:
  enabled: false
  architecture: standalone
  auth:
    enabled: false

typesense:
  enabled: false
  env:
    TYPESENSE_DATA_DIR: /tsdata
    TYPESENSE_API_KEY: typesense
  persistence:
    tsdata:
      # Enabling typesense persistence is recommended to avoid slow reindexing
      enabled: false
      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
      # Optional: Set this to pvc to avoid downloading the geodata every start.
      type: emptyDir
      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
      # Optional: Set this to pvc to avoid downloading the ML models every start.
      type: emptyDir
      accessMode: ReadWriteMany
      # storageClass: your-class

web:
  enabled: true
  image:
    repository: ghcr.io/immich-app/immich-web
    pullPolicy: IfNotPresent
  persistence:
    library:
      enabled: false

proxy:
  enabled: true
  image:
    repository: ghcr.io/immich-app/immich-proxy
    pullPolicy: IfNotPresent

  persistence:
    library:
      enabled: false

  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: []

that PVC is made via:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ .Release.Name }}-my-pvc  # This generates a unique name for the PVC using the Helm release name
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 10Gi
bo0tzz commented 10 months ago

You don't need to copy the full values file, you only need to set the ones you need. I started a PR to document the installation a little bit better, you can find the updated README at https://github.com/immich-app/immich-charts/blob/chore/docs/README.md. Copied from there:

There are a few things that you are required to configure in your values.yaml before installing the chart:

  • You need to separately create a PVC for your library volume and configure immich.persistence.library.existingClaim to reference that PVC
  • You need to make sure that Immich has access to a redis, postgresql, and typesense instance. You can do this either by enabling them directly in the values.yaml, or by manually setting the entries under the env key to point to existing instances.

In this case, you're missing the latter one.

csm10495 commented 10 months ago

I went about trying to just set them to enabled in values.yaml.

Now i have:

## 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

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: "{{ .Release.Name }}-my-pvc"

# Dependencies

postgresql:
  enabled: true
  global:
    postgresql:
      auth:
        username: immich
        database: immich
        password: immich

redis:
  enabled: true
  architecture: standalone
  auth:
    enabled: false

typesense:
  enabled: true
  env:
    TYPESENSE_DATA_DIR: /tsdata
    TYPESENSE_API_KEY: typesense
  persistence:
    tsdata:
      # Enabling typesense persistence is recommended to avoid slow reindexing
      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
      # Optional: Set this to pvc to avoid downloading the geodata every start.
      type: emptyDir
      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
      # Optional: Set this to pvc to avoid downloading the ML models every start.
      type: emptyDir
      accessMode: ReadWriteMany
      # storageClass: your-class

web:
  enabled: true
  image:
    repository: ghcr.io/immich-app/immich-web
    pullPolicy: IfNotPresent
  persistence:
    library:
      enabled: false

proxy:
  enabled: true
  image:
    repository: ghcr.io/immich-app/immich-proxy
    pullPolicy: IfNotPresent

  persistence:
    library:
      enabled: false

  ingress:
    main:
      enabled: true
      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: []

Though it gets about the same error:

helm install --create-namespace --namespace immich immich . -f values.yaml
Error: INSTALLATION FAILED: 6 errors occurred:
        * Service "immich" is invalid: spec.ports[0].port: Invalid value: 0: must be between 1 and 65535, inclusive
        * Service "immich" is invalid: spec.ports[0].port: Invalid value: 0: must be between 1 and 65535, inclusive
        * Service "immich" is invalid: spec.ports[0].port: Invalid value: 0: must be between 1 and 65535, inclusive
        * Deployment.apps "immich" is invalid: [spec.template.spec.containers[0].ports[0].containerPort: Required value, spec.template.spec.containers[0].livenessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].readinessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].startupProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive]
        * Deployment.apps "immich" is invalid: [spec.template.spec.containers[0].ports[0].containerPort: Required value, spec.template.spec.containers[0].livenessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].readinessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].startupProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive]
        * Deployment.apps "immich" is invalid: [spec.template.spec.containers[0].ports[0].containerPort: Required value, spec.template.spec.containers[0].livenessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].readinessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].startupProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive]
bo0tzz commented 10 months ago

I can't reproduce this, I used your exact values.yaml and commands but it all works fine on my end. Maybe try starting from scratch again, using a values file that only has the settings you need to override, and installing via the helm repository rather than building from the git repo?

csm10495 commented 10 months ago

Weird. I wonder if it has something to do with my setup. Same thing even from scratch via the helm repository:

csm10495@csm10495-desk:~/Desktop/tmp $ ls -la
total 296
drwxr-xr-x 1 csm10495 197121    0 Oct  9 11:58 ./
drwxr-xr-x 1 csm10495 197121    0 Oct  9 11:58 ../
-rw-r--r-- 1 csm10495 197121 3737 Oct  8 18:18 values.yaml
csm10495@csm10495-desk:~/Desktop/tmp $ cat values.yaml
## 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

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: "{{ .Release.Name }}-my-pvc"

# Dependencies

postgresql:
  enabled: true
  global:
    postgresql:
      auth:
        username: immich
        database: immich
        password: immich

redis:
  enabled: true
  architecture: standalone
  auth:
    enabled: false

typesense:
  enabled: true
  env:
    TYPESENSE_DATA_DIR: /tsdata
    TYPESENSE_API_KEY: typesense
  persistence:
    tsdata:
      # Enabling typesense persistence is recommended to avoid slow reindexing
      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
      # Optional: Set this to pvc to avoid downloading the geodata every start.
      type: emptyDir
      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
      # Optional: Set this to pvc to avoid downloading the ML models every start.
      type: emptyDir
      accessMode: ReadWriteMany
      # storageClass: your-class

web:
  enabled: true
  image:
    repository: ghcr.io/immich-app/immich-web
    pullPolicy: IfNotPresent
  persistence:
    library:
      enabled: false

proxy:
  enabled: true
  image:
    repository: ghcr.io/immich-app/immich-proxy
    pullPolicy: IfNotPresent

  persistence:
    library:
      enabled: false

  ingress:
    main:
      enabled: true
      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: []
csm10495@csm10495-desk:~/Desktop/tmp $ helm install --create-namespace --namespace immich immich immich/immich -f values
.yaml
Error: INSTALLATION FAILED: 6 errors occurred:
        * Service "immich" is invalid: spec.ports[0].port: Invalid value: 0: must be between 1 and 65535, inclusive
        * Service "immich" is invalid: spec.ports[0].port: Invalid value: 0: must be between 1 and 65535, inclusive
        * Service "immich" is invalid: spec.ports[0].port: Invalid value: 0: must be between 1 and 65535, inclusive
        * Deployment.apps "immich" is invalid: [spec.template.spec.containers[0].ports[0].containerPort: Required value, spec.template.spec.containers[0].livenessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].readinessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].startupProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive]
        * Deployment.apps "immich" is invalid: [spec.template.spec.containers[0].ports[0].containerPort: Required value, spec.template.spec.containers[0].livenessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].readinessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].startupProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive]
        * Deployment.apps "immich" is invalid: [spec.template.spec.containers[0].ports[0].containerPort: Required value, spec.template.spec.containers[0].livenessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].readinessProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].startupProbe.tcpSocket.port: Invalid value: 0: must be between 1 and 65535, inclusive]
helm version
version.BuildInfo{Version:"v3.12.3", GitCommit:"3a31588ad33fe3b89af5a2a54ee1d25bfe6eaa5e", GitTreeState:"clean", GoVersion:"go1.20.7"}
uhthomas commented 10 months ago

Can you try without providing a values.yaml at all? Just helm install --create-namespace --namespace immich immich immich/immich as described in https://github.com/immich-app/immich-charts?tab=readme-ov-file#installation?

csm10495 commented 10 months ago

That fails this way:

csm10495@csm10495-desk:~ $ helm install --create-namespace --namespace immich immich immich/immich
Error: INSTALLATION FAILED: execution error at (immich/templates/checks.yaml:1:64): .Values.immich.persistence.library.existingClaim is required.
PixelJonas commented 10 months ago

Mhh just tried reproducing it by adding the repo via

helm repo add immich https://immich-app.github.io/immich-charts then pasting the last values.yaml you provided and running

helm template immich immich/immich -f values.yaml which gave me all the manifests without throwing an error.

can you try removing the repo first via helm repo remove immich and then running the commands above?

csm10495 commented 10 months ago

No dice:

csm10495@csm10495-desk:~/Desktop $ helm repo remove immich
"immich" has been removed from your repositories
csm10495@csm10495-desk:~/Desktop $ helm template immich immich/immich -f immich-charts/charts/immich/values.yaml
Error: Chart.yaml file is missing

(Side note: Thanks so much for taking the time here folks)

PixelJonas commented 10 months ago

no I mean, you'd still need to add the repo afterwards. So in full

helm repo remove immich
helm repo add immich https://immich-app.github.io/immich-charts

then please create a values.yaml based on the last you provided. Outside of the Git repo of the chart and run

helm template immich immich/immich -f values.yaml

csm10495 commented 10 months ago

Still getting an error:

csm10495@csm10495-desk:~/Desktop/tmp $ helm repo remove immich
"immich" has been removed from your repositories
csm10495@csm10495-desk:~/Desktop/tmp $ helm repo add immich https://immich-app.github.io/immich-charts
"immich" has been added to your repositories
csm10495@csm10495-desk:~/Desktop/tmp $ ls
values.yaml
csm10495@csm10495-desk:~/Desktop/tmp $ cat values.yaml
## 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

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: "{{ .Release.Name }}-my-pvc"

# Dependencies

postgresql:
  enabled: true
  global:
    postgresql:
      auth:
        username: immich
        database: immich
        password: immich

redis:
  enabled: true
  architecture: standalone
  auth:
    enabled: false

typesense:
  enabled: true
  env:
    TYPESENSE_DATA_DIR: /tsdata
    TYPESENSE_API_KEY: typesense
  persistence:
    tsdata:
      # Enabling typesense persistence is recommended to avoid slow reindexing
      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
      # Optional: Set this to pvc to avoid downloading the geodata every start.
      type: emptyDir
      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
      # Optional: Set this to pvc to avoid downloading the ML models every start.
      type: emptyDir
      accessMode: ReadWriteMany
      # storageClass: your-class

web:
  enabled: true
  image:
    repository: ghcr.io/immich-app/immich-web
    pullPolicy: IfNotPresent
  persistence:
    library:
      enabled: false

proxy:
  enabled: true
  image:
    repository: ghcr.io/immich-app/immich-proxy
    pullPolicy: IfNotPresent

  persistence:
    library:
      enabled: false

  ingress:
    main:
      enabled: true
      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: []csm10495@csm10495-desk:~/Desktop/tmp $
csm10495@csm10495-desk:~/Desktop/tmp $
csm10495@csm10495-desk:~/Desktop/tmp $ helm template immich immich/immich -f values.yaml > output.yaml
csm10495@csm10495-desk:~/Desktop/tmp $ cat output.yaml
---
# Source: immich/charts/redis/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: true
metadata:
  name: immich-redis
  namespace: "default"
  labels:
    app.kubernetes.io/name: redis
    helm.sh/chart: redis-17.11.6
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
---
# Source: immich/charts/postgresql/templates/secrets.yaml
apiVersion: v1
kind: Secret
metadata:
  name: immich-postgresql
  namespace: "default"
  labels:
    app.kubernetes.io/name: postgresql
    helm.sh/chart: postgresql-11.8.1
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
type: Opaque
data:
  postgres-password: "RTZiYk1va20wVQ=="
  password: "aW1taWNo"
  # We don't auto-generate LDAP password when it's not provided as we do for other passwords
---
# Source: immich/charts/redis/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: immich-redis-configuration
  namespace: "default"
  labels:
    app.kubernetes.io/name: redis
    helm.sh/chart: redis-17.11.6
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
data:
  redis.conf: |-
    # User-supplied common configuration:
    # Enable AOF https://redis.io/topics/persistence#append-only-file
    appendonly yes
    # Disable RDB persistence, AOF persistence already enabled.
    save ""
    # End of common configuration
  master.conf: |-
    dir /data
    # User-supplied master configuration:
    rename-command FLUSHDB ""
    rename-command FLUSHALL ""
    # End of master configuration
  replica.conf: |-
    dir /data
    # User-supplied replica configuration:
    rename-command FLUSHDB ""
    rename-command FLUSHALL ""
    # End of replica configuration
---
# Source: immich/charts/redis/templates/health-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: immich-redis-health
  namespace: "default"
  labels:
    app.kubernetes.io/name: redis
    helm.sh/chart: redis-17.11.6
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
data:
  ping_readiness_local.sh: |-
    #!/bin/bash

    [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
    [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
    response=$(
      timeout -s 15 $1 \
      redis-cli \
        -h localhost \
        -p $REDIS_PORT \
        ping
    )
    if [ "$?" -eq "124" ]; then
      echo "Timed out"
      exit 1
    fi
    if [ "$response" != "PONG" ]; then
      echo "$response"
      exit 1
    fi
  ping_liveness_local.sh: |-
    #!/bin/bash

    [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
    [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
    response=$(
      timeout -s 15 $1 \
      redis-cli \
        -h localhost \
        -p $REDIS_PORT \
        ping
    )
    if [ "$?" -eq "124" ]; then
      echo "Timed out"
      exit 1
    fi
    responseFirstWord=$(echo $response | head -n1 | awk '{print $1;}')
    if [ "$response" != "PONG" ] && [ "$responseFirstWord" != "LOADING" ] && [ "$responseFirstWord" != "MASTERDOWN" ]; then
      echo "$response"
      exit 1
    fi
  ping_readiness_master.sh: |-
    #!/bin/bash

    [[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
    [[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
    response=$(
      timeout -s 15 $1 \
      redis-cli \
        -h $REDIS_MASTER_HOST \
        -p $REDIS_MASTER_PORT_NUMBER \
        ping
    )
    if [ "$?" -eq "124" ]; then
      echo "Timed out"
      exit 1
    fi
    if [ "$response" != "PONG" ]; then
      echo "$response"
      exit 1
    fi
  ping_liveness_master.sh: |-
    #!/bin/bash

    [[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
    [[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
    response=$(
      timeout -s 15 $1 \
      redis-cli \
        -h $REDIS_MASTER_HOST \
        -p $REDIS_MASTER_PORT_NUMBER \
        ping
    )
    if [ "$?" -eq "124" ]; then
      echo "Timed out"
      exit 1
    fi
    responseFirstWord=$(echo $response | head -n1 | awk '{print $1;}')
    if [ "$response" != "PONG" ] && [ "$responseFirstWord" != "LOADING" ]; then
      echo "$response"
      exit 1
    fi
  ping_readiness_local_and_master.sh: |-
    script_dir="$(dirname "$0")"
    exit_status=0
    "$script_dir/ping_readiness_local.sh" $1 || exit_status=$?
    "$script_dir/ping_readiness_master.sh" $1 || exit_status=$?
    exit $exit_status
  ping_liveness_local_and_master.sh: |-
    script_dir="$(dirname "$0")"
    exit_status=0
    "$script_dir/ping_liveness_local.sh" $1 || exit_status=$?
    "$script_dir/ping_liveness_master.sh" $1 || exit_status=$?
    exit $exit_status
---
# Source: immich/charts/redis/templates/scripts-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: immich-redis-scripts
  namespace: "default"
  labels:
    app.kubernetes.io/name: redis
    helm.sh/chart: redis-17.11.6
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
data:
  start-master.sh: |
    #!/bin/bash

    [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
    if [[ -f /opt/bitnami/redis/mounted-etc/master.conf ]];then
        cp /opt/bitnami/redis/mounted-etc/master.conf /opt/bitnami/redis/etc/master.conf
    fi
    if [[ -f /opt/bitnami/redis/mounted-etc/redis.conf ]];then
        cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf
    fi
    ARGS=("--port" "${REDIS_PORT}")
    ARGS+=("--protected-mode" "no")
    ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf")
    ARGS+=("--include" "/opt/bitnami/redis/etc/master.conf")
    exec redis-server "${ARGS[@]}"
---
# Source: immich/templates/typesense.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: immich-typesense-tsdata
  labels:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: typesense
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
  annotations:
spec:
  accessModes:
    - "ReadWriteOnce"
  resources:
    requests:
      storage: "1Gi"
---
# Source: immich/charts/postgresql/templates/primary/svc-headless.yaml
apiVersion: v1
kind: Service
metadata:
  name: immich-postgresql-hl
  namespace: "default"
  labels:
    app.kubernetes.io/name: postgresql
    helm.sh/chart: postgresql-11.8.1
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: primary
    # Use this annotation in addition to the actual publishNotReadyAddresses
    # field below because the annotation will stop being respected soon but the
    # field is broken in some versions of Kubernetes:
    # https://github.com/kubernetes/kubernetes/issues/58662
    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
  type: ClusterIP
  clusterIP: None
  # We want all pods in the StatefulSet to have their addresses published for
  # the sake of the other Postgresql pods even before they're ready, since they
  # have to be able to talk to each other in order to become ready.
  publishNotReadyAddresses: true
  ports:
    - name: tcp-postgresql
      port: 5432
      targetPort: tcp-postgresql
  selector:
    app.kubernetes.io/name: postgresql
    app.kubernetes.io/instance: immich
    app.kubernetes.io/component: primary
---
# Source: immich/charts/postgresql/templates/primary/svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: immich-postgresql
  namespace: "default"
  labels:
    app.kubernetes.io/name: postgresql
    helm.sh/chart: postgresql-11.8.1
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: primary
  annotations:
spec:
  type: ClusterIP
  sessionAffinity: None
  ports:
    - name: tcp-postgresql
      port: 5432
      targetPort: tcp-postgresql
      nodePort: null
  selector:
    app.kubernetes.io/name: postgresql
    app.kubernetes.io/instance: immich
    app.kubernetes.io/component: primary
---
# Source: immich/charts/redis/templates/headless-svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: immich-redis-headless
  namespace: "default"
  labels:
    app.kubernetes.io/name: redis
    helm.sh/chart: redis-17.11.6
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
  annotations:

spec:
  type: ClusterIP
  clusterIP: None
  ports:
    - name: tcp-redis
      port: 6379
      targetPort: redis
  selector:
    app.kubernetes.io/name: redis
    app.kubernetes.io/instance: immich
---
# Source: immich/charts/redis/templates/master/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: immich-redis-master
  namespace: "default"
  labels:
    app.kubernetes.io/name: redis
    helm.sh/chart: redis-17.11.6
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: master
spec:
  type: ClusterIP
  internalTrafficPolicy: Cluster
  sessionAffinity: None
  ports:
    - name: tcp-redis
      port: 6379
      targetPort: redis
      nodePort: null
  selector:
    app.kubernetes.io/name: redis
    app.kubernetes.io/instance: immich
    app.kubernetes.io/component: master
---
# Source: immich/templates/machine-learning.yaml
apiVersion: v1
kind: Service
metadata:
  name: immich
  labels:
    app.kubernetes.io/service: immich
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: immich
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
  annotations:
spec:
  type: ClusterIP
  ports:
    - port:
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/name: immich
---
# Source: immich/templates/microservices.yaml
apiVersion: v1
kind: Service
metadata:
  name: immich
  labels:
    app.kubernetes.io/service: immich
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: immich
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
  annotations:
spec:
  type: ClusterIP
  ports:
    - port:
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/name: immich
---
# Source: immich/templates/proxy.yaml
apiVersion: v1
kind: Service
metadata:
  name: immich-proxy
  labels:
    app.kubernetes.io/service: immich-proxy
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: proxy
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
  annotations:
spec:
  type: ClusterIP
  ports:
    - port: 8080
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/name: proxy
---
# Source: immich/templates/server.yaml
apiVersion: v1
kind: Service
metadata:
  name: immich
  labels:
    app.kubernetes.io/service: immich
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: immich
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
  annotations:
spec:
  type: ClusterIP
  ports:
    - port:
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/name: immich
---
# Source: immich/templates/typesense.yaml
apiVersion: v1
kind: Service
metadata:
  name: immich-typesense
  labels:
    app.kubernetes.io/service: immich-typesense
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: typesense
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
  annotations:
spec:
  type: ClusterIP
  ports:
    - port: 8108
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/name: typesense
---
# Source: immich/templates/web.yaml
apiVersion: v1
kind: Service
metadata:
  name: immich-web
  labels:
    app.kubernetes.io/service: immich-web
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: web
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
  annotations:
spec:
  type: ClusterIP
  ports:
    - port: 3000
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/name: web
---
# Source: immich/templates/machine-learning.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: immich
  labels:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: immich
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: immich
      app.kubernetes.io/instance: immich
  template:
    metadata:
      labels:
        app.kubernetes.io/name: immich
        app.kubernetes.io/instance: immich
    spec:

      serviceAccountName: default
      automountServiceAccountToken: true
      dnsPolicy: ClusterFirst
      enableServiceLinks: true
      containers:
        - name: immich
          image: ghcr.io/immich-app/immich-machine-learning:v1.79.1
          imagePullPolicy: IfNotPresent
          env:
            - name: DB_DATABASE_NAME
              value: immich
            - name: DB_HOSTNAME
              value: immich-postgresql
            - name: DB_PASSWORD
              value: immich
            - name: DB_USERNAME
              value: immich
            - name: IMMICH_MACHINE_LEARNING_URL
              value: http://immich-machine-learning:3003
            - name: IMMICH_SERVER_URL
              value: http://immich-server:3001
            - name: IMMICH_WEB_URL
              value: http://immich-web:3000
            - name: REDIS_HOSTNAME
              value: immich-redis-master
            - name: TRANSFORMERS_CACHE
              value: /cache
            - name: TYPESENSE_API_KEY
              value: typesense
            - name: TYPESENSE_ENABLED
              value: "true"
            - name: TYPESENSE_HOST
              value: immich-typesense
          ports:
            - name: http
              containerPort:
              protocol: TCP
          volumeMounts:
            - name: cache
              mountPath: /cache
          livenessProbe:
            failureThreshold: 3
            initialDelaySeconds: 0
            periodSeconds: 10
            tcpSocket:
              port: 0
            timeoutSeconds: 1
          readinessProbe:
            failureThreshold: 3
            initialDelaySeconds: 0
            periodSeconds: 10
            tcpSocket:
              port: 0
            timeoutSeconds: 1
          startupProbe:
            failureThreshold: 30
            initialDelaySeconds: 0
            periodSeconds: 5
            tcpSocket:
              port: 0
            timeoutSeconds: 1
      volumes:
        - name: cache
          emptyDir:
            {}
---
# Source: immich/templates/microservices.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: immich
  labels:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: immich
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: immich
      app.kubernetes.io/instance: immich
  template:
    metadata:
      labels:
        app.kubernetes.io/name: immich
        app.kubernetes.io/instance: immich
    spec:

      serviceAccountName: default
      automountServiceAccountToken: true
      dnsPolicy: ClusterFirst
      enableServiceLinks: true
      containers:
        - name: immich
          image: ghcr.io/immich-app/immich-server:v1.79.1
          imagePullPolicy: IfNotPresent
          env:
            - name: DB_DATABASE_NAME
              value: immich
            - name: DB_HOSTNAME
              value: immich-postgresql
            - name: DB_PASSWORD
              value: immich
            - name: DB_USERNAME
              value: immich
            - name: IMMICH_MACHINE_LEARNING_URL
              value: http://immich-machine-learning:3003
            - name: IMMICH_SERVER_URL
              value: http://immich-server:3001
            - name: IMMICH_WEB_URL
              value: http://immich-web:3000
            - name: REDIS_HOSTNAME
              value: immich-redis-master
            - name: REVERSE_GEOCODING_DUMP_DIRECTORY
              value: /geodata-cache
            - name: TYPESENSE_API_KEY
              value: typesense
            - name: TYPESENSE_ENABLED
              value: "true"
            - name: TYPESENSE_HOST
              value: immich-typesense
          ports:
            - name: http
              containerPort:
              protocol: TCP
          volumeMounts:
            - name: geodata-cache
              mountPath: /geodata-cache
          livenessProbe:
            failureThreshold: 3
            initialDelaySeconds: 0
            periodSeconds: 10
            tcpSocket:
              port: 0
            timeoutSeconds: 1
          readinessProbe:
            failureThreshold: 3
            initialDelaySeconds: 0
            periodSeconds: 10
            tcpSocket:
              port: 0
            timeoutSeconds: 1
          startupProbe:
            failureThreshold: 30
            initialDelaySeconds: 0
            periodSeconds: 5
            tcpSocket:
              port: 0
            timeoutSeconds: 1
      volumes:
        - name: geodata-cache
          emptyDir:
            {}
---
# Source: immich/templates/proxy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: immich-proxy
  labels:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: proxy
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: proxy
      app.kubernetes.io/instance: immich
  template:
    metadata:
      labels:
        app.kubernetes.io/name: proxy
        app.kubernetes.io/instance: immich
    spec:

      serviceAccountName: default
      automountServiceAccountToken: true
      dnsPolicy: ClusterFirst
      enableServiceLinks: true
      containers:
        - name: immich-proxy
          image: ghcr.io/immich-app/immich-proxy:v1.79.1
          imagePullPolicy: IfNotPresent
          env:
            - name: DB_DATABASE_NAME
              value: immich
            - name: DB_HOSTNAME
              value: immich-postgresql
            - name: DB_PASSWORD
              value: immich
            - name: DB_USERNAME
              value: immich
            - name: IMMICH_MACHINE_LEARNING_URL
              value: http://immich-machine-learning:3003
            - name: IMMICH_SERVER_URL
              value: http://immich-server:3001
            - name: IMMICH_WEB_URL
              value: http://immich-web:3000
            - name: REDIS_HOSTNAME
              value: immich-redis-master
            - name: TYPESENSE_API_KEY
              value: typesense
            - name: TYPESENSE_ENABLED
              value: "true"
            - name: TYPESENSE_HOST
              value: immich-typesense
          ports:
            - name: http
              containerPort: 8080
              protocol: TCP
          livenessProbe:
            failureThreshold: 3
            initialDelaySeconds: 0
            periodSeconds: 10
            tcpSocket:
              port: 8080
            timeoutSeconds: 1
          readinessProbe:
            failureThreshold: 3
            initialDelaySeconds: 0
            periodSeconds: 10
            tcpSocket:
              port: 8080
            timeoutSeconds: 1
          startupProbe:
            failureThreshold: 30
            initialDelaySeconds: 0
            periodSeconds: 5
            tcpSocket:
              port: 8080
            timeoutSeconds: 1
---
# Source: immich/templates/server.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: immich
  labels:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: immich
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: immich
      app.kubernetes.io/instance: immich
  template:
    metadata:
      labels:
        app.kubernetes.io/name: immich
        app.kubernetes.io/instance: immich
    spec:

      serviceAccountName: default
      automountServiceAccountToken: true
      dnsPolicy: ClusterFirst
      enableServiceLinks: true
      containers:
        - name: immich
          image: ghcr.io/immich-app/immich-server:v1.79.1
          imagePullPolicy: IfNotPresent
          env:
            - name: DB_DATABASE_NAME
              value: immich
            - name: DB_HOSTNAME
              value: immich-postgresql
            - name: DB_PASSWORD
              value: immich
            - name: DB_USERNAME
              value: immich
            - name: IMMICH_MACHINE_LEARNING_URL
              value: http://immich-machine-learning:3003
            - name: IMMICH_SERVER_URL
              value: http://immich-server:3001
            - name: IMMICH_WEB_URL
              value: http://immich-web:3000
            - name: REDIS_HOSTNAME
              value: immich-redis-master
            - name: TYPESENSE_API_KEY
              value: typesense
            - name: TYPESENSE_ENABLED
              value: "true"
            - name: TYPESENSE_HOST
              value: immich-typesense
          ports:
            - name: http
              containerPort:
              protocol: TCP
          livenessProbe:
            failureThreshold: 3
            initialDelaySeconds: 0
            periodSeconds: 10
            tcpSocket:
              port: 0
            timeoutSeconds: 1
          readinessProbe:
            failureThreshold: 3
            initialDelaySeconds: 0
            periodSeconds: 10
            tcpSocket:
              port: 0
            timeoutSeconds: 1
          startupProbe:
            failureThreshold: 30
            initialDelaySeconds: 0
            periodSeconds: 5
            tcpSocket:
              port: 0
            timeoutSeconds: 1
---
# Source: immich/templates/typesense.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: immich-typesense
  labels:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: typesense
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: typesense
      app.kubernetes.io/instance: immich
  template:
    metadata:
      labels:
        app.kubernetes.io/name: typesense
        app.kubernetes.io/instance: immich
    spec:

      serviceAccountName: default
      automountServiceAccountToken: true
      dnsPolicy: ClusterFirst
      enableServiceLinks: true
      containers:
        - name: immich-typesense
          image: docker.io/typesense/typesense:0.24.0
          imagePullPolicy: IfNotPresent
          env:
            - name: DB_DATABASE_NAME
              value: immich
            - name: DB_HOSTNAME
              value: immich-postgresql
            - name: DB_PASSWORD
              value: immich
            - name: DB_USERNAME
              value: immich
            - name: IMMICH_MACHINE_LEARNING_URL
              value: http://immich-machine-learning:3003
            - name: IMMICH_SERVER_URL
              value: http://immich-server:3001
            - name: IMMICH_WEB_URL
              value: http://immich-web:3000
            - name: REDIS_HOSTNAME
              value: immich-redis-master
            - name: TYPESENSE_API_KEY
              value: typesense
            - name: TYPESENSE_DATA_DIR
              value: /tsdata
            - name: TYPESENSE_ENABLED
              value: "true"
            - name: TYPESENSE_HOST
              value: immich-typesense
          ports:
            - name: http
              containerPort: 8108
              protocol: TCP
          volumeMounts:
            - name: tsdata
              mountPath: /tsdata
          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
      volumes:
        - name: tsdata
          persistentVolumeClaim:
            claimName: immich-typesense-tsdata
---
# Source: immich/templates/web.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: immich-web
  labels:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: web
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: web
      app.kubernetes.io/instance: immich
  template:
    metadata:
      labels:
        app.kubernetes.io/name: web
        app.kubernetes.io/instance: immich
    spec:

      serviceAccountName: default
      automountServiceAccountToken: true
      dnsPolicy: ClusterFirst
      enableServiceLinks: true
      containers:
        - name: immich-web
          image: ghcr.io/immich-app/immich-web:v1.79.1
          imagePullPolicy: IfNotPresent
          command:
            - "/bin/sh"
          args:

            - ./entrypoint.sh
          env:
            - name: DB_DATABASE_NAME
              value: immich
            - name: DB_HOSTNAME
              value: immich-postgresql
            - name: DB_PASSWORD
              value: immich
            - name: DB_USERNAME
              value: immich
            - name: IMMICH_MACHINE_LEARNING_URL
              value: http://immich-machine-learning:3003
            - name: IMMICH_SERVER_URL
              value: http://immich-server:3001
            - name: IMMICH_WEB_URL
              value: http://immich-web:3000
            - name: REDIS_HOSTNAME
              value: immich-redis-master
            - name: TYPESENSE_API_KEY
              value: typesense
            - name: TYPESENSE_ENABLED
              value: "true"
            - name: TYPESENSE_HOST
              value: immich-typesense
          ports:
            - name: http
              containerPort: 3000
              protocol: TCP
          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
---
# Source: immich/charts/postgresql/templates/primary/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: immich-postgresql
  namespace: "default"
  labels:
    app.kubernetes.io/name: postgresql
    helm.sh/chart: postgresql-11.8.1
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: primary
  annotations:
spec:
  replicas: 1
  serviceName: immich-postgresql-hl
  updateStrategy:
    rollingUpdate: {}
    type: RollingUpdate
  selector:
    matchLabels:
      app.kubernetes.io/name: postgresql
      app.kubernetes.io/instance: immich
      app.kubernetes.io/component: primary
  template:
    metadata:
      name: immich-postgresql
      labels:
        app.kubernetes.io/name: postgresql
        helm.sh/chart: postgresql-11.8.1
        app.kubernetes.io/instance: immich
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/component: primary
      annotations:
    spec:
      serviceAccountName: default

      affinity:
        podAffinity:

        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app.kubernetes.io/name: postgresql
                    app.kubernetes.io/instance: immich
                    app.kubernetes.io/component: primary
                namespaces:
                  - "default"
                topologyKey: kubernetes.io/hostname
              weight: 1
        nodeAffinity:

      securityContext:
        fsGroup: 1001
      hostNetwork: false
      hostIPC: false
      initContainers:
      containers:
        - name: postgresql
          image: docker.io/bitnami/postgresql:14.5.0-debian-11-r6
          imagePullPolicy: "IfNotPresent"
          securityContext:
            runAsUser: 1001
          env:
            - name: BITNAMI_DEBUG
              value: "false"
            - name: POSTGRESQL_PORT_NUMBER
              value: "5432"
            - name: POSTGRESQL_VOLUME_DIR
              value: "/bitnami/postgresql"
            - name: PGDATA
              value: "/bitnami/postgresql/data"
            # Authentication
            - name: POSTGRES_USER
              value: "immich"
            - name: POSTGRES_POSTGRES_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: immich-postgresql
                  key: postgres-password
            - name: POSTGRES_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: immich-postgresql
                  key: password
            - name: POSTGRES_DB
              value: "immich"
            # Replication
            # Initdb
            # Standby
            # LDAP
            - name: POSTGRESQL_ENABLE_LDAP
              value: "no"
            # TLS
            - name: POSTGRESQL_ENABLE_TLS
              value: "no"
            # Audit
            - name: POSTGRESQL_LOG_HOSTNAME
              value: "false"
            - name: POSTGRESQL_LOG_CONNECTIONS
              value: "false"
            - name: POSTGRESQL_LOG_DISCONNECTIONS
              value: "false"
            - name: POSTGRESQL_PGAUDIT_LOG_CATALOG
              value: "off"
            # Others
            - name: POSTGRESQL_CLIENT_MIN_MESSAGES
              value: "error"
            - name: POSTGRESQL_SHARED_PRELOAD_LIBRARIES
              value: "pgaudit"
          ports:
            - name: tcp-postgresql
              containerPort: 5432
          livenessProbe:
            failureThreshold: 6
            initialDelaySeconds: 30
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
            exec:
              command:
                - /bin/sh
                - -c
                - exec pg_isready -U "immich" -d "dbname=immich" -h 127.0.0.1 -p 5432
          readinessProbe:
            failureThreshold: 6
            initialDelaySeconds: 5
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
            exec:
              command:
                - /bin/sh
                - -c
                - -e

                - |
                  exec pg_isready -U "immich" -d "dbname=immich" -h 127.0.0.1 -p 5432
                  [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
          resources:
            limits: {}
            requests:
              cpu: 250m
              memory: 256Mi
          volumeMounts:
            - name: dshm
              mountPath: /dev/shm
            - name: data
              mountPath: /bitnami/postgresql
      volumes:
        - name: dshm
          emptyDir:
            medium: Memory
  volumelaimTemplates:
    - metadata:
        name: data
      spec:
        accessModes:
          - "ReadWriteOnce"
        resources:
          requests:
            storage: "8Gi"
---
# Source: immich/charts/redis/templates/master/application.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: immich-redis-master
  namespace: "default"
  labels:
    app.kubernetes.io/name: redis
    helm.sh/chart: redis-17.11.6
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: master
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: redis
      app.kubernetes.io/instance: immich
      app.kubernetes.io/component: master
  serviceName: immich-redis-headless
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: redis
        helm.sh/chart: redis-17.11.6
        app.kubernetes.io/instance: immich
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/component: master
      annotations:
        checksum/configmap: 3c1b62502e8df15ab9fef1dbb8fb30f384b76fe036132cc1caa539affb885ca6
        checksum/health: ca8bf86011d75173b546cd596b00b2ad7aa416249246c238cfca1312f4da59e3
        checksum/scripts: 48838be19cceb524ed93e180ddc2ce0ff22baf1e63e04cffd8259059155b4ed8
        checksum/secret: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
    spec:

      securityContext:
        fsGroup: 1001
      serviceAccountName: immich-redis
      automountServiceAccountToken: true
      affinity:
        podAffinity:

        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app.kubernetes.io/name: redis
                    app.kubernetes.io/instance: immich
                    app.kubernetes.io/component: master
                namespaces:
                  - "default"
                topologyKey: kubernetes.io/hostname
              weight: 1
        nodeAffinity:

      terminationGracePeriodSeconds: 30
      containers:
        - name: redis
          image: docker.io/bitnami/redis:7.0.11-debian-11-r20
          imagePullPolicy: "IfNotPresent"
          securityContext:
            runAsUser: 1001
          command:
            - /bin/bash
          args:
            - -c
            - /opt/bitnami/scripts/start-scripts/start-master.sh
          env:
            - name: BITNAMI_DEBUG
              value: "false"
            - name: REDIS_REPLICATION_MODE
              value: master
            - name: ALLOW_EMPTY_PASSWORD
              value: "yes"
            - name: REDIS_TLS_ENABLED
              value: "no"
            - name: REDIS_PORT
              value: "6379"
          ports:
            - name: redis
              containerPort: 6379
          livenessProbe:
            initialDelaySeconds: 20
            periodSeconds: 5
            # One second longer than command timeout should prevent generation of zombie processes.
            timeoutSeconds: 6
            successThreshold: 1
            failureThreshold: 5
            exec:
              command:
                - sh
                - -c
                - /health/ping_liveness_local.sh 5
          readinessProbe:
            initialDelaySeconds: 20
            periodSeconds: 5
            timeoutSeconds: 2
            successThreshold: 1
            failureThreshold: 5
            exec:
              command:
                - sh
                - -c
                - /health/ping_readiness_local.sh 1
          resources:
            limits: {}
            requests: {}
          volumeMounts:
            - name: start-scripts
              mountPath: /opt/bitnami/scripts/start-scripts
            - name: health
              mountPath: /health
            - name: redis-data
              mountPath: /data
            - name: config
              mountPath: /opt/bitnami/redis/mounted-etc
            - name: redis-tmp-conf
              mountPath: /opt/bitnami/redis/etc/
            - name: tmp
              mountPath: /tmp
      volumes:
        - name: start-scripts
          configMap:
            name: immich-redis-scripts
            defaultMode: 0755
        - name: health
          configMap:
            name: immich-redis-health
            defaultMode: 0755
        - name: config
          configMap:
            name: immich-redis-configuration
        - name: redis-tmp-conf
          emptyDir: {}
        - name: tmp
          emptyDir: {}
  volumeClaimTemplates:
    - metadata:
        name: redis-data
        labels:
          app.kubernetes.io/name: redis
          app.kubernetes.io/instance: immich
          app.kubernetes.io/component: master
      spec:
        accessModes:
          - "ReadWriteOnce"
        resources:
          requests:
            storage: "8Gi"
---
# Source: immich/templates/proxy.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: immich-proxy
  labels:
    app.kubernetes.io/instance: immich
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: proxy
    app.kubernetes.io/version: v1.79.1
    helm.sh/chart: immich-0.1.3
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
spec:
  rules:
    - host: "immich.local"
      http:
        paths:
          - path: "/"
            pathType: Prefix
            backend:
              service:
                name: immich-proxy
                port:
                  number: 8080
csm10495@csm10495-desk:~/Desktop/tmp $ kubectl apply -f output.yaml
error: error validating "output.yaml": error validating data: ValidationError(Service.spec.ports[0]): missing required field "port" in io.k8s.api.core.v1.ServicePort; if you choose to ignore these errors, turn validation off with --validate=false