apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: investibook
resources:
  - ../../base
  - namespace.yaml
  - agent-config.yaml
  - agent-external-secret.yml
  - investibook-config-secret.yml
  - auth0-external-secret.yml
  - code-cache-pvc.yaml
  - tidb-mirror-sync-cronjob.yaml
  - ingress.yaml
configMapGenerator:
  - name: investibook-backend-config
    literals:
      # DevOps MCP connector endpoints (consumed by the backend)
      - DEVOPS_BASE_URL=https://prod.devops.pingcap.com
      # Feishu bot
      - LARK_BASE_URL=https://open.feishu.cn
      - LARK_BOT_NAME=investibook-bot
      - CHATBOT_SESSION_TIMEOUT_MINUTES=30
      # 0 = disabled. Sum of interaction_token_usage.cost_amount per ACP session.
      - WORKSPACE_COST_LIMIT_USD=10.0
      # Backend-owned image parser uses the production Claude Sonnet profile.
      - INVESTIBOOK_IMAGE_PARSE_PROVIDER=bedrock
      - INVESTIBOOK_IMAGE_PARSE_BEDROCK_REGION=us-east-1
      - INVESTIBOOK_IMAGE_PARSE_BEDROCK_MODEL_ID=arn:aws:bedrock:us-east-1:841162690310:application-inference-profile/49r21k0ahow4
      # Jira TCOC import
      - JIRA_TCOC_IMPORT_INTERVAL_SECONDS=3600 # 1 hour
      - JIRA_TCOC_IMPORT_ENABLED=true
      # Investibook non-secret configuration (consumed by the backend)
      - INVESTIBOOK_AIOPS_API_URL=http://aiops-server.aiops-prod:8090
      - INVESTIBOOK_S3_BUCKET=tidbcloud-aiops-assets-prod
      - INVESTIBOOK_AWS_REGION=us-west-2
      - INVESTIBOOK_EXPORT_S3_PREFIX=investibook_service/export_workspaces
      - INVESTIBOOK_CLINIC_ENDPOINT=https://clinic.pingcap.com
      - INVESTIBOOK_JIRA_BASE_URL=https://tidb.atlassian.net
images:
  - name: investibook/frontend
    newName: 557537366020.dkr.ecr.us-west-2.amazonaws.com/investibook/prod/frontend
    newTag: 50e18814636c8146b2a5adaeb31cadf1fe098822
  - name: investibook/backend
    newName: 557537366020.dkr.ecr.us-west-2.amazonaws.com/investibook/prod/backend
    newTag: 50e18814636c8146b2a5adaeb31cadf1fe098822
patches:
  - path: serviceaccount-patch.yaml
  - path: admin-emails-patch.yaml
  - path: backend-code-cache-patch.yaml
