# -- Override the namespace. By default, Nebulous is deployed to the Helm release's namespace.
namespaceOverride: ""

## Nebulous configuration
image:
  pullPolicy: "IfNotPresent"
  # -- The nebulous image tag. Defaults to the Helm chart's appVersion.
  tag: ""
  # -- The repository to pull the server image from.
  repository: "us-docker.pkg.dev/agentsea-dev/nebulous/server"

# -- The log level of the Nebulous server. Options are "off", "trace", "debug", "info", "warn", "error".
logLevel: "info"

serviceAccount:
  # -- The name of the Kubernetes service account to be used by the Nebulous deployment.
  # -- If left empty, a service account will be created.
  name: ""

service:
  # -- The port of the Kubernetes service.
  port: 3000
  # -- Annotations to add to the Kubernetes service.
  annotations: { }
  # -- Override the name of the Kubernetes service.
  nameOverride: ""

ingress:
  # -- If enabled, create an Ingress resource.
  enabled: false

  # -- Annotations to add to the Ingress resource.
  annotations: { }
  # -- The ingress class.
  ingressClassName: ""
  # -- The host field of the Ingress rule.
  host: ""

local:
  # -- If enabled, nebulous can run Pods in the local cluster.
  enabled: false

messageQueue:
  # -- The message queue type. The currently only supported value is "redis".
  type: "redis"

tailscale:
  # -- The Tailscale host to connect to. If headscale.enabled is true, this is ignored.
  loginServer: "https://login.tailscale.com"
  # -- The Tailscale API key. If headscale.enabled is true, this is ignored.
  apiKey: ""
  # -- The Tailscale auth key. If headscale.enabled is true, this is ignored.
  authKey: ""

  secret:
    # -- Name of the secret with the Redis connection string and password.
    name: "tailscale-secret"
    keys:
      # -- The key in the secret containing the Tailscale host.
      loginServer: "LOGIN_SERVER"
      # -- The key in the secret containing the Tailscale API key
      apiKey: "API_KEY"
      # -- The key in the secret containing the Tailscale auth key
      authKey: "AUTH_KEY"

encryptionKey:
  secret:
    # -- The name of the secret containing the 32 byte encryption key.
    name: "nebulous-secret"
    keys:
      # -- The key in the secret containing the encryption key.
      encryptionKey: "ENCRYPTION_KEY"

  # -- The 32 byte encryption key encoded in base64. Not recommended for production.
  encodedValue: ""

## Storage configuration
storage:
  huggingface:
    claimName: "huggingface-pvc"

    createPersistentVolumeClaim: true
    size: "100Gi"
    storageClassName: ""

  adapter:
    claimName: "adapter-pvc"

    createPersistentVolumeClaim: true
    size: "100Gi"
    storageClassName: ""

  dataset:
    claimName: "dataset-pvc"

    createPersistentVolumeClaim: true
    size: "100Gi"
    storageClassName: ""

  model:
    claimName: "model-pvc"

    createPersistentVolumeClaim: true
    size: "1000Gi"
    storageClassName: ""

## Database configuration
postgres:
  secret:
    # -- Name of the secret with the Postgres connection string.
    name: "postgres-secret"
    keys:
      # -- The key in the secret containing the Postgres connection string.
      connection_string: "CONNECTION_STRING"

  # -- Manual configuration of the Postgres connection. Except for 'host', this information is also used if 'create' is true.
  auth:
    host: ""
    port: 5432
    database: "nebulous"
    user: "nebulous"
    password: "nebulous"

  # -- If enabled, create a Postgres deployment and service. Not recommended for production.
  create: false
  # -- The postgres image tag. Ignored unless 'create' is true.
  imageTag: "latest"

  persistence:
    # -- If enabled, use a PersistentVolumeClaim for the Postgres data. Ignored unless 'create' is true.
    enabled: false
    # -- The name of the PersistentVolumeClaim for the Postgres data.
    claimName: "postgres-pvc"

    # -- If true, create a new PersistentVolumeClaim for the Postgres data.
    createPersistentVolumeClaim: false
    # -- The size of the PersistentVolumeClaim for the Postgres data.
    size: "100Gi"
    # -- The storage class of the PersistentVolumeClaim for the Postgres data.
    storageClassName: ""

redis:
  secret:
    # -- Name of the secret with the Redis connection string and password.
    name: "redis-secret"
    keys:
      # -- The key in the secret containing the Redis connection string.
      connection_string: "CONNECTION_STRING"
      # -- The key in the secret containing the Redis password.
      password: "PASSWORD"

  # -- Manual configuration of the Redis connection. Except for 'host', this information is also used if 'create' is true.
  auth:
    host: ""
    port: 6379
    database: 0
    password: "nebulous"

  # -- If enabled, create a Redis deployment and service. Not recommended for production.
  create: false
  # -- The redis image tag. Ignored unless 'create' is true.
  imageTag: "latest"

  service:
    # -- The annotations to add to the Kubernetes service.
    annotations: { }
    # -- Override the name of the Kubernetes service.
    nameOverride: ""

  ingress:
    # -- If enabled, create an Ingress resource. Ignored unless 'create' is true.
    enabled: false

    # -- Annotations to add to the Ingress resource.
    annotations: { }
    # -- The ingress class.
    ingressClassName: ""
    # -- The host field of the Ingress rule.
    host: ""

## Headscale configuration
headscale:
  # -- If true, create a Headscale deployment and service. Overrides tailscale configuration. Not recommended for production.
  create: false
  # -- Namespace override for the Headscale deployment.
  namespaceOverride: ""
  # -- The Headscale image tag.
  imageTag: "latest"
  # -- The domain under which the Headscale server is exposed.
  domain: ""

  # -- Prefixes to allocate tailaddresses from. Must be within the IP ranges supported by the Tailscale client.
  # Refer to https://github.com/juanfont/headscale/blob/main/config-example.yaml for details.
  prefixes:
    v4: 100.64.0.0/10
    v6: fd7a:115c:a1e0::/48

  dns:
    # -- The base domain for MagicDNS hostnames. Cannot be the same as the Headscale server's domain.
    # Refer to https://github.com/juanfont/headscale/blob/main/config-example.yaml for details.
    base_domain: ""

  # -- The Headscale DERP configuration. Either 'externalMapUrls' or 'configMap' must be set.
  derp:
    # -- URLs of externally available DERP maps encoded in JSON.
    externalMaps: [ ]
    configMap:
      # -- The name of the ConfigMap containing the DERP server configuration.
      name: ""
      # -- The key in the ConfigMap containing the DERP server configuration YAML file.
      key: "servers.yaml"

  sqlite:
    # -- The name of the PersistentVolumeClaim for the Headscale sqlite database.
    claimName: "headscale-sqlite-pvc"

    # -- If true, create a PersistentVolumeClaim for the Headscale sqlite database.
    createPersistentVolumeClaim: true
    # -- The size of the PersistentVolumeClaim created for the Headscale sqlite database.
    size: "10Gi"
    # -- The storage class of the PersistentVolumeClaim created for the Headscale sqlite database.
    storageClassName: ""

  privateKeys:
    # -- The name of the PersistentVolumeClaim for the Headscale private keys.
    claimName: "headscale-keys-pvc"

    # -- If true, create a PersistentVolumeClaim for the Headscale private keys.
    createPersistentVolumeClaim: true
    # -- The size of the PersistentVolumeClaim created for the Headscale
    size: "16Mi"
    # -- The storage class of the PersistentVolumeClaim created for the Headscale private keys.
    storageClassName: ""

  service:
    # -- The port of the Kubernetes service.
    port: 80
    # -- The annotations to add to the Kubernetes service.
    annotations: { }
    # -- Override the name of the Kubernetes service.
    nameOverride: ""

  ingress:
    # -- If enabled, create an Ingress resource. Ignored unless 'enabled' is true.
    enabled: false

    # -- Annotations to add to the Ingress resource.
    annotations: { }
    # -- The ingress class.
    ingressClassName: ""

## Provider configuration
providers:
  aws:
    # -- Enable access to AWS.
    enabled: false

    secret:
      # -- The name of the secret containing the AWS credentials.
      name: "aws-secret"
      keys:
        # -- The key in the secret containing the access key ID.
        accessKeyId: "AWS_ACCESS_KEY_ID"
        # -- The key in the secret containing the secret access key.
        secretAccessKey: "AWS_SECRET_ACCESS_KEY"

    # -- Manual configuration of the AWS credentials. Not recommended for production.
    auth:
      accessKeyId: ""
      secretAccessKey: ""

  runpod:
    # -- Enable access to Runpod.
    enabled: false

    secret:
      # -- The name of the secret containing the API key.
      name: "runpod-secret"
      keys:
        # -- The key in the secret containing the API key.
        apiKey: "RUNPOD_API_KEY"

    # -- Manual configuration of the Runpod API key. Not recommended for production.
    auth:
      apiKey: ""
