# Wexa Helm Chart Values

# Override the fullname to avoid "release-chartname" pattern
# This ensures services are named "wexa-*" instead of "wexa-wexa-studio-*"
fullnameOverride: "wexa"

# MongoDB Community Operator
mongodb-operator:
  enabled: true
  community-operator-crds:
    enabled: false
  operator:
    watchNamespace: "*"
  resources:
    limits:
      cpu: "1100m"
      memory: "1Gi"
    requests:
      cpu: "500m"
      memory: "200Mi"

# Global Settings
global:
  namespace: wexa
  environment: production
  applicationVersion: "V.1.6.2"
  storageClass: "longhorn"
  imagePullSecrets:
    - name: ghcr-secret
  topologySpreadConstraints: true

# Security
networkPolicies:
  enabled: false

serviceAccount:
  annotations: {}
  automountToken: false

# Image Registry
imageRegistry:
  registry: ghcr.io
  organization: "cognochain"
  pullPolicy: Always

serviceDomain: "wexa.svc.cluster.local"

# MongoDB
mongodb:
  enabled: true
  replicaSet:
    name: rs0
    replicas: 3
  image:
    repository: mongo
    tag: "7.0"
    pullPolicy: IfNotPresent
  resources:
    requests:
      cpu: "2000m"
      memory: "10Gi"
    limits:
      cpu: "2000m"
      memory: "10Gi"
  persistence:
    enabled: true
    storageClass: ""
    size: 5Gi
  auth:
    rootUsername: admin
    rootPassword: "wexaMongoPassword123!"  # CHANGE IN PRODUCTION
    database: wexa
  service:
    port: 27017
    type: ClusterIP
  replicaSetKey: "d2V4YVJlcGxpY2FTZXRLZXlGb3JNb25nb0RCQXV0aGVudGljYXRpb24="  # CHANGE IN PRODUCTION

# Redis
redis:
  enabled: true
  image:
    repository: redis
    tag: "7-alpine"
    pullPolicy: IfNotPresent
  resources:
    requests:
      cpu: "1000m"
      memory: "6Gi"
    limits:
      cpu: "1000m"
      memory: "6Gi"
  auth:
    password: "wexaRedisPassword123!"  # CHANGE IN PRODUCTION
  service:
    port: 6379
    type: ClusterIP
  persistence:
    enabled: true
    storageClass: ""
    size: 5Gi
  maxMemory: "5gb"
  maxMemoryPolicy: "allkeys-lru"

# MinIO
minio:
  enabled: true
  image:
    repository: minio/minio
    tag: "RELEASE.2024-01-16T16-07-38Z"
    pullPolicy: IfNotPresent
  resources:
    requests:
      cpu: "250m"
      memory: "512Mi"
    limits:
      cpu: "1000m"
      memory: "2Gi"
  auth:
    rootUser: "minioadmin"
    rootPassword: "wexaMinioPassword123!"  # CHANGE IN PRODUCTION
  region: "us-east-1"
  persistence:
    enabled: true
    storageClass: ""
    size: 10Gi
  service:
    port: 9000
    consolePort: 9001
    type: ClusterIP

# Qdrant Vector Database
qdrant:
  enabled: true
  image:
    repository: qdrant/qdrant
    tag: "v1.7.4"
    pullPolicy: IfNotPresent
  replicas: 1
  resources:
    requests:
      cpu: "500m"
      memory: "1Gi"
    limits:
      cpu: "2000m"
      memory: "4Gi"
  auth:
    apiKey: ""  # Optional: Set API key for authentication
  persistence:
    enabled: true
    storageClass: ""
    size: 10Gi
    snapshotsSize: 5Gi
  service:
    httpPort: 6333
    grpcPort: 6334
    type: ClusterIP

# HashiCorp Vault
vault:
  enabled: true
  image:
    repository: hashicorp/vault
    tag: "1.15.4"
    pullPolicy: IfNotPresent
  resources:
    requests:
      cpu: "100m"
      memory: "256Mi"
    limits:
      cpu: "500m"
      memory: "512Mi"
  auth:
    rootToken: "wexa-vault-root-token"  # CHANGE IN PRODUCTION
  dev:
    enabled: false  # Set to true for development (no persistence, no unsealing required)
  mountPoint: "secret"
  persistence:
    enabled: true
    storageClass: ""
    size: 5Gi
  service:
    port: 8200
    type: ClusterIP

# Temporal
temporal-helm:
  enabled: true
  server:
    replicaCount: 1
    config:
      persistence:
        defaultStore: default
        default:
          driver: "sql"
          sql:
            driver: "postgres12"
            host: "wexa-postgresql"
            port: 5432
            database: temporal
            user: temporal
            password: "wexaTemporalPassword123!"  # CHANGE IN PRODUCTION
            existingSecret: ""
            maxConns: 20
            maxIdleConns: 20
            maxConnLifetime: "1h"
        visibility:
          driver: "sql"
          sql:
            driver: "postgres12"
            host: "wexa-postgresql"
            port: 5432
            database: temporal_visibility
            user: temporal
            password: "wexaTemporalPassword123!"  # CHANGE IN PRODUCTION
            existingSecret: ""
            maxConns: 20
            maxIdleConns: 20
            maxConnLifetime: "1h"
  cassandra:
    enabled: false
  mysql:
    enabled: false
  postgresql:
    enabled: false
  elasticsearch:
    enabled: false
  prometheus:
    enabled: false
  grafana:
    enabled: false
  web:
    enabled: true
    replicaCount: 1
    resources:
      requests:
        cpu: "100m"
        memory: "128Mi"
      limits:
        cpu: "200m"
        memory: "256Mi"
    service:
      type: ClusterIP
      port: 8080
  admintools:
    enabled: true
    resources:
      requests:
        cpu: "100m"
        memory: "128Mi"
      limits:
        cpu: "200m"
        memory: "256Mi"

# PostgreSQL (for Temporal)
postgresql:
  enabled: true
  image:
    repository: postgres
    tag: "15-alpine"
    pullPolicy: IfNotPresent
  resources:
    requests:
      cpu: "250m"
      memory: "512Mi"
    limits:
      cpu: "1000m"
      memory: "2Gi"
  auth:
    username: temporal
    password: "wexaTemporalPassword123!"  # CHANGE IN PRODUCTION
    database: temporal
  persistence:
    enabled: true
    storageClass: ""
    size: 5Gi
  service:
    port: 5432
    type: ClusterIP

# Data Service
dataService:
  enabled: true
  image:
    repository: "ghcr.io/cognochain/data-service"
    tag: enterprise
    pullPolicy: Always
  replicas: 2
  resources:
    requests:
      cpu: "1000m"
      memory: "4Gi"
    limits:
      cpu: "1000m"
      memory: "4Gi"
  service:
    port: 4000
    type: ClusterIP
  hpa:
    enabled: false
    minReplicas: 2
    maxReplicas: 5
    targetCPUUtilization: 70
    targetMemoryUtilization: 80

# Worker
worker:
  enabled: true
  image:
    repository: "ghcr.io/cognochain/data-service"
    tag: enterprise
    pullPolicy: Always
  replicas: 2
  resources:
    requests:
      cpu: "1000m"
      memory: "4Gi"
    limits:
      cpu: "1000m"
      memory: "4Gi"
  hpa:
    enabled: false
    minReplicas: 2
    maxReplicas: 5
    targetCPUUtilization: 70
    targetMemoryUtilization: 80

# Schedule Worker
scheduleWorker:
  enabled: true
  image:
    repository: "ghcr.io/cognochain/data-service"
    tag: enterprise
    pullPolicy: Always
  replicas: 2
  resources:
    requests:
      cpu: "1000m"
      memory: "4Gi"
    limits:
      cpu: "1000m"
      memory: "4Gi"
  hpa:
    enabled: false
    minReplicas: 2
    maxReplicas: 5
    targetCPUUtilization: 70
    targetMemoryUtilization: 80

# Identity Service
identityService:
  enabled: true
  image:
    repository: "ghcr.io/cognochain/identity-service"
    tag: enterprise
    pullPolicy: Always
  replicas: 1
  resources:
    requests:
      cpu: "512m"
      memory: "2Gi"
    limits:
      cpu: "512m"
      memory: "2Gi"
  service:
    port: 8000
    type: ClusterIP
  hpa:
    enabled: true
    minReplicas: 1
    maxReplicas: 5
    targetCPUUtilization: 70
    targetMemoryUtilization: 80

# Wexa Web
wexaWeb:
  enabled: true
  image:
    repository: "ghcr.io/cognochain/wexa-web"
    tag: enterprise
    pullPolicy: Always
  replicas: 1
  resources:
    requests:
      cpu: "512m"
      memory: "2Gi"
    limits:
      cpu: "512m"
      memory: "2Gi"
  service:
    port: 3000
    type: ClusterIP
  hpa:
    enabled: true
    minReplicas: 1
    maxReplicas: 5
    targetCPUUtilization: 70
    targetMemoryUtilization: 80

# LLM Calls Service
llmCallsService:
  enabled: true
  image:
    repository: "ghcr.io/cognochain/llm-calls-service"
    tag: enterprise
    pullPolicy: Always
  replicas: 1
  resources:
    requests:
      cpu: "512m"
      memory: "1Gi"
    limits:
      cpu: "512m"
      memory: "1Gi"
  service:
    port: 5000
    type: ClusterIP

# Application Config
appConfig:
  secretsManagerChoice: "hashicorp"
  storageManagerChoice: "minio"
  cookieName: "wexa_cookie"
  cookieSameSite: "lax"
  cookieSecure: "false"
  refreshCookieName: "wexa_refresh_staging_cookie"
  mongoDatabaseName: "data-service-prod"
  executionsMongoDatabaseName: "wexa-executions"
  skillOutputDatabase: "wexa"
  pythonUnbuffered: "1"
  elasticsearchUrl: "http://elasticsearch.wexa.svc.cluster.local:9200"
  azureStorageDefaultContainer: "wexa"
  webServerKey: "wexa-web-server-key"  # CHANGE IN PRODUCTION
  llmServicePort: "5000"
  llmServiceServerKey: "wexa-llm-server-key"  # CHANGE IN PRODUCTION
  liteLLMProxyApiBase: "none"
  liteLLMProxyApiKey: "none"
  bedrockApiKey: "none"
  llmAlphaFactor: "1.4"
  llmModelsToCheck: "none"
  licenseKey: "demo-license-key"  # CHANGE IN PRODUCTION

# Azure Secrets (optional)
azureSecrets:
  comApiKey: ""
  comEndpoint: ""
  keyVaultUri: ""
  clientSecret: ""
  clientId: ""
  tenantId: ""
  storageAccountName: ""
  storageAccountKey: ""

# Mail
mail:
  senderEmail: "no-reply@m.wexa.email"

# GHCR Secret
ghcrSecret:
  dockerConfigJson: ""  # REQUIRED
