# Shared configuration for all ByteLyst services.
# Generated by setup-k8s.sh phase 4 — this is the TEMPLATE.
# The setup script replaces JWT_SECRET with a random value at deploy time.
apiVersion: v1
kind: ConfigMap
metadata:
  name: bytelyst-config
  namespace: bytelyst-platform
  labels:
    app.kubernetes.io/part-of: bytelyst
data:
  # Cosmos DB Emulator
  COSMOS_ENDPOINT: "http://cosmos-emulator.bytelyst-infra.svc:8081"
  COSMOS_KEY: "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=="
  COSMOS_DATABASE: "bytelyst"
  DB_PROVIDER: "cosmos"

  # Azure Blob Storage (Azurite) — keys in bytelyst-secrets
  STORAGE_PROVIDER: "azure"
  AZURE_BLOB_ACCOUNT_NAME: "devstoreaccount1"
  AZURE_BLOB_PUBLIC_ENDPOINT: "http://localhost:10000/devstoreaccount1"

  # Email (Mailpit)
  EMAIL_PROVIDER: "smtp"
  EMAIL_FROM_ADDRESS: "noreply@bytelyst.local"
  EMAIL_FROM_NAME: "ByteLyst"
  SMTP_HOST: "mailpit.bytelyst-infra.svc"
  SMTP_PORT: "1025"
  SMTP_SECURE: "false"
  SMTP_USER: ""
  SMTP_PASSWORD: ""

  # Stripe (test placeholders)
  STRIPE_SECRET_KEY: "sk_test_placeholder"
  STRIPE_WEBHOOK_SECRET: "whsec_placeholder"
  STRIPE_PRICE_PRO: "price_placeholder"
  STRIPE_PRICE_ENTERPRISE: "price_placeholder"

  # Extraction Service
  PYTHON_SIDECAR_URL: "http://localhost:4006"
  DEFAULT_MODEL_ID: "gemini-2.5-flash"
  GEMINI_API_KEY: "placeholder"
  EXTRACTION_QUEUE_BACKEND: "file"
  EXTRACTION_QUEUE_FILE: ".data/extraction-jobs.json"

  # Cross-service URLs (K8s DNS: <service>.<namespace>.svc)
  PLATFORM_SERVICE_URL: "http://platform-service.bytelyst-platform.svc:4003"
  EXTRACTION_SERVICE_URL: "http://extraction-service.bytelyst-platform.svc:4005"
  MCP_SERVER_URL: "http://mcp-server.bytelyst-platform.svc:4007"

  # Telemetry
  TELEMETRY_ENABLED: "true"
  RATE_LIMIT_STORE_MODE: "datastore"

  # Event Bus
  EVENT_BUS_BACKEND: "file"
  EVENT_BUS_FILE: ".data/platform-events.json"

  # Field Encryption
  FIELD_ENCRYPT_KEY_PROVIDER: "memory"

  # Product Identity
  DEFAULT_PRODUCT_ID: "lysnrai"

  # Webhooks (disabled)
  WEBHOOK_INVITATION_REDEEMED_URL: ""
  WEBHOOK_REFERRAL_STATUS_URL: ""
  WEBHOOK_WAITLIST_JOINED_URL: ""

  # Notifications (disabled)
  TELEGRAM_BOT_TOKEN: ""
  TELEGRAM_DEFAULT_CHAT_ID: ""
  SLACK_WEBHOOK_URL: ""
  SLACK_DEFAULT_CHANNEL: ""

  # Ollama (host service via ExternalName)
  OLLAMA_URL: "http://ollama.bytelyst-infra.svc:11434"
