> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sambanova.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SambaStack.yaml リファレンス

> このファイルでは、ingress 設定、TLS 設定、高可用性パラメータを定義します。

**オンプレミス**

```yaml theme={}
gateway:
  replicas: 3
  auth:
    enabled: true
    secretName: <oidc-auth secret name>
  ingress:
    hosts:
      - host: <api url>
        tlsSecretName: <k8s api secret name>
    annotations:
      nginx.ingress.kubernetes.io/backend-protocol: HTTP
      nginx.ingress.kubernetes.io/force-ssl-redirect: 'true'
      nginx.ingress.kubernetes.io/proxy-read-timeout: '600'
      nginx.ingress.kubernetes.io/proxy-body-size: 25m
      nginx.ingress.kubernetes.io/enable-cors: 'true'
      nginx.ingress.kubernetes.io/configuration-snippet: |
        proxy_set_header Authorization $http_authorization;
        limit_req zone=240_req_min_header burst=360 nodelay;
        limit_req_status 429;

cloud-ui:
  ingress:
    hosts:
      - host: <ui url>
        tlsSecretName: <k8s api secret name>
    annotations:
      nginx.ingress.kubernetes.io/backend-protocol: HTTP
      nginx.ingress.kubernetes.io/force-ssl-redirect: 'true'
      nginx.ingress.kubernetes.io/proxy-body-size: 21m
      nginx.ingress.kubernetes.io/configuration-snippet: |
        proxy_set_header Authorization $http_authorization;
        limit_req zone=120_req_min_ip burst=240 nodelay;
        limit_req_status 429;

db-admin:
  admins:
  - temp-admin@cluster.local
  - example@example.com                # Email of lasting admin account

auth-and-billing:
  pgSecretName: pg-credentials         # Only needed with a custom external postgres DB

cloudnative-pg:
  enabled: false                       # Only needed with a custom external postgres DB

bundles:
  bundleSpecs:
    - name: gpt-oss-120b-8-32-64-128k
  bundleDeploymentSpecs:
    - name: gpt-oss-120b-8-32-64-128k
      groups:
        - name: default
          minReplicas: 1
          qosList:
            - web
            - free

serviceTiers:
  <Tier1>:                              # Custom service tier name
    - models:
        - gpt-oss-120b-8-32-64-128k
      queueDepth: 25                    # Queries to queue before returning busy
      qos: "free"                       # Usually matches service tier name
      rates:
        - allowedRequests: 50
          periodSeconds: 60
  <Tier2>:                              # Tier that inherits from another
    inherits: <Tier1>
    overrides:
      - models:
          - gpt-oss-120b-8-32-64-128k
        queueDepth: 25
        qos: "free"
        rates:
          - allowedRequests: 100
            periodSeconds: 60

global:
  substitutions:                        # Only needed for NFS or air-gapped customers
    gs://<SAMBASTACK_ARTIFACTS_BUCKET>: nfs:///nfsdata

  extraEnv:								# This sets the node memory limit to 4TB
    - name: "DDR_PER_RDU_GB"
      value: "256"
```

> [!NOTE]
>
> このリファレンスでは、例として `gpt-oss-120b-8-32-64-128k` をモデルバンドルに使用しています。実際には、任意のモデルバンドルを使用できます。

**ホステッド**

```yaml theme={}
apiVersion: v1
kind: ConfigMap
metadata:
  annotations:
    serial: "1"
  name: sambastack
  labels:
    sambastack-installer: "true"
data:
  sambastack.yaml: |
    version: <latest sambastack version>

# API Configuration
    gateway:
      ingress:
        hosts:
          - host: api.example.com
            tlsSecretName: <name-for-tls>

# UI Configuration
    cloud-ui:
      ingress:
        hosts:
        - host: ui.example.com
          tlsSecretName: <name-for-tls>

# Auth and Billing Configuration
    auth-and-billing:
      pgSecretName: pg-credentials        # Kubernetes secret with PostgreSQL credentials

# Database Configuration
    cloudnative-pg:
      enabled: false                      # Disable in-cluster PostgreSQL

# Model Bundle(s) Configuration
    bundles:
      bundleSpecs:
      - name: gpt-oss-120b-8-32-64-128k
      bundleDeploymentSpecs:
      - name: gpt-oss-120b-8-32-64-128k
        groups:
        - name: "default"
          minReplicas: 1
          qosList:
          - "web"
          - "free"
```

> [!NOTE]
>
> 最新の SambaStack バージョンについては、SambaStack の担当者にお問い合わせください。

## **設定パラメータ**

### **gateway**

| **パラメータ** | **型** | **説明** |
| :- | :- | :- |
| `gateway.replicas` | integer | 高可用性のための API ゲートウェイのレプリカ数 |
| `gateway.auth.enabled` | boolean | 組み込みの OIDC 連携を有効化します |
| `gateway.auth.secretName` | string | OIDC 認証情報を含む Kubernetes Secret の名前。デフォルトの認証モードでは空のままにします |
| `gateway.ingress.hosts[].host` | string | API の FQDN (例: `api.example.com`) |
| `gateway.ingress.hosts[].tlsSecretName` | string | API ホスト用の Kubernetes TLS Secret 名 |

### **cloud-ui (Web UI)**

| **パラメータ** | **型** | **説明** |
| :- | :- | :- |
| `cloud-ui.replicas` | integer | 高可用性のための UI のレプリカ数 |
| `cloud-ui.ingress.hosts[].host` | string | UI の FQDN (例: `ui.example.com`) |
| `cloud-ui.ingress.hosts[].tlsSecretName` | string | UI ホスト用の Kubernetes TLS Secret 名 |

### **db-admin**

| **パラメータ** | **型** | **説明** |
| :- | :- | :- |
| `db-admin.admins` | list | Admin UI にアクセスできるユーザーのメールアドレス |

### **auth-and-billing**

| **パラメータ** | **型** | **説明** |
| :- | :- | :- |
| `auth-and-billing.replicas` | integer | コアコントロールプレーンサービスのスケーリング |
| `auth-and-billing.pgSecretName` | string | 外部 PostgreSQL の接続情報 (`DB_HOST`、`DB_DATABASE`、`DB_USER`、`DB_PASSWD`) を base64 エンコードされたデータフィールドとして含む Kubernetes Secret の名前。外部 PostgreSQL を使用する場合に必須 |

### **cloudnative-pg**

| **パラメータ** | **型** | **説明** |
| :- | :- | :- |
| `cloudnative-pg.enabled` | boolean | `true` = クラスター内に PostgreSQL をデプロイ。`false` = `auth-and-billing.pgSecretName` を介して外部 PostgreSQL を使用 |

### **bundles**

| **パラメータ** | **型** | **説明** |
| :- | :- | :- |
| `bundles.bundleSpecs[]` | list | バンドル (モデルアセット) を名前で宣言します |
| `bundles.bundleDeploymentSpecs[]` | list | 宣言したバンドルをデプロイします |
| `bundleDeploymentSpecs[].name` | string | 宣言済みの `bundleSpecs.name` と一致させる必要があります |
| `bundleDeploymentSpecs[].groups[].name` | string | ルーティング/キャパシティグループ名 |
| `bundleDeploymentSpecs[].groups[].minReplicas` | integer | グループの最小エンジン数 |
| `bundleDeploymentSpecs[].groups[].qosList[]` | list | QoS タグ (例: `web`、`free`、`pro`) |

QoS タグの詳細は、[サービスティア](https://docs.sambanova.ai/docs/ja/v1.2.0/sambastack/service-administration/platform-admin/usergroup-management.md#サービスティア) をご参照ください。
