feat: Alpine ベースの Claude Code リモート実行 Helm チャート初版 (v2.1.259)
gateway(nginx) + manager(python 標準ライブラリ) + セッションごとの使い捨て Pod + reaper CronJob の構成。ブラウザ(PC/スマホ)からアクセスし、セッション単位で 独立した Alpine コンテナに Git リポジトリ(GitHub/Gitea など)をチェックアウトして 編集・検証・プッシュする。無操作が続いたセッションは Pod ごと自動破棄。 - セキュリティ: セッション NS 分離 / restricted PodSecurity / RBAC はセッション NS の pods,services のみの Role / セッション Pod は SA トークン非マウント・非 root・ readOnlyRootFilesystem・drop ALL caps・seccomp / NetworkPolicy で egress を DNS+HTTPS+SSH に限定 / Git ホスト allow-list / ResourceQuota+LimitRange - ライフサイクル: idleTimeout(Pod 内ウォッチドッグ + manager 回収) / maxLifetime (activeDeadlineSeconds) / maxSessions / 予備の孤児掃除 CronJob - 認証: token(既定) / basic / forward(外部SSO) / none。WebSocket は Cookie トークン - Claude 認証: ANTHROPIC_API_KEY または CLAUDE_CODE_OAUTH_TOKEN - CI: helm-release.yaml(未リリース版のみ tag+release+publish) / image-update-and-release.yaml(週次 npm 追従) / session-image.yaml(multi-arch build) - files/ 実体を .Files.Get で ConfigMap 化。helm lint / template 検証済み
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
claude-code ({{ .Chart.Version }}) をデプロイしました。
|
||||
|
||||
制御プレーン : {{ include "claude-code.fullname" . }} (namespace: {{ .Release.Namespace }})
|
||||
セッション NS : {{ include "claude-code.sessionsNamespace" . }}
|
||||
セッション像 : {{ .Values.image.session.registry }}/{{ .Values.image.session.repository }}:{{ .Values.image.session.tag }}
|
||||
認証モード : {{ .Values.auth.mode }}
|
||||
アイドル破棄 : {{ .Values.session.idleTimeoutSeconds }}s / 最大寿命 {{ .Values.session.maxLifetimeSeconds }}s / 同時 {{ .Values.session.maxSessions }}
|
||||
|
||||
アクセス方法:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
https://{{ .host }}/
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "claude-code.fullname" . }} 8080:{{ .Values.service.port }}
|
||||
→ http://localhost:8080/
|
||||
{{- end }}
|
||||
|
||||
{{- if eq .Values.auth.mode "token" }}
|
||||
|
||||
アクセストークンの取得:
|
||||
kubectl -n {{ .Release.Namespace }} get secret {{ include "claude-code.authSecretName" . }} \
|
||||
-o jsonpath='{.data.{{ .Values.auth.token.existingSecretKey | default "token" }}}' | base64 -d ; echo
|
||||
|
||||
UI の「アクセストークン」欄に貼り付けるか、`?token=<TOKEN>` を付けて開いてください。
|
||||
{{- else if eq .Values.auth.mode "basic" }}
|
||||
|
||||
Basic 認証のユーザーでログインしてください。
|
||||
{{- else if eq .Values.auth.mode "forward" }}
|
||||
|
||||
外部認証プロキシ({{ .Values.auth.forward.url }})経由でログインしてください。
|
||||
{{- else }}
|
||||
|
||||
⚠ auth.mode=none — 認証なしで公開されています。信頼済みネットワーク限定で使用してください。
|
||||
{{- end }}
|
||||
|
||||
{{- if and (not .Values.anthropic.existingSecret) (not .Values.anthropic.apiKey) (not .Values.anthropic.oauthToken) }}
|
||||
|
||||
⚠ Claude Code の認証情報が未設定です(anthropic.apiKey / oauthToken / existingSecret のいずれも空)。
|
||||
セッション内の `claude` は認証に失敗します。`--set anthropic.apiKey=...` で再適用してください。
|
||||
{{- end }}
|
||||
{{- if not .Values.git.identities }}
|
||||
|
||||
⚠ git.identities が未設定です。公開リポジトリの clone のみ可能です。
|
||||
GitHub / Gitea へ push するには values に SSH 鍵か HTTPS トークンを登録してください(README 参照)。
|
||||
{{- end }}
|
||||
|
||||
使い方:
|
||||
1. UI で「リポジトリ URL」「ブランチ」「認証 identity」を指定してセッション作成
|
||||
2. 一覧の「開く」でブラウザ内ターミナル(Claude Code)に接続
|
||||
3. セッション内で `claude-verify` / `claude-push` が利用可能
|
||||
4. 無操作 {{ .Values.session.idleTimeoutSeconds }}s でセッション(Pod)は自動破棄されます
|
||||
|
||||
許可された Git ホスト: {{ join ", " .Values.git.allowedHosts }}
|
||||
{{- if .Values.git.allowArbitraryRepos }}
|
||||
(allowArbitraryRepos=true のため任意ホストを許可)
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user