Skip to main content
Version: Next

Configuration

This guide covers how to configure Bison for your specific environment and requirements.

Helm Chart Configuration

Bison is configured primarily through Helm values. You can customize the installation by providing a values.yaml file or using --set flags.

Key Configuration Parameters

ParameterDescriptionDefaultExample
auth.enabledEnable authenticationfalsetrue
auth.admin.usernameAdmin usernameadminadmin
auth.admin.passwordAdmin passwordadminchangeme
apiServer.replicaCountAPI server replicas23
apiServer.image.repositoryAPI server imageghcr.io/supermarioyl/bison/api-server-
apiServer.image.tagAPI server image tag0.0.1latest
webUI.replicaCountWeb UI replicas23
webUI.image.repositoryWeb UI imageghcr.io/supermarioyl/bison/web-ui-
webUI.image.tagWeb UI image tag0.0.1latest
opencost.urlOpenCost API endpointhttp://opencost.opencost-system.svc:9003Custom URL

Example Custom Values

Create a custom-values.yaml file:

# Authentication
auth:
enabled: true
admin:
username: admin
password: MySecurePassword123

# API Server
apiServer:
replicaCount: 3
image:
tag: 0.0.1
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 1000m
memory: 512Mi

# Web UI
webUI:
replicaCount: 3
image:
tag: 0.0.1
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi

# OpenCost Integration
opencost:
url: http://opencost.opencost-system.svc:9003

# Node Selection (optional)
nodeSelector:
node-role.kubernetes.io/control-plane: ""

# Tolerations (optional)
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule

Install with custom values:

helm install bison bison/bison \
--namespace bison-system \
--create-namespace \
--values custom-values.yaml

Billing Configuration

Billing settings are configured through the Web UI or API after installation.

Access Billing Configuration

  1. Via Web UI:

    • Navigate to Settings > Billing Configuration
    • Set pricing for CPU, Memory, GPU, and other resources
    • Configure currency and billing intervals
  2. Via API:

    curl -X POST http://localhost:8080/api/v1/billing/config \
    -H "Content-Type: application/json" \
    -d '{
    "enabled": true,
    "currency": "USD",
    "pricing": {
    "cpu": 0.05,
    "memory": 0.01,
    "nvidia.com/gpu": 2.50
    },
    "billingInterval": "hourly"
    }'

Billing Parameters

ParameterDescriptionExample
enabledEnable/disable billingtrue
currencyCurrency for billingUSD, CNY, EUR
pricing.cpuCPU price per core-hour0.05
pricing.memoryMemory price per GB-hour0.01
pricing["nvidia.com/gpu"]GPU price per GPU-hour2.50
billingIntervalBilling aggregation periodhourly, daily
lowBalanceThresholdWarning threshold (%)20
suspendThresholdAuto-suspend threshold (%)5

Example Billing Configuration

{
"enabled": true,
"currency": "USD",
"pricing": {
"cpu": 0.05,
"memory": 0.01,
"nvidia.com/gpu": 2.50,
"nvidia.com/mig-1g.5gb": 0.50,
"nvidia.com/mig-2g.10gb": 1.00
},
"billingInterval": "hourly",
"lowBalanceThreshold": 20,
"suspendThreshold": 5,
"alertChannels": ["webhook", "dingtalk"]
}

Team Configuration

Creating Teams

Teams can be created through the Web UI or API:

Via Web UI:

  1. Navigate to Teams page
  2. Click Create Team
  3. Set team name, quota, and initial balance

Via API:

curl -X POST http://localhost:8080/api/v1/teams \
-H "Content-Type: application/json" \
-d '{
"name": "ml-team",
"description": "Machine Learning Team",
"quota": {
"cpu": "20",
"memory": "64Gi",
"nvidia.com/gpu": "4"
},
"balance": 1000.00
}'

Team Quotas

Team quotas define resource limits:

quota:
cpu: "20" # 20 CPU cores
memory: "64Gi" # 64 GB RAM
nvidia.com/gpu: "4" # 4 GPUs
storage: "500Gi" # 500 GB storage

Team Balance Management

Set initial balance and configure auto-recharge:

{
"balance": 1000.00,
"autoRecharge": {
"enabled": true,
"amount": 500.00,
"schedule": "monthly",
"threshold": 100.00
}
}

Alert Configuration

Configure multi-channel alerts for low balance and quota warnings.

Webhook Alerts

{
"type": "webhook",
"enabled": true,
"url": "https://your-webhook-endpoint.com/alerts",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
},
"template": {
"title": "Bison Alert",
"message": "Team {{.TeamName}} balance is {{.Balance}}"
}
}

DingTalk Alerts

{
"type": "dingtalk",
"enabled": true,
"webhook": "https://oapi.dingtalk.com/robot/send?access_token=YOUR_TOKEN",
"secret": "YOUR_SECRET"
}

WeChat Work Alerts

{
"type": "wechat",
"enabled": true,
"corpid": "YOUR_CORP_ID",
"corpsecret": "YOUR_CORP_SECRET",
"agentid": 1000001
}

OpenCost Integration

Configure OpenCost connection:

Check OpenCost Connectivity

# Test OpenCost API
kubectl port-forward -n opencost-system svc/opencost 9003:9003
curl http://localhost:9003/healthz

# Test allocation API
curl http://localhost:9003/allocation/compute?window=1d

Update OpenCost URL

If OpenCost is deployed in a different namespace or with a different service name:

helm upgrade bison bison/bison \
--set opencost.url=http://my-opencost.custom-namespace.svc:9003 \
--namespace bison-system

Authentication & OIDC

Enable authentication and integrate with your SSO provider:

Basic Authentication

auth:
enabled: true
admin:
username: admin
password: SecurePassword123

OIDC Integration

auth:
enabled: true
oidc:
enabled: true
issuerURL: https://your-oidc-provider.com
clientID: bison-client-id
clientSecret: your-client-secret
redirectURL: https://bison.example.com/callback

Environment Variables

Additional configuration can be provided via environment variables:

VariableDescriptionDefault
KUBECONFIGPath to kubeconfig fileIn-cluster config
OPENCOST_URLOpenCost API URLhttp://opencost.opencost-system.svc:9003
AUTH_ENABLEDEnable authenticationfalse
LOG_LEVELLogging levelinfo
BILLING_INTERVALBilling calculation interval10m

Set environment variables in Helm values:

apiServer:
env:
- name: LOG_LEVEL
value: debug
- name: BILLING_INTERVAL
value: 5m

Advanced Configuration

Custom Resource Pricing

Price any Kubernetes resource:

{
"pricing": {
"cpu": 0.05,
"memory": 0.01,
"nvidia.com/gpu": 2.50,
"amd.com/gpu": 2.00,
"ephemeral-storage": 0.001,
"custom.io/fpga": 5.00
}
}

Multi-Cluster Support

Deploy Bison in each cluster with shared billing:

# Cluster A
apiServer:
clusterName: prod-us-west

# Cluster B
apiServer:
clusterName: prod-us-east

Next Steps