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,41 @@
|
||||
# 外部 SSO(oauth2-proxy)へ認証を委譲する構成。
|
||||
# ブラウザ → Ingress → (oauth2-proxy) → claude-code gateway。
|
||||
# gateway 自身も auth_request で二重チェックする。
|
||||
#
|
||||
# 前提: auth ネームスペースに oauth2-proxy がデプロイ済みで、
|
||||
# http://oauth2-proxy.auth.svc.cluster.local:4180/oauth2/auth が使えること。
|
||||
|
||||
auth:
|
||||
mode: forward
|
||||
forward:
|
||||
url: "http://oauth2-proxy.auth.svc.cluster.local:4180/oauth2/auth"
|
||||
signInUrl: "https://auth.example.com/oauth2/start?rd=$escaped_request_uri"
|
||||
|
||||
anthropic:
|
||||
authMode: oauth # `claude setup-token` で発行したトークンを使う
|
||||
# oauthToken は --set / existingSecret で注入
|
||||
|
||||
git:
|
||||
allowedHosts:
|
||||
- github.com
|
||||
- git.cafepieters.com
|
||||
|
||||
session:
|
||||
maxSessions: 15
|
||||
idleTimeoutSeconds: 3600
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/auth-url: "https://auth.example.com/oauth2/auth"
|
||||
nginx.ingress.kubernetes.io/auth-signin: "https://auth.example.com/oauth2/start?rd=$escaped_request_uri"
|
||||
hosts:
|
||||
- host: claude-code.example.com
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- secretName: claude-code-tls
|
||||
hosts:
|
||||
- claude-code.example.com
|
||||
Reference in New Issue
Block a user