## 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: "immich-postgres-rw"
  DB_USERNAME: 
    valueFrom:
      secretKeyRef:
        name: postgres-password
        key: username
  DB_DATABASE_NAME:
    valueFrom:
      secretKeyRef:
        name: postgres-password
        key: database
  DB_PASSWORD:
    valueFrom:
      secretKeyRef:
        name: postgres-password
        key: password
  IMMICH_MACHINE_LEARNING_URL: '{{ printf "http://%s-machine-learning:3003" .Release.Name }}'
  IMMICH_METRICS: true

immich:
  metrics:
    # Enabling this will create the service monitors needed to monitor immich with the prometheus operator
    enabled: true
  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: data

# Dependencies

postgresql:
  enabled: false

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

# Immich components

server:
  enabled: true
  ingress:
    main:
      enabled: false

machine-learning:
  enabled: true
  persistence:
    cache:
      enabled: true
      size: 10Gi
      # Optional: Set this to pvc to avoid downloading the ML models every start.
      type: emptyDir
      accessMode: ReadWriteMany