apiVersion: v1
kind: ConfigMap
metadata:
  name: easyai-ai-gateway-config
  labels:
    app.kubernetes.io/part-of: easyai-ai-gateway
data:
  APP_ENV: production
  HTTP_ADDR: ":8088"
  IDENTITY_MODE: hybrid
  IDENTITY_SECRET_STORE: kubernetes
  IDENTITY_KUBERNETES_NAMESPACE: easyai
  IDENTITY_KUBERNETES_SECRET_NAME: easyai-gateway-security-events
  IDENTITY_SECURITY_EVENTS_HEARTBEAT_INTERVAL_SECONDS: "60"
  IDENTITY_SECURITY_EVENTS_STALE_AFTER_SECONDS: "180"
  IDENTITY_SECURITY_EVENTS_CLOCK_SKEW_SECONDS: "60"
  SERVER_MAIN_BASE_URL: http://10.77.0.1:3001
  TASK_PROGRESS_CALLBACK_ENABLED: "true"
  TASK_PROGRESS_CALLBACK_URL: http://10.77.0.1:3001/internal/platform/task-progress-callbacks
  TASK_PROGRESS_CALLBACK_TIMEOUT_MS: "5000"
  TASK_PROGRESS_CALLBACK_MAX_ATTEMPTS: "10"
  AI_GATEWAY_TASK_CLEANUP_ENABLED: "false"
  AI_GATEWAY_TASK_RETENTION_DAYS: "30"
  AI_GATEWAY_TASK_ANALYSIS_RETENTION_DAYS: "7"
  AI_GATEWAY_TASK_CLEANUP_INTERVAL_SECONDS: "300"
  AI_GATEWAY_TASK_CLEANUP_BATCH_SIZE: "1000"
  AI_GATEWAY_DATABASE_IDLE_IN_TRANSACTION_TIMEOUT_SECONDS: "60"
  AI_GATEWAY_DATABASE_LOCK_TIMEOUT_SECONDS: "30"
  CORS_ALLOWED_ORIGIN: https://ai.51easyai.com
  AI_GATEWAY_PUBLIC_BASE_URL: https://ai.51easyai.com
  AI_GATEWAY_WEB_BASE_URL: https://ai.51easyai.com
  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: "10737418240"
  AI_GATEWAY_LOCAL_RESULT_MAX_BYTES: "268435456"
  AI_GATEWAY_LOCAL_RESULT_MAX_TASK_BYTES: "536870912"
  AI_GATEWAY_MEDIA_OSS_DIRECT_ENABLED: "true"
  AI_GATEWAY_MEDIA_OSS_ENDPOINT: https://wangbo0808.oss-cn-shanghai.aliyuncs.com
  AI_GATEWAY_MEDIA_OSS_BUCKET: wangbo0808
  AI_GATEWAY_MEDIA_OSS_PUBLIC_BASE_URL: https://aliyuncdn.51easyai.com
  AI_GATEWAY_MEDIA_OSS_OBJECT_PREFIX: easyai-ai-gateway/production/media
  AI_GATEWAY_ASYNC_QUEUE_WORKER_ENABLED: "true"
  AI_GATEWAY_ASYNC_WORKER_HARD_LIMIT: "48"
  AI_GATEWAY_ASYNC_WORKER_GLOBAL_HARD_LIMIT: "48"
  AI_GATEWAY_ASYNC_WORKER_REFRESH_INTERVAL_SECONDS: "5"
  AI_GATEWAY_WORKER_AUTOSCALING_ENABLED: "false"
  AI_GATEWAY_WORKER_REPLICAS_NINGBO: "1"
  AI_GATEWAY_WORKER_MIN_REPLICAS_NINGBO: "1"
  AI_GATEWAY_WORKER_MAX_REPLICAS_NINGBO: "1"
  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"
