feat: credentials 認証モードとトークン自動リフレッシュ CronJob を追加 (v2.1.263-b)
トークンが定期的に失効・ローテーションしても再デプロイ不要にする。 - 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:
+9
-3
@@ -42,10 +42,16 @@ Basic 認証のユーザーでログインしてください。
|
||||
⚠ auth.mode=none — 認証なしで公開されています。信頼済みネットワーク限定で使用してください。
|
||||
{{- end }}
|
||||
|
||||
{{- if and (not .Values.anthropic.existingSecret) (not .Values.anthropic.apiKey) (not .Values.anthropic.oauthToken) }}
|
||||
認証方式 : anthropic.authMode = {{ .Values.anthropic.authMode }}
|
||||
{{- if and (eq .Values.anthropic.authMode "credentials") .Values.anthropic.refresher.enabled }}
|
||||
トークン更新: refresher CronJob({{ .Values.anthropic.refresher.schedule }})が Secret を自動更新
|
||||
{{- end }}
|
||||
{{- if and (not .Values.anthropic.existingSecret) (not .Values.anthropic.apiKey) (not .Values.anthropic.oauthToken) (not .Values.anthropic.credentialsJson) }}
|
||||
|
||||
⚠ Claude Code の認証情報が未設定です(anthropic.apiKey / oauthToken / existingSecret のいずれも空)。
|
||||
セッション内の `claude` は認証に失敗します。`--set anthropic.apiKey=...` で再適用してください。
|
||||
⚠ Claude Code の認証情報が未設定です(anthropic.apiKey / oauthToken / credentialsJson / existingSecret のいずれも空)。
|
||||
セッション内の `claude` は認証に失敗します。credentials モードなら:
|
||||
--set-file anthropic.credentialsJson=$HOME/.claude/.credentials.json
|
||||
で再適用してください(helm upgrade)。
|
||||
{{- end }}
|
||||
{{- if not .Values.git.identities }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user