namespace: mvp-cc

image:
  repository: mvp-cc-platform
  tag: latest

global:
  databaseUrl: postgresql://mvp:mvp@postgresql.mvp-cc.svc.cluster.local:5432/mvpcc
  schemaManagementMode: migrations
  runtimeClass: ""
  imagePullPolicy: IfNotPresent

migrations:
  enabled: true
  backoffLimit: 1
  activeDeadlineSeconds: 300
  ttlSecondsAfterFinished: 600
  hookDeletePolicy: before-hook-creation,hook-succeeded
  resources:
    requests:
      cpu: 100m
      memory: 128Mi
    limits:
      cpu: 500m
      memory: 256Mi

profiles:
  scale500:
    enabled: false

db:
  poolSize: "15"
  maxOverflow: "30"
  poolTimeoutSeconds: "30"
  poolRecycleSeconds: "1800"

voiceAdapter:
  trustedServiceSubjects: svc:asterisk-bridge,svc:ivr-service

ivrRuntime:
  trustedServiceSubjects: svc:asterisk-bridge

recording:
  importTrustedServiceSubjects: svc:asterisk-bridge
  importAllowAdmin: "1"

voiceAI:
  enabled: "0"
  queueConfigJson: "{}"
  asrProvider: yandex
  ttsProvider: yandex
  audioSocketEnabled: "1"
  audioSocketHost: 0.0.0.0
  audioSocketPort: "9019"
  asrModel: gpt-4o-mini-transcribe
  ttsModel: gpt-4o-mini-tts
  ttsVoice: alloy
  ttsCacheEnabled: "1"
  ttsCacheDir: /var/lib/mvp-cc/data/ai_voice_tts_cache
  vadMinSpeechMs: "300"
  vadTrailingSilenceMs: "700"
  turnMaxMs: "10000"
  mediaIdleTimeoutSeconds: "15"
  maxContextSegments: "8"
  handoffTimeoutSeconds: "8"
  runtimeTrustedServiceSubjects: svc:ai-voice-runtime

eventBus:
  enabled: "0"
  url: amqp://guest:guest@rabbitmq:5672/
  exchange: mvpcc.domain.events
  dispatchBatchSize: "50"
  maxAttempts: "5"
  pollIntervalSeconds: "2"
  consumerEnabled: "1"
  auditQueue: mvpcc.audit.events
  reportingQueue: mvpcc.reporting.events

asteriskBridge:
  enabled: "0"
  amiHost: ""
  amiPort: "5038"
  amiUsername: ""
  amiSecret: ""
  amiEventPrefix: MVPCC
  queueMapJson: "{}"
  authMode: legacy_headers
  authFallbackLegacy: "1"
  authSubject: svc:asterisk-bridge
  authUser: asterisk-bridge
  authRole: admin
  authTokenTtlSeconds: "300"
  ivrFastagiEnabled: "0"
  ivrFastagiHost: 0.0.0.0
  ivrFastagiPort: "4573"
  ivrDtmfTimeoutSeconds: "5"
  ivrMaxNoInputRetries: "2"
  ivrMaxInvalidRetries: "2"
  ivrCallLinkWaitSeconds: "5"
  callcontrolEnabled: "0"
  callcontrolActionTimeoutSeconds: "10"
  operatorExtensionMapJson: "{}"
  transferTargetMapJson: "{}"
  claimContext: mvpcc-claim
  transferContext: mvpcc-transfer
  sftpHost: ""
  sftpPort: "22"
  sftpUsername: ""
  sftpPassword: ""
  sftpBasePath: /var/spool/asterisk/monitor
  pollIntervalSeconds: "1"

rabbitmq:
  enabled: false
  image: rabbitmq:3-management
  replicas: 1
  user: guest
  password: guest
  servicePort: 5672
  managementPort: 15672

auth:
  appTokenSecret: change-me-app-token-secret
  appTokenTtlSeconds: "3600"
  allowLegacyHeaderAuth: "1"
  oidc:
    enabled: "0"
    provider: keycloak
    issuerUrl: https://keycloak.example.local/realms/mvp-cc
    clientId: mvp-cc
    clientSecret: change-me-keycloak-client-secret
    redirectUri: https://cc.example.local/proxy/auth/auth/oidc/callback
    scopes: openid profile email
    roleClaim: groups
    roleMapJson: '{"kc_admin":"admin","kc_supervisor":"supervisor","kc_operator":"operator","kc_analyst":"analyst"}'

services:
  auth-service:
    module: services.auth_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 200m
        memory: 256Mi
      limits:
        cpu: 750m
        memory: 512Mi
    autoscaling:
      enabled: false
      minReplicas: 2
      maxReplicas: 2
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  audit-service:
    module: services.audit_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 200m
        memory: 256Mi
      limits:
        cpu: 750m
        memory: 512Mi
    autoscaling:
      enabled: false
      minReplicas: 2
      maxReplicas: 2
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  customer-service:
    module: services.customer_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 200m
        memory: 256Mi
      limits:
        cpu: 750m
        memory: 512Mi
    autoscaling:
      enabled: false
      minReplicas: 2
      maxReplicas: 2
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  interaction-service:
    module: services.interaction_service.app:app
    replicas: 4
    resources:
      requests:
        cpu: 500m
        memory: 512Mi
      limits:
        cpu: 1500m
        memory: 1Gi
    autoscaling:
      enabled: true
      minReplicas: 4
      maxReplicas: 8
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  routing-service:
    module: services.routing_service.app:app
    replicas: 3
    resources:
      requests:
        cpu: 500m
        memory: 512Mi
      limits:
        cpu: 1500m
        memory: 1Gi
    autoscaling:
      enabled: true
      minReplicas: 3
      maxReplicas: 6
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  voice-adapter-service:
    module: services.voice_adapter_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 250m
        memory: 256Mi
      limits:
        cpu: 1000m
        memory: 512Mi
    autoscaling:
      enabled: true
      minReplicas: 2
      maxReplicas: 4
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  recording-service:
    module: services.recording_service.app:app
    replicas: 1
    resources:
      requests:
        cpu: 250m
        memory: 512Mi
      limits:
        cpu: 1000m
        memory: 1Gi
    autoscaling:
      enabled: false
      minReplicas: 1
      maxReplicas: 1
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: false
      minAvailable: 1
    persistence:
      enabled: true
      size: 10Gi
  ivr-service:
    module: services.ivr_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 200m
        memory: 256Mi
      limits:
        cpu: 750m
        memory: 512Mi
    autoscaling:
      enabled: false
      minReplicas: 2
      maxReplicas: 2
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  event-bus-service:
    module: services.event_bus_service.app:app
    replicas: 1
    resources:
      requests:
        cpu: 200m
        memory: 256Mi
      limits:
        cpu: 750m
        memory: 512Mi
    autoscaling:
      enabled: false
      minReplicas: 1
      maxReplicas: 1
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: false
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  asterisk-bridge-service:
    module: services.asterisk_bridge_service.app:app
    # Must stay singleton: background AMI consumption and retry/reconcile loops are not multi-replica safe.
    replicas: 1
    resources:
      requests:
        cpu: 200m
        memory: 256Mi
      limits:
        cpu: 750m
        memory: 512Mi
    autoscaling:
      enabled: false
      minReplicas: 1
      maxReplicas: 1
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: false
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  telegram-adapter-service:
    module: services.telegram_adapter_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 250m
        memory: 256Mi
      limits:
        cpu: 1000m
        memory: 512Mi
    autoscaling:
      enabled: true
      minReplicas: 2
      maxReplicas: 4
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  ai-orchestrator-service:
    module: services.ai_orchestrator_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 250m
        memory: 256Mi
      limits:
        cpu: 1000m
        memory: 512Mi
    autoscaling:
      enabled: true
      minReplicas: 2
      maxReplicas: 4
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  ai-voice-runtime-service:
    module: services.ai_voice_runtime_service.app:app
    replicas: 1
    resources:
      requests:
        cpu: 250m
        memory: 256Mi
      limits:
        cpu: 1000m
        memory: 512Mi
    autoscaling:
      enabled: false
      minReplicas: 1
      maxReplicas: 1
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: false
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  webchat-adapter-service:
    module: services.webchat_adapter_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 250m
        memory: 256Mi
      limits:
        cpu: 1000m
        memory: 512Mi
    autoscaling:
      enabled: true
      minReplicas: 2
      maxReplicas: 4
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  email-adapter-service:
    module: services.email_adapter_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 250m
        memory: 256Mi
      limits:
        cpu: 1000m
        memory: 512Mi
    autoscaling:
      enabled: true
      minReplicas: 2
      maxReplicas: 4
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  kb-service:
    module: services.kb_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 200m
        memory: 256Mi
      limits:
        cpu: 750m
        memory: 512Mi
    autoscaling:
      enabled: false
      minReplicas: 2
      maxReplicas: 2
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  reporting-service:
    module: services.reporting_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 200m
        memory: 256Mi
      limits:
        cpu: 750m
        memory: 512Mi
    autoscaling:
      enabled: false
      minReplicas: 2
      maxReplicas: 2
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  supervisor-service:
    module: services.supervisor_service.app:app
    replicas: 2
    resources:
      requests:
        cpu: 200m
        memory: 256Mi
      limits:
        cpu: 750m
        memory: 512Mi
    autoscaling:
      enabled: false
      minReplicas: 2
      maxReplicas: 2
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
  api-gateway:
    module: gateway.app:app
    gateway: true
    replicas: 4
    resources:
      requests:
        cpu: 500m
        memory: 512Mi
      limits:
        cpu: 1500m
        memory: 1Gi
    autoscaling:
      enabled: true
      minReplicas: 4
      maxReplicas: 8
      targetCPUUtilizationPercentage: 70
    podDisruptionBudget:
      enabled: true
      minAvailable: 1
    persistence:
      enabled: false
      size: 1Gi
