Skip to main content

External Resource Configuration Guide

📘 Overview

By default, CSGHUB enables a set of built-in core services during installation (PostgreSQL, Redis, MinIO, Registry, Gitaly, etc.). In production environments, it is generally recommended to use external managed resources (external databases, caches, object storage, etc.) for higher availability and performance.


⚙️ Disabling Built-in Resources and Priority Logic

✅ Disable Mechanism

  • Set the following in your Helm values:
global.<component>.enabled=false
  • This disables the built-in component (e.g., global.postgresql.enabled=false).
  • When set to false, Helm will automatically skip deploying the built-in component (no need to additionally disable postgresql.enabled in subcharts).

🧩 Default Naming Rules

  • Database names, storage bucket names, etc., follow default naming conventions: csghub-{service}.

  • For example:

    • csghub-server
    • csghub-portal
    • csghub-runner
  • These names do not need to be explicitly configured in global.

  • To override, specify at the service level:

server:
objectStore:
bucket: "my-custom-bucket"

🔝 Configuration Priority

Configuration precedence:

PriorityLevelExample
🥇 1Serviceserver.objectStore.bucket
🥈 2Globalglobal.objectStore.external.endpoint

Service-level configuration always takes precedence over global settings.


🧠 Configuration Examples

1️⃣ PostgreSQL (Database)

global:
postgresql:
enabled: false
external:
host: "postgres.example.com"
port: 5432
user: "csghub"
password: "StrongPassword"
timezone: "Asia/Shanghai"
sslmode: "prefer"

## The following configurations are examples of the default database configurations for each resource. You can specify a new database name by modifying `database`.
casdoor:
postgresql:
database: "new_casdoor_database"

temporal:
postgresql:
database: "new_temporal_database"

server:
postgresql:
database: "new_server_database"

portal:
postgresql:
database: "new_portal_database"

dataflow:
postgresql:
database: "new_dataflow_database"

labelStudio:
postgresql:
database: "new_label_studio_database"

csgship:
web:
postgresql:
database: "new_csgship_database"

2️⃣ Redis (Cache)

global:
redis:
enabled: false
external:
host: "redis.example.com"
port: 6379
password: "RedisStrongPassword"

3️⃣ MinIO / S3 (Object Storage)

global:
objectStore:
enabled: false
external:
endpoint: "https://s3.amazonaws.com"
accessKey: "AKIAxxxx"
secretKey: "xxxx"
region: "us-east-1"
secure: "true"
pathStyle: "false"

## The following configurations are examples of default bucket configurations for each resource. You can specify a new bucket name by modifying `bucket`.
registry:
objectStore:
bucket: "new-registry-bucket"

server:
objectStore:
bucket: "new-server-bucket"

## In addition, another bucket, `{service}-public`, is needed here. It will be automatically named according to the service name; custom naming is not currently supported.
## Because this bucket needs to be publicly accessible, the `-public` flag is defined.
portal:
objectStore:
bucket: "new-portal-bucket"

runner:
objectStore:
bucket: "new-runner-bucket"

csgship:
billing:
objectStore:
bucket: "new-billing-bucket"

4️⃣ Registry (Image Repository)

global:
registry:
enabled: false
external:
registry: "registry.example.com"
repository: "csghub"
username: "user"
password: "pass"
insecure: "false"

5️⃣ Gitaly (Git Storage)

global:
gitaly:
enabled: false
external:
scheme: "tcp"
host: "gitaly.example.com"
port: 8075
token: "gitaly_token"
storage: "default"

6️⃣ Dataflow (Dataflow Service)

global:
dataflow:
enabled: false
external:
host: "dataflow.example.com"
port: 80

🧭 Summary

ComponentDisable MethodExternal Configuration PathDefault Naming
PostgreSQLglobal.postgresql.enabled=falseglobal.postgresql.externalcsghub_<service>
Redisglobal.redis.enabled=falseglobal.redis.external
MinIO / S3global.objectStore.enabled=falseglobal.objectStore.externalcsghub_<service>
Registryglobal.registry.enabled=falseglobal.registry.external
Gitalyglobal.gitaly.enabled=falseglobal.gitaly.external
Dataflowglobal.dataflow.enabled=falseglobal.dataflow.external