# Immich Helm Values
# Chart: https://github.com/immich-app/immich-charts (v0.10.x)
# Self-hosted photo and video management solution

# Shared configuration for all components
controllers:
  main:
    containers:
      main:
        env:
          # External PostgreSQL connection
          DB_HOSTNAME: postgresql-rw.postgresql.svc.cluster.local
          DB_PORT: "5432"
          DB_DATABASE_NAME: immich
          DB_USERNAME: bluemayne
          DB_PASSWORD:
            valueFrom:
              secretKeyRef:
                name: immich-postgres-password
                key: password
          # OAuth/OIDC configuration
          OAUTH_ENABLED: "true"
          OAUTH_ISSUER_URL: https://auth0213.kro.kr
          OAUTH_CLIENT_ID: immich
          OAUTH_CLIENT_SECRET:
            valueFrom:
              secretKeyRef:
                name: immich-oidc
                key: OAUTH_CLIENT_SECRET
          OAUTH_SCOPE: "openid profile email"
          OAUTH_AUTO_REGISTER: "true"
          OAUTH_BUTTON_TEXT: "Login with Authelia"
          OAUTH_AUTO_LAUNCH: "true"

# Immich configuration
immich:
  persistence:
    library:
      existingClaim: immich-library

# Valkey for job queue
valkey:
  enabled: true
  controllers:
    main:
      containers:
        main:
          image:
            repository: docker.io/valkey/valkey
            tag: 9.0-alpine

# Server component
server:
  enabled: true
  controllers:
    main:
      containers:
        main:
          resources:
            requests:
              cpu: 10m
              memory: 256Mi
            limits:
              memory: 1Gi
  ingress:
    main:
      enabled: true
      className: traefik
      annotations:
        cert-manager.io/cluster-issuer: letsencrypt-prod
      hosts:
        - host: immich0213.kro.kr
          paths:
            - path: /
              service:
                identifier: main
      tls:
        - secretName: immich-tls
          hosts:
            - immich0213.kro.kr

# Machine Learning component
machine-learning:
  enabled: true
  controllers:
    main:
      containers:
        main:
          resources:
            requests:
              cpu: 10m
              memory: 512Mi
            limits:
              memory: 4Gi
  persistence:
    cache:
      enabled: false
