apiVersion: v1
kind: ConfigMap
metadata:
  name: easyai-ai-gateway-config
  namespace: easyai
  labels:
    app.kubernetes.io/part-of: easyai-ai-gateway
    easyai.io/environment: local-acceptance
data:
  APP_ENV: production
  HTTP_ADDR: ":8088"
  IDENTITY_MODE: standalone
  IDENTITY_SECRET_STORE: file
  IDENTITY_SECRET_DIR: /app/data/identity
  IDENTITY_SECURITY_EVENTS_HEARTBEAT_INTERVAL_SECONDS: "0"
  IDENTITY_SECURITY_EVENTS_STALE_AFTER_SECONDS: "0"
  IDENTITY_SECURITY_EVENTS_CLOCK_SKEW_SECONDS: "0"
  SERVER_MAIN_BASE_URL: http://easyai-acceptance-emulator.easyai.svc.cluster.local:8090
  TASK_PROGRESS_CALLBACK_ENABLED: "true"
  TASK_PROGRESS_CALLBACK_URL: http://easyai-acceptance-callback-collector.easyai.svc.cluster.local:8091/callbacks
  AI_GATEWAY_PUBLIC_BASE_URL: https://gateway.easyai.local
  AI_GATEWAY_WEB_BASE_URL: https://gateway.easyai.local
  CORS_ALLOWED_ORIGIN: https://gateway.easyai.local
  AI_GATEWAY_GENERATED_STORAGE_DIR: /app/data/static/generated
  AI_GATEWAY_UPLOADED_STORAGE_DIR: /app/data/static/uploaded
  AI_GATEWAY_LOCAL_TEMP_ASSET_TTL_HOURS: "24"
  AI_GATEWAY_LOCAL_RESULT_TTL_HOURS: "24"
  AI_GATEWAY_LOCAL_RESULT_MIN_FREE_BYTES: "0"
  AI_GATEWAY_LOCAL_RESULT_MAX_BYTES: "268435456"
  AI_GATEWAY_LOCAL_RESULT_MAX_TASK_BYTES: "536870912"
  AI_GATEWAY_MEDIA_OSS_DIRECT_ENABLED: "false"
  AI_GATEWAY_ASYNC_QUEUE_WORKER_ENABLED: "true"
  AI_GATEWAY_ASYNC_WORKER_INSTANCE_HARD_LIMIT: "24"
  AI_GATEWAY_ASYNC_ADMISSION_MICROBATCH_SIZE: "8"
  AI_GATEWAY_ASYNC_WORKER_HARD_LIMIT: "24"
  AI_GATEWAY_ASYNC_WORKER_GLOBAL_HARD_LIMIT: "48"
  AI_GATEWAY_ASYNC_WORKER_REFRESH_INTERVAL_SECONDS: "5"
  AI_GATEWAY_DATABASE_IDLE_IN_TRANSACTION_TIMEOUT_SECONDS: "60"
  AI_GATEWAY_DATABASE_LOCK_TIMEOUT_SECONDS: "30"
  AI_GATEWAY_WORKER_AUTOSCALING_ENABLED: "true"
  AI_GATEWAY_WORKER_REPLICAS_NINGBO: "1"
  AI_GATEWAY_WORKER_REPLICAS_HONGKONG: "1"
  AI_GATEWAY_WORKER_MIN_REPLICAS_NINGBO: "1"
  AI_GATEWAY_WORKER_MIN_REPLICAS_HONGKONG: "1"
  AI_GATEWAY_WORKER_MAX_REPLICAS_NINGBO: "2"
  AI_GATEWAY_WORKER_MAX_REPLICAS_HONGKONG: "2"
  AI_GATEWAY_WORKER_TARGET_OUTSTANDING_PER_REPLICA: "48"
  AI_GATEWAY_WORKER_SCALE_UP_WINDOW_SECONDS: "20"
  AI_GATEWAY_WORKER_SCALE_DOWN_STABILIZATION_SECONDS: "600"
  AI_GATEWAY_WORKER_DRAIN_TIMEOUT_SECONDS: "600"
  AI_GATEWAY_NODE_MEMORY_TARGET_PERCENT: "75"
  AI_GATEWAY_NODE_MEMORY_HARD_PERCENT: "85"
  AI_GATEWAY_NODE_CPU_TARGET_PERCENT: "70"
  AI_GATEWAY_POSTGRES_CONNECTION_BUDGET: "150"
  AI_GATEWAY_WORKER_DATABASE_MAX_CONNS: "32"
