Files
claude-code/examples/loadbalancer-oauth.values.yaml
T
claude cd7092be17
Helm Chart Release / release-chart (push) Successful in 7s
Build Session Image / build-push (push) Successful in 2m3s
feat: Service を LoadBalancer 対応にしローカル LB の IP で管理画面へアクセス可能に (v2.1.263-a)
- templates/service.yaml: service.type 既定を LoadBalancer に。annotations
  (kube-vip の VIP 指定等) / loadBalancerIP / loadBalancerClass /
  loadBalancerSourceRanges / externalTrafficPolicy / nodePort / labels を追加。
  Ingress 機能は変更なし(LoadBalancer と併用可)
- values.yaml / values.schema.json: service ブロックを拡張
- templates/NOTES.txt: LoadBalancer の EXTERNAL-IP 案内を追加
- examples/loadbalancer-oauth.values.yaml: Ingress 無効 + LB + source range 制限 +
  サブスクリプション認証 (authMode: oauth) の構成例を追加
- README: 「Claude 認証(API 課金なし / サブスクリプション)」「管理画面への
  アクセス(LoadBalancer / Ingress)」セクションを追加。claude setup-token →
  anthropic.authMode: oauth(CLAUDE_CODE_OAUTH_TOKEN 注入)でローカル実行と同一挙動
- helm lint / template 検証済み
2026-09-08 14:01:34 +09:00

64 lines
2.4 KiB
YAML

# ローカルネットワーク限定の LoadBalancer で公開し、Claude のサブスクリプション
# (API 課金なし)で動かす構成。Ingress は張らない。
#
# 前提:
# - クラスタに LB 実装(kube-vip / MetalLB / Cilium LB-IPAM 等)がある
# - ローカルで `claude setup-token` を実行して長期 OAuth トークンを発行済み
#
# 実行例:
# helm upgrade --install claude-code cafepieters/claude-code \
# -n claude-code --create-namespace \
# -f examples/loadbalancer-oauth.values.yaml \
# --set anthropic.oauthToken="$(cat ~/.claude/oauth-token.txt)" \
# --set-file git.identities.gitea-ssh.sshPrivateKey=P:/Claude/.ssh/id_claude \
# --set-file git.identities.gitea-ssh.knownHosts=./known_hosts.gitea
# ---- Claude 認証: API を使わずサブスクリプション(Pro / Max)で動かす ----
anthropic:
authMode: oauth # ANTHROPIC_API_KEY ではなく CLAUDE_CODE_OAUTH_TOKEN を使う
# oauthToken は --set / --set-file / existingSecret で注入する(平文で書かない)
# ---- 管理画面はローカル LB の IP でアクセス(Ingress なし)----
ingress:
enabled: false
service:
type: LoadBalancer
port: 80
annotations:
# kube-vip で払い出す VIP を固定(この 192.168.9.x は空いているものを指定)
kube-vip.io/loadbalancerIPs: "192.168.9.50"
kube-vip.io/vipHost: "cpi11"
# 接続元をローカルセグメントに限定(Ingress を張らない構成での第一の防御線)
loadBalancerSourceRanges:
- 192.168.9.0/24
externalTrafficPolicy: Local # 実クライアント IP を保持(LB 実装が対応する場合)
# ---- ブラウザアクセスの認証: トークン(自動生成)----
auth:
mode: token
# token.value を空にすると install 時に自動生成される。
# 取得: kubectl -n claude-code get secret claude-code-auth -o jsonpath='{.data.token}' | base64 -d
# ---- Git 接続先 ----
git:
allowedHosts:
- github.com
- 192.168.9.65
- git.cafepieters.com
identities:
gitea-ssh:
type: ssh
# sshPrivateKey / knownHosts は --set-file で注入
# github-https:
# type: https-token
# username: "x-access-token"
session:
autoStartClaude: true
idleTimeoutSeconds: 1800
maxSessions: 5
# verifyCommand: "npm test"
# autoPush:
# enabled: true