Skip to content

Custom Value Configuration

This document explains the meaning and configuration of each field in values.yaml.

Global Configuration (global)

FieldTypeDefaultDescription
global.imagePullSecretslist[]Image pull credentials (private repository authentication)
global.clusterDomainstringcluster.localKubernetes cluster domain
global.podAntiAffinityPresetstringsoftPod anti-affinity strategy: soft (try to spread) / hard (force spread) / none (no setting)
global.settings.loginHoststring""Login host address. After modification, the API Key login address displayed in the frontend application will change accordingly (does not affect the actual backend service address)

Pod Anti-Affinity

You can control Pod distribution strategy by setting global.podAntiAffinityPreset to improve disaster recovery capabilities:

Pod Anti-Affinity Configuration Example
yaml
global:
  podAntiAffinityPreset: "soft" # soft, hard, or none
  • soft (default): All Pods will try to be evenly distributed across Nodes
  • hard: Ensures Pods of the same service are not scheduled on the same Node
  • none: Disables Pod anti-affinity

Login Domain (loginHost)

By default, the login host displayed on the <Your Host>/space/~/quick-start page automatically uses the domain name <Your Host> you are currently using to access the frontend. If you need to modify this value, you can specify it to your desired domain name by configuring global.settings.loginHost.

Note: This setting does not affect the actual backend service address. You need to configure the corresponding forwarding rules yourself.

Gateway (gateway)

FieldTypeDefaultDescription
gateway.replicasint2Gateway replica count
gateway.image.repositorystringrepo.swanlab.cn/public/traefikTraefik gateway image address
gateway.image.tagstring3.6Traefik image tag
gateway.identifyImage.repositorystringrepo.swanlab.cn/public/swanlab-helper/identifyGateway authentication auxiliary image address
gateway.identifyImage.tagstringv1.2Authentication auxiliary image tag
gateway.service.typestringClusterIPService type
gateway.service.ports.webint80Non-secure entry port (accessible from outside the cluster)
gateway.service.ports.internalint8080Internal entry port (only accessible within the cluster)
gateway.service.ports.traefikint8081Traefik dashboard port
gateway.service.ports.metricsint9100Prometheus metrics collection port
gateway.customNodeSelectorobject{}Node selector, e.g., { swanlab: "true" }

Configuring Application Access Entrypoint

The domain name of the application service within the cluster is the release name you deployed. For example, assuming your cluster domain is cluster.local and your deployment command is:

bash
# Assuming the default release_name is swanlab-self-hosted
helm install swanlab-self-hosted swanlab/self-hosted -n <your_namespace>
  • The domain name of the application within the <your_namespace> namespace is swanlab-self-hosted i.e. (<release_name>)
  • The domain name of the application within the kubernetes cluster is: swanlab-self-hosted.<your_namespace>.svc.cluster.local

You can write your load balancing strategy based on the above information. It is generally recommended to prioritize using dedicated domain names (Host-based) to configure access policies to avoid routing conflicts caused by complex or changing path rules.

Based on the principle of architectural decoupling, swanlab-self-hosted does not have a built-in Ingress controller. You need to configure the external access entrypoint on the cluster's load balancer (or Ingress), which is also responsible for TLS termination (HTTPS offloading).

Regarding security policies, the application trusts all X-Forwarded-* request headers by default. If you need stricter header validation or forwarding control, be sure to implement it uniformly at the load balancing layer — this may affect the effectiveness of internal S3 signatures. If you use an external object storage service, you don't need to worry about this.

Metrics Buffer Queue (vector)

FieldTypeDefaultDescription
vector.replicasint2Vector replica count
vector.image.repositorystringrepo.swanlab.cn/public/vectorVector image address
vector.image.tagstring0.51.1-debianVector image tag
vector.sinks.bufferMaxSizeint10737418240Maximum buffer size (bytes), must not exceed 1/3 of persistence.storageSize
vector.persistence.storageClassstring""StorageClass (leave empty to use cluster default)
vector.persistence.storageSizestring60GiStorage volume size, recommended at least 60Gi, ensure ≥ 3x bufferMaxSize

⚠️ Vector's PVC names are not modifiable by default (data-swanlab-self-hosted-vector-0 / data-swanlab-self-hosted-vector-1).

Helper Container (helper)

FieldTypeDefaultDescription
helper.image.repositorystringrepo.swanlab.cn/public/busyboxBusybox image address (used for health checks of various components)
helper.image.tagstring1.37.0Busybox image tag

Application Services (service)

SwanLab-Server (Backend Service)

FieldTypeDefaultDescription
service.server.replicasint2Replica count
service.server.image.repositorystringrepo.swanlab.cn/self-hosted/swanlab-serverImage address
service.server.image.tagstring""Image tag, set to empty string to auto-sync the version specified by the Chart

SwanLab-House (Backend Experiment OLAP Service)

FieldTypeDefaultDescription
service.house.replicasint2Replica count
service.house.image.repositorystringrepo.swanlab.cn/self-hosted/swanlab-houseImage address
service.house.image.tagstring""Image tag, set to empty string to auto-sync the version specified by the Chart
service.house.persistence.storageClassstring""StorageClass
service.house.persistence.storageSizestring10GiStorage volume size

Storage Note: swanlab-house is deployed as a StatefulSet and requires a mounted storage volume. Unlike base services, existingClaim is not supported here. swanlab-house stores some metric intermediate products in the storage volume. Generally, you do not need to care about the data in this storage volume.

SwanLab-Cloud (Frontend Charts)

FieldTypeDefaultDescription
service.cloud.replicasint1Replica count
service.cloud.image.repositorystringrepo.swanlab.cn/self-hosted/swanlab-cloudImage address
service.cloud.image.tagstring""Image tag, set to empty string to auto-sync the version specified by the Chart

SwanLab-Next (Frontend UI)

FieldTypeDefaultDescription
service.next.replicasint2Replica count
service.next.image.repositorystringrepo.swanlab.cn/self-hosted/swanlab-nextImage address
service.next.image.tagstring""Image tag, set to empty string to auto-sync the version specified by the Chart

Application Image Tag Note: The tag of the four application images under service (server / house / cloud / next) should all be set to empty strings rather than latest. The Chart will automatically inject the correct version number during rendering.

Common Fields (Supported by all services)

FieldTypeDefaultDescription
*.customLabelsobject{}Custom Service labels
*.customAnnotationsobject{}Custom Service annotations
*.customPodLabelsobject{}Custom Pod labels
*.customPodAnnotationsobject{}Custom Pod annotations
*.customTolerationslist[]Custom Tolerations
*.customNodeSelectorobject{}Node selector, JSON format, e.g., { swanlab: "true" }
*.resourcesobject{}Resource limits (requests/limits), e.g., { requests: { cpu: "500m", memory: "512Mi" } }

Application performance is a complex calculation metric that typically also depends on resource limits. It is recommended to configure CPU and memory usage reasonably through the resources field.

Built-in Base Services (dependencies)

When integrations.<service>.enabled is false, the Chart will automatically deploy the following components within the cluster.

Storage Resource Configuration Recommendations

If you use built-in single-instance base services, it is recommended to declare your own storage-class to support data persistence.

Before customizing the storage class configuration, please ensure:

  1. The corresponding base service resource does not have integrations enabled
  2. Your storage-class or claim exists in the cluster

Configuration Method (using PostgreSQL as an example):

  1. Auto-create Storage Volume: Configure storageClass and storageSize under dependencies.postgres.persistence
  2. Use Existing Storage Volume: Specify an existing PVC via dependencies.postgres.persistence.existingClaim (recommended practice, ensuring storage resources are managed by you)

The storage configuration method for other base services (Redis, ClickHouse, MinIO) is the same.

PostgreSQL

FieldTypeDefaultDescription
dependencies.postgres.image.repositorystringrepo.swanlab.cn/self-hosted/postgresImage address
dependencies.postgres.image.tagstring16.1Image tag, recommended 16.x and above
dependencies.postgres.usernamestring""Database username
dependencies.postgres.passwordstring""Database password
dependencies.postgres.persistence.existingClaimstring""Use an existing PVC name (leave empty to auto-create)
dependencies.postgres.persistence.storageClassstring""StorageClass
dependencies.postgres.persistence.storageSizestring10GiStorage volume size

Redis

FieldTypeDefaultDescription
dependencies.redis.image.repositorystringrepo.swanlab.cn/self-hosted/redis-stackImage address
dependencies.redis.image.tagstring7.4.0-v8Image tag
dependencies.redis.persistence.existingClaimstring""Use an existing PVC name (leave empty to auto-create)
dependencies.redis.persistence.storageClassstring""StorageClass
dependencies.redis.persistence.storageSizestring10GiStorage volume size

ClickHouse

FieldTypeDefaultDescription
dependencies.clickhouse.image.repositorystringrepo.swanlab.cn/self-hosted/clickhouse-serverImage address
dependencies.clickhouse.image.tagstring24.3Image tag
dependencies.clickhouse.usernamestring""Database username (leave empty if using existingSecret)
dependencies.clickhouse.passwordstring""Database password (leave empty if using existingSecret)
dependencies.clickhouse.persistence.existingClaimstring""Use an existing PVC name (leave empty to auto-create)
dependencies.clickhouse.persistence.storageClassstring""StorageClass
dependencies.clickhouse.persistence.storageSizestring20GiStorage volume size

MinIO (Built-in S3 Object Storage)

If external S3 is already integrated, this can be ignored.

FieldTypeDefaultDescription
dependencies.s3.image.repositorystringrepo.swanlab.cn/self-hosted/minio/minioMinIO image address
dependencies.s3.image.tagstringRELEASE.2025-09-07T16-13-09ZMinIO image tag
dependencies.s3.mcImage.repositorystringrepo.swanlab.cn/self-hosted/minio/mcMinIO client image address
dependencies.s3.mcImage.tagstringRELEASE.2025-08-13T08-35-41ZMinIO client image tag
dependencies.s3.accessKeystring""Access Key
dependencies.s3.secretKeystring""Secret Key (leave empty to auto-generate)
dependencies.s3.persistence.existingClaimstring""Use an existing PVC (leave empty to auto-create)
dependencies.s3.persistence.storageClassstring""StorageClass
dependencies.s3.persistence.storageSizestring20GiStorage volume size

External Base Service Integration (integrations)

The integrations section is used to connect to existing external base services (databases, caches, object storage, etc.), replacing the built-in single-instance deployment of the Chart.

WARNING

If you enable any integrated base service resource (e.g., set integrations.postgres.enabled to true), the corresponding single-instance service deployed by swanlab-self-hosted in dependencies will be destroyed.

Used to connect to external S3 compatible object storage (such as Alibaba Cloud OSS, Tencent Cloud COS, AWS S3, etc.), requiring mandatory AWS S3 protocol compatibility.

WARNING

If your cloud object storage distinguishes S3 protocol endpoint access, please pay special attention to filling in the S3 endpoint

s3-Config

FieldTypeDefaultDescription
integrations.s3.enabledbooltrueEnable external S3 integration (when enabled, dependencies.s3 will not be deployed)
integrations.s3.existingSecretstringswanlab-secret-s3K8s Secret name storing AK/SK

Secret Data Structure (integrations.s3.existingSecret):

.data.<keys>Description
accessKeyObject storage access key
secretKeyObject storage secret key

Public Bucket Configuration (integrations.s3.public)

FieldTypeDefaultDescription
public.sslbooltrueEnable SSL
public.endpointstring""S3 endpoint, without bucket prefix, e.g., oss-cn-beijing.aliyuncs.com
public.regionstring""S3 region, e.g., cn-beijing
public.portint443Port number
public.domainstring""Public bucket URL, must include https:// prefix, e.g., https://<bucket_name>.oss-cn-beijing.aliyuncs.com
public.pathStyleboolfalsePath access method, usually set to false for public cloud object storage
public.bucketstring""Bucket name

📎 Special note: Major cloud providers no longer recommend using pathStyle=True path naming. The default is False. For the difference, please refer to: Virtual hosting of general purpose buckets - AWS

Private Bucket Configuration (integrations.s3.private)

FieldTypeDefaultDescription
private.sslbooltrueEnable SSL
private.endpointstring""S3 endpoint, without bucket prefix, e.g., oss-cn-beijing.aliyuncs.com
private.regionstring""S3 region, e.g., cn-beijing
private.portint443Port number
private.pathStyleboolfalsePath access method, usually set to false for public cloud object storage
private.bucketstring""Bucket name
External S3 Object Storage Integration Configuration Example
yaml
integrations:
  s3:
    enabled: true
    public:
      ssl: true
      endpoint: "xxx.s3.com"
      region: "cn-beijing"
      pathStyle: false
      port: 443
      domain: "https://xxx.xxxx.s3.com"
      bucket: "swanlab-public"
    private:
      ssl: true
      endpoint: "xxx.s3.com"
      region: "cn-beijing"
      pathStyle: false
      port: 443
      bucket: "swanlab-private"
    existingSecret: integration-s3

WARNING

  • The permission for publicBucket is public read, private write. The permission for privateBucket is private read-write
  • When you choose a custom object storage service, please ensure your object storage service can be accessed directly from outside (via IP or domain name)
  • Your object storage secret key must have write permissions and S3 signing permissions for both publicBucket and privateBucket

[Optional] External PostgreSQL (integrations.postgres)

Connect to external PostgreSQL (self-built cnpg cluster or cloud provider RDS).

TIP

If using external PostgreSQL, to ensure application performance, please ensure the database instance is in the same VPC as the cluster.

FieldTypeDefaultDescription
integrations.postgres.enabledboolfalseEnable external PostgreSQL, built-in single instance will be removed
integrations.postgres.hoststring""Database host address
integrations.postgres.portint5432Database port
integrations.postgres.databasestring""Database name
integrations.postgres.existingSecretstring""K8s Secret name storing credentials

Secret Data Structure (integrations.postgres.existingSecret):

.data.<keys>Description
usernameRead-write username
passwordRead-write user password
primaryUrlRead-write database connection string, format: postgresql://{username}:${password}@postgres:5432/app?schema=public
replicaUrlRead-only database connection string, generally used for load balancing. If a read-only user/cluster is not configured, the read-write connection string can be used instead
External PostgreSQL Integration Configuration Example
yaml
apiVersion: v1
kind: Secret
metadata:
  name: integration-postgres-secret
  namespace: <your_namespace>
type: Opaque
stringData:
  username: "<your_username>"
  password: "<your_password>"
  primaryUrl: "postgres://<your_username>:<your_password>@<your_host>:5432/app" # Modify host and port according to your actual connection string
  replicaUrl: "postgres://<your_username>:<your_password>@<your_host>:5432/app" # Modify host and port according to your actual connection string
yaml
integrations:
  ....
  postgres:
    enabled: true
    host: "<your_host>" # Replace with actual database host address, ensure it is in the same VPC as the cluster
    port: 5432
    database: "app"
    existingSecret: integration-postgres-secret

Please ensure the above configuration corresponds with the information in the Secret. For detailed key data structure descriptions, please refer to values.yaml.

Connect to external Redis (self-built cluster or cloud provider Redis service).

FieldTypeDefaultDescription
integrations.redis.enabledboolfalseEnable external Redis, built-in single instance will be removed
integrations.redis.hoststring""Redis host address
integrations.redis.portint6379Redis port
integrations.redis.databasestring"0"Database number
integrations.redis.existingSecretstring""K8s Secret name storing credentials

Secret Data Structure (integrations.redis.existingSecret):

.data.<keys>Description
urlDatabase connection string, format: redis://{username}:${password}@redis:6379
External Redis Integration Configuration Example
yaml
integrations:
  redis:
    enabled: true
    host: "example.redis"
    port: 6379
    database: "0"
    existingSecret: integration-redis

Please ensure the above configuration corresponds with the information in the Secret.

Connect to external ClickHouse (self-built cluster or cloud provider service).

FieldTypeDefaultDescription
integrations.clickhouse.enabledboolfalseEnable external ClickHouse, built-in single instance will be removed
integrations.clickhouse.hoststring""ClickHouse host address
integrations.clickhouse.httpPortint8123HTTP protocol port
integrations.clickhouse.tcpPortint9000TCP protocol port
integrations.clickhouse.databasestring""Database name
integrations.clickhouse.existingSecretstring""K8s Secret name storing credentials

Secret Data Structure (integrations.clickhouse.existingSecret):

.data.<keys>Description
usernameRead-write username
passwordRead-write user password
External ClickHouse Integration Configuration Example
yaml
integrations:
  clickhouse:
    enabled: true
    host: "example.clickhouse"
    httpPort: 8123
    tcpPort: 9000
    database: "app"
    existingSecret: integration-clickhouse

Please ensure the above configuration corresponds with the information in the Secret.