Skip to main content

CSGShip Deployment Guide

📘 Overview

CSGShip is the backend service of the smart coding assistant in the CSGHub platform, providing CodeSouler (IDE plugin) with capabilities such as intelligent code completion, semantic search, conversational programming, AI code generation, and knowledge retrieval.

This component is deployed as an independent service, can scale compute nodes individually, supports horizontal scaling, and works in coordination with the main service (CSGHUB Server).


⚙️ System Requirements

ResourceMinimumRecommended
CPU / Memory4C / 8 GB8C / 16 GB
Disk Space10 GB50 GB+
Supported ArchitecturesAMD64 / ARM64Multi-architecture deployment

Software Dependencies

ComponentVersionNotes
Kubernetes1.28+Cluster environment
Helm3.12+Chart management tool
PostgreSQL / RedisOptionalExternal managed services can be used

🧩 Installation Steps

1️⃣ Add Helm Repository

helm repo add csghub https://charts.opencsg.com/repository/csghub
helm repo update

2️⃣ Create Namespace (Optional)

kubectl create namespace csghub

3️⃣ Install CSGShip

Obtain the following information from the CSGHub main service:

  • domain

    Provide a subdomain to expose the runner service.

    If your domain is example.com, the service will be exposed at runner.example.com.

  • externalUrl

    helm get notes csghub -n csghub | grep -A 6 'Access your CSGHub'

​ Retrieves the external URL of CSGHub.

  • hubAPIToken

    kubectl get cm csghub-core -o yaml -n csghub | grep 'API_TOKEN' | awk '{print $NF}'
  • nats credentials

    kubectl get secret -n csghub csghub-nats \
    -o jsonpath='{.data.NATS_USERNAME}' | base64 -d && \
    echo -n " / " && \
    kubectl get secret -n csghub csghub-nats \
    -o jsonpath='{.data.NATS_PASSWORD}' | base64 -d
    • The above command outputs user and password.
    • host currently only supports the service name (i.e., deployed in the same cluster as CSGHub).
    • port is fixed at 4222.

    Example installation command:

    helm install csgship csghub/csgship \
    --namespace csghub \
    --create-namespace \
    --set global.ingress.domain="example.com" \
    --set externalUrl="<csghub externalUrl>" \
    --set hubAPIToken="<csghub hub_api_token>" \
    --set billing.nats.host="<csghub nats service>" \
    --set billing.nats.port=4222 \
    --set billing.nats.user="<csghub nats username>" \
    --set billing.nats.password="<csghub nats password>"

💡 Tip: Place custom configuration (domain, image versions, database addresses, etc.) in a custom-values.yaml file for easier upgrades and rollback.

Access URLs Example

ServiceURLNotes
CSGShip Frontendhttp://csgship.example.comOAuth configuration required (see below)
CSGShip APIhttp://csgship-api.example.com

⚙️ Values.yaml Configuration Reference

🌍 Global Settings (global)

ParameterDefaultDescription
global.editioneeEdition type: ce (Community) / ee (Enterprise)
global.image.tagv1.12.0Default image tag
global.ingress.domainexample.comDomain for platform access
global.ingress.tls.enabledfalseEnable HTTPS / TLS
global.persistence.size10GiDefault persistent volume size
global.postgresql.enabledtrueEnable built-in PostgreSQL
global.redis.enabledtrueEnable built-in Redis
global.chartContext.isBuiltInfalseWhether deployed as subchart

🚢 CSGShip Service Settings

ParameterDefaultDescription
externalUrlhttps://csghub.example.comURL of the CSGHub main service
image.repositoryopencsghq/csgshipMain image repository
image.tagv1.12.0Image version
image.pullPolicyIfNotPresentImage pull policy

🔐 OAuth Login Configuration

CSGShip supports GitLab OAuth login. Set in values.yaml or via command line:

web:
oauth:
issuer: "https://gitlab.example.com"
clientId: "<your-client-id>"
clientSecret: "<your-client-secret>"

🗄️ Data Storage Configuration

PostgreSQL

ParameterDefaultDescription
global.postgresql.enabledtrueEnable built-in database
global.postgresql.external.hostN/AExternal DB host address
global.postgresql.external.port5432External DB port
global.postgresql.external.usercsghubUsername
global.postgresql.external.password“”Password
global.postgresql.external.sslmodepreferSSL mode

Example for production with external DB:

global:
postgresql:
enabled: false
external:
host: "pg.example.com"
port: 5432
user: "csghub"
password: "StrongPassword"

Redis

ParameterDefaultDescription
global.redis.enabledtrueEnable built-in Redis
global.redis.external.hostN/AExternal Redis host
global.redis.external.port6379External Redis port
global.redis.external.password“”External Redis password

Example external Redis configuration:

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

🚀 Verify Deployment

Check Pod status:

kubectl get pods -n csghub

Check service endpoints:

kubectl get svc -n csghub

🔄 Upgrade and Uninstall

Upgrade

helm upgrade csgship csghub/csgship -n csghub -f custom-values.yaml

Uninstall

helm uninstall csgship -n csghub

🧭 Common Issues

IssueCauseSolution
Cannot connect to main serviceIncorrect externalUrl configurationCheck domain and protocol (HTTPS required)
Startup failureDatabase or cache misconfigurationVerify PostgreSQL / Redis host and password
Image pull failurePrivate registry authentication issueConfigure image.pullSecrets

📘 Production Recommendations

  1. Use external PostgreSQL and Redis to reduce local state dependency.
  2. Enable TLS / HTTPS access to enhance communication security.
  3. Set appropriate resources.requests and limits to prevent node resource contention.