---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: iam-backend
  namespace: iam
spec:
  values:
    services:
      backend:
        envs:
          - name: ENVIRONMENT
            value:
              _default: "prod"

          - name: LOG_LEVEL
            value:
              _default: "debug"

          - name: AUTH_ENABLED
            value:
              _default: "true"

          - name: HTTP_PORT
            value:
              _default: "8080"

          - name: HTTP_READ_BUFFER_SIZE
            value:
              _default: "131072"

          - name: DB_MIGRATIONS_PATH
            value:
              _default: "migrations"

          - name: ZITADEL_ENABLED
            value:
              _default: "true"

          - name: ZITADEL_HOST
            value:
              _default: "https://sarex-login.uralmine.com"

          - name: ZITADEL_ORG_RULES_FILE
            value:
              _default: "config/zitadel/org-rules-prod.json"

          - name: S3_ENABLED
            value:
              _default: "true"

          - name: S3_ENDPOINT_URL
            value:
              _default: "https://s3.uralmine.com"

          - name: S3_BUCKET_NAME
            value:
              _default: "sarex-media-storage"

          - name: S3_REGION
            value:
              _default: "ru-central1"

          - name: S3_PRESIGN_EXPIRES
            value:
              _default: "1h"

          - name: KAFKA_ENABLED
            value:
              _default: "false"

          - name: KAFKA_SSL_CAFILE
            value:
              _default: "/etc/ca-certificates/Yandex/ca-cert"

          - name: KAFKA_TOPIC_LEGACY_AMS_SYNC
            value:
              _default: "ams-sync"
