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 検証済み
This commit is contained in:
@@ -137,6 +137,10 @@ spec:
|
||||
value: {{ .Values.anthropic.existingSecretKeyCredentials | default ".credentials.json" | quote }}
|
||||
- name: GIT_IDENTITIES_JSON
|
||||
value: {{ $idents | toJson | quote }}
|
||||
- name: GUI_IDENTITIES_ENABLED
|
||||
value: {{ .Values.git.guiIdentities.enabled | quote }}
|
||||
- name: GIT_FULLNAME_PREFIX
|
||||
value: {{ include "claude-code.fullname" . | quote }}
|
||||
- name: GIT_ALLOWED_HOSTS
|
||||
value: {{ join "," .Values.git.allowedHosts | quote }}
|
||||
- name: GIT_ALLOW_ARBITRARY
|
||||
|
||||
@@ -22,6 +22,14 @@ rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- if .Values.git.guiIdentities.enabled }}
|
||||
# GUI からの git identity 登録(Secret の作成/更新/削除)。
|
||||
# list は同 NS の他 Secret も対象になりうるが、manager コードは
|
||||
# ラベル claude-code.cafepieters.com/identity-source=gui のものだけを操作する。
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get", "list", "create", "update", "patch", "delete"]
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
|
||||
@@ -12,6 +12,8 @@ metadata:
|
||||
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" }}
|
||||
|
||||
Reference in New Issue
Block a user