CSGShip
1. Overview
CSGShip is the Intelligent Coding Assistant backend service of the CSGHub platform. It provides core capabilities for CodeSouler (IDE plugin), including intelligent code completion, semantic search, conversational programming, AI code generation, and knowledge retrieval.
Deployed as a standalone service, CSGShip supports independent scaling of compute nodes and horizontal scaling of multiple instances. It is designed to work seamlessly with the main service (CSGHub Server).
2. Environment Requirements
| Resource Item | Minimum Configuration | Recommended Configuration |
|---|---|---|
| CPU / Memory | 4C / 8 GB | 8C / 16 GB |
| Disk Space | 10 GB | 50 GB+ |
| Architecture | AMD64 / ARM64 | Multi-arch support |
Software Dependencies
| Component | Version Requirement | Description |
|---|---|---|
| Kubernetes | 1.28+ | Cluster environment |
| Helm | 3.12+ | Chart management tool |
| PostgreSQL / Redis | Optional (External) | External managed resources are supported |
3. Installation
3.1 Add Helm Repository
helm repo add csghub https://charts.opencsg.com/csghub
helm repo update
3.2 Create Namespace (Optional)
kubectl create namespace csghub
3.3 Install CSGShip
Obtain the following information from your CSGHub main service:
-
domain: Provide a second-level domain. For example, if you provide
example.com, the services will be exposed atcsgship.example.comandcsgship-api.example.com. -
externalUrl: Run the following to find the CSGHub URL:
helm get notes csghub -n csghub | grep -A 6 'Access your CSGHub' -
hubAPIToken:
kubectl get cm csghub-core -o yaml -n csghub | grep 'API_TOKEN' | awk '{print $NF}' -
NATS Credentials:
# Get NATS Username and Password
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 -dNote: Currently only service names are supported for
host(same-cluster deployment).💡 Tip for China-based deployments:
Add the following flags to speed up image pulls:
--set global.image.registry="opencsg-registry.cn-beijing.cr.aliyuncs.com"--set global.imageRegistry="opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsghq"
Execution Command:
helm install csgship csghub/csgship \
--namespace csghub \
--create-namespace \
--set global.gateway.external.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>"
3.4 Access Paths
| Service URL | Description |
|---|---|
| http://csgship.example.com | CSGShip Frontend (requires --set web.oauth) |
| http://csgship-api.example.com | CSGShip API Endpoint |
4. Configuration Parameters
4.1 Global Configuration
| Parameter | Default | Description |
|---|---|---|
global.edition | ee | Edition: ce (Community) / ee (Enterprise) |
global.gateway.external.domain | example.com | Primary access domain |
global.gateway.tls.enabled | false | Enable HTTPS / TLS |
global.persistence.size | 10Gi | Default PV size |
global.postgresql.enabled | true | Use built-in PostgreSQL |
global.redis.enabled | true | Use built-in Redis |
4.2 OAuth Configuration
CSGShip supports GitLab OAuth. Set these in your values.yaml:
web:
oauth:
issuer: "https://gitlab.example.com"
clientId: "<your-client-id>"
clientSecret: "<your-client-secret>"
4.3 External Database (Production Mode)
global:
postgresql:
enabled: false
external:
host: "pg.example.com"
port: 5432
user: "csghub"
password: "StrongPassword"
5. Verification
# Check Pod status
kubectl get pods -n csghub
# Check Service addresses
kubectl get svc -n csghub
6. Upgrade & Uninstallation
6.1 Upgrade
Use the helm upgrade command with the same parameters used during installation to update to the latest version.
6.2 Uninstallation
helm uninstall csgship -n csghub
7. Troubleshooting
- Cannot connect to main service: Check if
externalUrlprotocol (HTTP vs HTTPS) matches the actual CSGHub deployment. - Startup failure: Check logs for PostgreSQL or Redis connection errors.
- Image pull failure: Ensure
image.pullSecretsare configured if using a private registry.
8. Production Recommendations
- External DB/Cache: Use managed PostgreSQL and Redis for better state management.
- Enable TLS: Always use HTTPS for production communication.
- Resource Limits: Set explicit
resources.requestsandlimitsto prevent resource contention.