Files
claude c31dd5875c
Helm Chart Release / release-chart (push) Successful in 7s
Build Session Image / build-push (push) Successful in 2m5s
feat: git identity を Web UI から登録・削除できるようにする (v2.1.263-f)
helm --set-file ではなく UI から SSH 秘密鍵 + known_hosts / HTTPS トークンを登録可能に。

- git.guiIdentities.enabled(既定 true)。UI に「認証情報」カード(一覧/追加/削除)
- GET/POST/DELETE /api/identities。登録分はセッション NS の Secret
  (ラベル identity-source=gui / identity-type)として保存。Helm 管理分と同一覧に統合
- manager.py: resolve_identity / list_identities / create_gui_identity / delete_gui_identity。
  build_pod と create_session は Helm 管理 + GUI 登録の両方を解決。
  /api/config の identities を {name,type,source} 配列に変更
- rbac.yaml: guiIdentities.enabled 時のみ manager Role に同 NS secrets の CRUD を付与
- 秘密鍵はリクエストボディで manager へ届くため README に経路 TLS 必須を明記
- helm lint / template 検証済み
2026-09-09 12:47:50 +09:00

33 lines
1.5 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{- $ctx := . -}}
{{- $sessNs := include "claude-code.sessionsNamespace" . -}}
{{- range $name, $id := .Values.git.identities }}
{{- if not $id.existingSecret }}
---
# Git アイデンティティ "{{ $name }}"(type: {{ $id.type }})
apiVersion: v1
kind: Secret
metadata:
name: {{ include "claude-code.fullname" $ctx }}-git-{{ $name }}
namespace: {{ $sessNs }}
labels:
{{- include "claude-code.labels" $ctx | nindent 4 }}
claude-code.cafepieters.com/git-identity: {{ $name | quote }}
claude-code.cafepieters.com/identity-source: helm
claude-code.cafepieters.com/identity-type: {{ $id.type }}
type: Opaque
stringData:
{{- if eq $id.type "ssh" }}
{{- if not $id.sshPrivateKey }}{{ fail (printf "git.identities.%s: type=ssh には sshPrivateKey か existingSecret が必要です" $name) }}{{- end }}
{{- if not $id.knownHosts }}{{ fail (printf "git.identities.%s: type=ssh には knownHosts が必須です(ホスト鍵の TOFU を無効化するため)" $name) }}{{- end }}
id: {{ $id.sshPrivateKey | quote }}
known_hosts: {{ $id.knownHosts | quote }}
{{- else if eq $id.type "https-token" }}
{{- if not $id.token }}{{ fail (printf "git.identities.%s: type=https-token には token か existingSecret が必要です" $name) }}{{- end }}
username: {{ $id.username | default "x-access-token" | quote }}
token: {{ $id.token | quote }}
{{- else }}
{{ fail (printf "git.identities.%s: type は ssh か https-token を指定してください" $name) }}
{{- end }}
{{- end }}
{{- end }}