---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: worker
  namespace: transmittal
spec:
  values:
    services:
      worker:
        image:
          name:
            _default: cr.yandex/crp3ccidau046kdj8g9q/transmittal-api:prod_4de0b503

        envs:
          - name: TRANSMITTAL_SERVICE_APP__NAME
            value:
              _default: "Transmittal Service"

          - name: TRANSMITTAL_SERVICE_APP__LOG_LEVEL
            value:
              _default: "ERROR"

          - name: TRANSMITTAL_SERVICE_FLOWS_REPOSITORY__BASE_URL
            value:
              _default: "http://backend-svc.flows.svc.cluster.local:80"

          - name: TRANSMITTAL_SERVICE_FLOWS_REPOSITORY__MAX_CONNECTIONS
            value:
              _default: "10"

          - name: TRANSMITTAL_SERVICE_FLOWS_REPOSITORY__MAX_KEEPALIVE_CONNECTIONS
            value:
              _default: "5"

          - name: TRANSMITTAL_SERVICE_FLOWS_REPOSITORY__TIMEOUT
            value:
              _default: "30"

          - name: TRANSMITTAL_SERVICE_APP__HOST
            value:
              _default: "https://sarex.dsinv.ru/transmittal"

          - name: TRANSMITTAL_SERVICE_APP__ENVIRONMENT
            value:
              _default: "prod"

          - name: TRANSMITTAL_SERVICE_CORS__ALLOW_ORIGINS
            value:
              _default: '["https://lk.sarex.io", "lk.sarex.io"]'

          - name: TRANSMITTAL_SERVICE_CORS__ALLOW_METHODS
            value:
              _default: '["*"]'

          - name: TRANSMITTAL_SERVICE_CORS__ALLOW_HEADERS
            value:
              _default: '["*"]'

          - name: TRANSMITTAL_SERVICE_CORS__ALLOW_CREDENTIALS
            value:
              _default: "true"

          - name: TRANSMITTAL_SERVICE_UVICORN__HOST
            value:
              _default: "0.0.0.0"

          - name: TRANSMITTAL_SERVICE_UVICORN__PORT
            value:
              _default: "8000"

          - name: TRANSMITTAL_SERVICE_UVICORN__ENABLE_AUTO_RELOAD
            value:
              _default: "false"

          - name: TRANSMITTAL_SERVICE_OTEL__ENABLE
            value:
              _default: "false"

          - name: TRANSMITTAL_SERVICE_OTEL__HOST
            value:
              _default: "http://signoz-otel-collector-external.signoz.svc.cluster.local:4317"

          - name: TRANSMITTAL_SERVICE_OTEL__SERVICE_NAME
            value:
              _default: "backend.transmittals-prod"

          - name: TRANSMITTAL_SERVICE_OTEL__INSECURE
            value:
              _default: "false"

          - name: TRANSMITTAL_SERVICE_DATABASE__SSL_MODE
            value:
              _default: "verify-full"

          - name: TRANSMITTAL_SERVICE_DATABASE__SSL_ROOT_CERT_PATH
            value:
              _default: "/opt/.postgresql/root.crt"

          - name: TRANSMITTAL_SERVICE_UVICORN__LOG_LEVEL
            value:
              _default: "info"

          - name: TRANSMITTAL_SERVICE_UVICORN__NUM_WORKERS
            value:
              _default: "2"

          - name: TRANSMITTAL_SERVICE_UVICORN__ROOT_PATH
            value:
              _default: ""

          - name: TRANSMITTAL_SERVICE_DATABASE__ENABLE_SSL
            value:
              _default: "false"

          - name: TRANSMITTAL_SERVICE_RABBITMQ__HOST
            value:
              _default: "rabbitmq-service"

          - name: TRANSMITTAL_SERVICE_RABBITMQ__PORT
            value:
              _default: "5672"

          - name: TRANSMITTAL_SERVICE_SAREX_BACKEND_REPOSITORY__BASE_URL
            value:
              _default: "https://sarex.dsinv.ru"

          - name: TRANSMITTAL_SERVICE_SAREX_BACKEND_REPOSITORY__MAX_CONNECTIONS
            value:
              _default: "10"

          - name: TRANSMITTAL_SERVICE_SAREX_BACKEND_REPOSITORY__MAX_KEEPALIVE_CONNECTIONS
            value:
              _default: "5"

          - name: TRANSMITTAL_SERVICE_SAREX_BACKEND_REPOSITORY__TIMEOUT
            value:
              _default: "30"

          - name: TRANSMITTAL_SERVICE_RESOURCE_REPOSITORY__BASE_URL
            value:
              _default: "http://sarex-resources-service.resources-prod"

          - name: TRANSMITTAL_SERVICE_RESOURCE_REPOSITORY__MAX_CONNECTIONS
            value:
              _default: "10"

          - name: TRANSMITTAL_SERVICE_RESOURCE_REPOSITORY__MAX_KEEPALIVE_CONNECTIONS
            value:
              _default: "5"

          - name: TRANSMITTAL_SERVICE_RESOURCE_REPOSITORY__TIMEOUT
            value:
              _default: "30"

          - name: TRANSMITTAL_SERVICE_DOCUMENTATIONS_REPOSITORY__BASE_URL
            value:
              _default: "http://documentations-service.documentations-prod"

          - name: TRANSMITTAL_SERVICE_DOCUMENTATIONS_REPOSITORY__MAX_CONNECTIONS
            value:
              _default: "10"

          - name: TRANSMITTAL_SERVICE_DOCUMENTATIONS_REPOSITORY__MAX_KEEPALIVE_CONNECTIONS
            value:
              _default: "5"

          - name: TRANSMITTAL_SERVICE_DOCUMENTATIONS_REPOSITORY__TIMEOUT
            value:
              _default: "30"

          - name: TRANSMITTAL_SERVICE_S3_CLIENT__MAX_POOL_CONNECTIONS
            value:
              _default: "10"

          - name: TRANSMITTAL_SERVICE_S3_CLIENT__CONNECT_TIMEOUT
            value:
              _default: "10"

          - name: TRANSMITTAL_SERVICE_S3_CLIENT__READ_TIMEOUT
            value:
              _default: "30"

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

          - name: TRANSMITTAL_SERVICE_S3_CLIENT__VERIFY
            value:
              _default: "false"

          - name: TRANSMITTAL_SERVICE_S3_CLIENT__ENDPOINT
            value:
              _default: "minio-service.minio.svc.cluster.local:9000"

          - name: TRANSMITTAL_SERVICE_S3_CLIENT__USE_SSL
            value:
              _default: "false"

          - name: TRANSMITTAL_SERVICE_HTML_TO_PDF_CONVERTER__BASE_URL
            value:
              _default: "http://export-project-service.django.svc.cluster.local:8000"

          - name: TRANSMITTAL_SERVICE_HTML_TO_PDF_CONVERTER__MAX_CONNECTIONS
            value:
              _default: "10"

          - name: TRANSMITTAL_SERVICE_HTML_TO_PDF_CONVERTER__MAX_KEEPALIVE_CONNECTIONS
            value:
              _default: "5"

          - name: TRANSMITTAL_SERVICE_HTML_TO_PDF_CONVERTER__TIMEOUT
            value:
              _default: "30"

          - name: TRANSMITTAL_SERVICE_MARKINGS__BASE_URL
            value:
              _default: "http://marks-service.workflow.svc.cluster.local:8000"

          - name: TRANSMITTAL_SERVICE_MARKINGS__MAX_CONNECTIONS
            value:
              _default: "10"

          - name: TRANSMITTAL_SERVICE_MARKINGS__MAX_KEEPALIVE_CONNECTIONS
            value:
              _default: "5"

          - name: TRANSMITTAL_SERVICE_MARKINGS__TIMEOUT
            value:
              _default: "30"

          - name: TRANSMITTAL_SERVICE_MAILGUN__BASE_URL
            value:
              _default: "https://api.mailgun.net/v3/mg.sarex.io"

          - name: TRANSMITTAL_SERVICE_MAILGUN__MAX_CONNECTIONS
            value:
              _default: "10"

          - name: TRANSMITTAL_SERVICE_MAILGUN__MAX_KEEPALIVE_CONNECTIONS
            value:
              _default: "5"

          - name: TRANSMITTAL_SERVICE_MAILGUN__TIMEOUT
            value:
              _default: "15"

          - name: TRANSMITTAL_SERVICE_MAILGUN__EMAIL
            value:
              _default: "hello@wb.io"

          - name: TRANSMITTAL_SERVICE_SMTP__ENABLE_TLS
            value:
              _default: "false"

          - name: TRANSMITTAL_SERVICE_SMTP__HOST
            value:
              _default: "relay.dsinv.ru"

          - name: TRANSMITTAL_SERVICE_SMTP__PORT
            value:
              _default: "25"

          - name: TRANSMITTAL_SERVICE_SMTP__EMAIL
            value:
              _default: "sarex@dsinv.ru"

          - name: TRANSMITTAL_SERVICE_DATABASE__HOST
            value:
              _default: "postgres-service"

          - name: TRANSMITTAL_SERVICE_DATABASE__PORT
            value:
              _default: "5432"

          - name: TRANSMITTAL_SERVICE_DATABASE__NAME
            value:
              _default: "transmittals"

          - name: TRANSMITTAL_SERVICE_RABBITMQ__VHOST
            value:
              _default: "api"

          - name: TRANSMITTAL_SERVICE_S3_CLIENT__DEFAULT_BUCKET
            value:
              _default: "transmittal-storage"
