feat: credentials 認証モードとトークン自動リフレッシュ CronJob を追加 (v2.1.263-b)
Helm Chart Release / release-chart (push) Successful in 9s
Build Session Image / build-push (push) Successful in 2m8s

トークンが定期的に失効・ローテーションしても再デプロイ不要にする。

- anthropic.authMode: credentials(新既定)
  ~/.claude/.credentials.json 全体(refreshToken 込み)を Secret に格納。
  セッション Pod にはファイルとしてマウントし $HOME/.claude へコピー(書き込み可)、
  セッション内 claude が refreshToken で自己更新
- anthropic.refresher CronJob(credentials 時・既定有効, files/token-refresher.py)
  Secret 内 refreshToken で OAuth トークンを更新し Secret を書き戻す。
  専用 SA + resourceNames 限定 Role で該当 Secret の get/patch のみ。
  tokenUrl/clientId は Claude Code CLI の非公式値(values 上書き可)
- manager.py build_pod: credentials は envFrom を使わずファイルマウント +
  SEED_CREDENTIALS_FILE。apiKey/oauth は従来どおり envFrom
- Secret に helm.sh/resource-policy: keep(credentials 時)で refresher の書込を保持
- fix: values.schema.json の $schema 行を削除(一部の Helm で
  "no schema with key or ref https://json-schema.org/draft-07/schema#" エラー)
- helm lint / template(credentials/apiKey/oauth)検証済み
This commit is contained in:
2026-09-08 15:18:21 +09:00
parent cd7092be17
commit 528a48b667
15 changed files with 503 additions and 46 deletions
+16 -3
View File
@@ -1,5 +1,4 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "claude-code Helm chart values",
"type": "object",
"additionalProperties": true,
@@ -109,13 +108,27 @@
"additionalProperties": false,
"required": ["authMode"],
"properties": {
"authMode": { "type": "string", "enum": ["apiKey", "oauth"] },
"authMode": { "type": "string", "enum": ["apiKey", "oauth", "credentials"] },
"apiKey": { "type": "string" },
"oauthToken": { "type": "string" },
"credentialsJson": { "type": "string" },
"existingSecret": { "type": "string" },
"existingSecretKeyApiKey": { "type": "string" },
"existingSecretKeyOauthToken": { "type": "string" },
"extraEnv": { "type": "object" }
"existingSecretKeyCredentials": { "type": "string" },
"extraEnv": { "type": "object" },
"refresher": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean" },
"schedule": { "type": "string" },
"refreshIfExpiresInSeconds": { "type": "integer", "minimum": 60 },
"tokenUrl": { "type": "string" },
"clientId": { "type": "string" },
"resources": { "type": "object" }
}
}
}
},