# Default values for danswer-stack.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
  # Specifies whether a service account should be created
  create: true
  # Automatically mount a ServiceAccount's API credentials?
  automount: true
  # Annotations to add to the service account
  annotations: {}
  # The name of the service account to use.
  # If not set and create is true, a name is generated using the fullname template
  name: ""


webserver:
  replicaCount: 1
  image:
    repository: danswer/danswer-web-server
    pullPolicy: IfNotPresent
    # Overrides the image tag whose default is the chart appVersion.
    tag: ""

  podAnnotations: {}
  podLabels: {}

  podSecurityContext: {}
    # fsGroup: 2000

  securityContext: {}
    # capabilities:
    #   drop:
    #   - ALL
    # readOnlyRootFilesystem: true
    # runAsNonRoot: true
    # runAsUser: 1000

  service:
    type: ClusterIP
    port: 3000

  resources: {}
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
  # limits:
  #   cpu: 100m
  #   memory: 128Mi
  # requests:
  #   cpu: 100m
  #   memory: 128Mi

  autoscaling:
    enabled: false
    minReplicas: 1
    maxReplicas: 100
    targetCPUUtilizationPercentage: 80
    # targetMemoryUtilizationPercentage: 80

  # Additional volumes on the output Deployment definition.
  volumes: []
  # - name: foo
  #   secret:
  #     secretName: mysecret
  #     optional: false

  # Additional volumeMounts on the output Deployment definition.
  volumeMounts: []
  # - name: foo
  #   mountPath: "/etc/foo"
  #   readOnly: true

  nodeSelector: {}
  tolerations: []
  affinity: {}

api:
  replicaCount: 1
  image:
    repository: danswer/danswer-backend
    pullPolicy: IfNotPresent
    # Overrides the image tag whose default is the chart appVersion.
    tag: ""

  podAnnotations: {}
  podLabels:
    scope: danswer-backend

  podSecurityContext: {}
    # fsGroup: 2000

  securityContext: {}
    # capabilities:
    #   drop:
    #   - ALL
    # readOnlyRootFilesystem: true
    # runAsNonRoot: true
    # runAsUser: 1000

  service:
    type: ClusterIP
    port: 8080

  resources:
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
    requests:
      cpu: 1500m
      memory: 2Gi
  # limits:
  #   cpu: 100m
  #   memory: 128Mi

  autoscaling:
    enabled: false
    minReplicas: 1
    maxReplicas: 100
    targetCPUUtilizationPercentage: 80
    # targetMemoryUtilizationPercentage: 80

  # Additional volumes on the output Deployment definition.
  volumes: []
  # - name: foo
  #   secret:
  #     secretName: mysecret
  #     optional: false

  # Additional volumeMounts on the output Deployment definition.
  volumeMounts: []
  # - name: foo
  #   mountPath: "/etc/foo"
  #   readOnly: true

  nodeSelector: {}
  tolerations: []
  affinity:
    podAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        - labelSelector:
            matchExpressions:
              - key: scope
                operator: In
                values:
                  - danswer-backend
          topologyKey: "kubernetes.io/hostname"

background:
  replicaCount: 1
  image:
    repository: danswer/danswer-backend
    pullPolicy: IfNotPresent
    # Overrides the image tag whose default is the chart appVersion.
    tag: ""
  podAnnotations: {}
  podLabels:
    scope: danswer-backend

  podSecurityContext: {}
    # fsGroup: 2000

  securityContext: {}
    # capabilities:
    #   drop:
    #   - ALL
    # readOnlyRootFilesystem: true
    # runAsNonRoot: true
    # runAsUser: 1000

  resources:
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
    requests:
      cpu: 2500m
      memory: 5Gi
  # limits:
  #   cpu: 100m
  #   memory: 128Mi

  autoscaling:
    enabled: false
    minReplicas: 1
    maxReplicas: 100
    targetCPUUtilizationPercentage: 80
    # targetMemoryUtilizationPercentage: 80

  # Additional volumes on the output Deployment definition.
  volumes: []
  # - name: foo
  #   secret:
  #     secretName: mysecret
  #     optional: false

  # Additional volumeMounts on the output Deployment definition.
  volumeMounts: []
  # - name: foo
  #   mountPath: "/etc/foo"
  #   readOnly: true

  nodeSelector: {}
  tolerations: []
  affinity:
    podAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        - labelSelector:
            matchExpressions:
              - key: scope
                operator: In
                values:
                  - danswer-backend
          topologyKey: "kubernetes.io/hostname"

vespa:
  replicaCount: 1
  image:
    repository: vespaengine/vespa
    pullPolicy: IfNotPresent
    tag: "8.277.17"
  podAnnotations: {}
  podLabels: {}

  podSecurityContext: {}
    # fsGroup: 2000

  securityContext:
    privileged: true
    runAsUser: 0
    # capabilities:
    #   drop:
    #   - ALL
    # readOnlyRootFilesystem: true
    # runAsNonRoot: true
    # runAsUser: 1000

  resources:
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
    requests:
      cpu: 2500m
      memory: 5Gi
  # limits:
  #   cpu: 100m
  #   memory: 128Mi

  nodeSelector: {}
  tolerations: []
  affinity: {}


#ingress:
#  enabled: false
#  className: ""
#  annotations: {}
#    # kubernetes.io/ingress.class: nginx
#    # kubernetes.io/tls-acme: "true"
#  hosts:
#    - host: chart-example.local
#      paths:
#        - path: /
#          pathType: ImplementationSpecific
#  tls: []
#  #  - secretName: chart-example-tls
#  #    hosts:
#  #      - chart-example.local

persistence:
  vespa:
    enabled: true
    existingClaim: ""
    storageClassName: ""
    accessModes:
      - ReadWriteOnce
    size: 1Gi
  connector:
    enabled: true
    existingClaim: ""
    storageClassName: ""
    accessModes:
      - ReadWriteOnce
    size: 1Gi
  dynamic:
    enabled: true
    existingClaim: ""
    storageClassName: ""
    accessModes:
      - ReadWriteOnce
    size: 1Gi

postgresql:
  enabled: false
  auth:
    postgresPassword: ""
    username: danswer
    password: danswer
    database: danswer

config:
  # Auth Setting, also check the secrets file
  #AUTH_TYPE: "disabled"  # Change this for production uses unless Danswer is only accessible behind VPN
  #SESSION_EXPIRE_TIME_SECONDS: "86400"  # 1 Day Default
  #VALID_EMAIL_DOMAINS: ""  # Can be something like danswer.ai, as an extra double-check
  #SMTP_SERVER: "" # For sending verification emails, if unspecified then defaults to 'smtp.gmail.com'
  #SMTP_PORT: "" # For sending verification emails, if unspecified then defaults to '587'
  #SMTP_USER: ""  # 'your-email@company.com'
  #SMTP_PASS: ""  # 'your-gmail-password'
  #EMAIL_FROM: ""  # 'your-email@company.com' SMTP_USER missing used instead
  # Gen AI Settings
  #GEN_AI_MODEL_PROVIDER: "openai"
  #GEN_AI_MODEL_VERSION: "gpt-4" # "gpt-3.5-turbo-0125"  # Use GPT-4 if you have it
  #FAST_GEN_AI_MODEL_VERSION: "gpt-3.5-turbo-0125"
  #GEN_AI_API_KEY: ""
  #GEN_AI_API_ENDPOINT: ""
  #GEN_AI_API_VERSION: ""
  #GEN_AI_LLM_PROVIDER_TYPE: ""
  #GEN_AI_MAX_TOKENS: ""
  #QA_TIMEOUT: "60"
  #MAX_CHUNKS_FED_TO_CHAT: ""
  #DISABLE_LLM_FILTER_EXTRACTION: ""
  #DISABLE_LLM_CHUNK_FILTER: ""
  #DISABLE_LLM_CHOOSE_SEARCH: ""
  # Query Options
  #DOC_TIME_DECAY: ""
  #HYBRID_ALPHA: ""
  #EDIT_KEYWORD_QUERY: ""
  #MULTILINGUAL_QUERY_EXPANSION: ""
  #QA_PROMPT_OVERRIDE: ""
  # Don't change the NLP models unless you know what you're doing
  #DOCUMENT_ENCODER_MODEL: ""
  #NORMALIZE_EMBEDDINGS: ""
  #ASYM_QUERY_PREFIX: ""
  #ASYM_PASSAGE_PREFIX: ""
  #ENABLE_RERANKING_REAL_TIME_FLOW: ""
  #ENABLE_RERANKING_ASYNC_FLOW: ""
  #MODEL_SERVER_HOST: ""
  #MODEL_SERVER_PORT: ""
  #INDEXING_MODEL_SERVER_HOST: ""
  #MIN_THREADS_ML_MODELS: ""
  # Indexing Configs
  #NUM_INDEXING_WORKERS: ""
  #DASK_JOB_CLIENT_ENABLED: ""
  #CONTINUE_ON_CONNECTOR_FAILURE: ""
  #EXPERIMENTAL_CHECKPOINTING_ENABLED: ""
  #CONFLUENCE_CONNECTOR_LABELS_TO_SKIP: ""
  #GONG_CONNECTOR_START_TIME: ""
  #NOTION_CONNECTOR_ENABLE_RECURSIVE_PAGE_LOOKUP: ""
  # DanswerBot SlackBot Configs
  #DANSWER_BOT_SLACK_APP_TOKEN: ""
  #DANSWER_BOT_SLACK_BOT_TOKEN: ""
  #DANSWER_BOT_DISABLE_DOCS_ONLY_ANSWER: ""
  #DANSWER_BOT_DISPLAY_ERROR_MSGS: ""
  #DANSWER_BOT_RESPOND_EVERY_CHANNEL: ""
  #DANSWER_BOT_DISABLE_COT: ""  # Currently unused
  #NOTIFY_SLACKBOT_NO_ANSWER: ""
  # Logging
  # Optional Telemetry, please keep it on (nothing sensitive is collected)? <3
  # https://docs.danswer.dev/more/telemetry
  #DISABLE_TELEMETRY: ""
  #LOG_LEVEL: ""
  #LOG_ALL_MODEL_INTERACTIONS: ""
  #LOG_VESPA_TIMING_INFORMATION: ""
  # Shared or Non-backend Related
  #INTERNAL_URL: "http://api-server-service:80"  # for web server
  WEB_DOMAIN: "http://localhost:3000"  # for web server and api server
  # Other Services
  #POSTGRES_HOST: "relational-db-service"
  #VESPA_HOST: "document-index-service"