> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 2. Namespace とシークレットの作成

> Ayakaleaf Pro に必要な Namespace とシークレットを作成します。

すべてのリソースは Namespace `overleaf` に配置します。

```bash theme={null}
kubectl create namespace overleaf
```

Ayakaleaf Pro はシークレットを環境変数から読み取ります。一度生成して Secret に保存します。

```bash wrap theme={null}
HISTORY=$(openssl rand -hex 32)
kubectl -n overleaf create secret generic overleaf-secrets \
  --from-literal=OVERLEAF_INVITE_TOKEN_SECRET="$(openssl rand -base64 32)" \
  --from-literal=OVERLEAF_SESSION_SECRET="$(openssl rand -hex 32)" \
  --from-literal=WEB_API_PASSWORD="$(openssl rand -hex 32)" \
  --from-literal=STAGING_PASSWORD="$HISTORY" \
  --from-literal=V1_HISTORY_PASSWORD="$HISTORY" \
  --from-literal=CRYPTO_RANDOM="$(openssl rand -hex 32)" \
  --from-literal=OT_JWT_AUTH_KEY="$(openssl rand -hex 32)"
```

| シークレット | 理由 |
| - | - |
| `OVERLEAF_INVITE_TOKEN_SECRET` | 必須。ない場合、Pod は "Missing required secrets" で停止します。変更すると、保留中のプロジェクト招待が無効になります。 |
| `OVERLEAF_SESSION_SECRET` | セッション Cookie に署名します。ない場合、Pod を再起動するたびに全員がログアウトされます。 |
| `WEB_API_PASSWORD`、`CRYPTO_RANDOM`、`OT_JWT_AUTH_KEY` | 内部シークレット。ない場合、コンテナは起動のたびに生成します。レプリカが複数ある場合は、すべてのレプリカで共有する必要があります。 |
| `STAGING_PASSWORD` と `V1_HISTORY_PASSWORD` | 内部の履歴用シークレット。両方とも**同じ**値である必要があります。 |

> [!WARNING]
>
> データと一緒に Secret（`kubectl -n overleaf get secret overleaf-secrets -o yaml`）もバックアップしてください。MongoDB 内のトークンを暗号化する機能では、それぞれの暗号化パスワードもこの Secret に必要です。たとえば [GitHub 同期](https://ayakaleaf-pro.mintlify.site/ja/on-premises/configuration/overleaf-toolkit/integrations/github-synchronisation.md)の `GITHUB_TOKEN_CIPHER_PASSWORD` です。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.