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 検証済み
This commit is contained in:
+9
-1
@@ -11,7 +11,15 @@ claude-code ({{ .Chart.Version }}) をデプロイしました。
|
||||
{{- range .Values.ingress.hosts }}
|
||||
https://{{ .host }}/
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.service.type "LoadBalancer" }}
|
||||
ロードバランサーの IP を確認してブラウザで開いてください:
|
||||
kubectl -n {{ .Release.Namespace }} get svc {{ include "claude-code.fullname" . }} -w
|
||||
→ http://<EXTERNAL-IP>:{{ .Values.service.port }}/
|
||||
{{- with .Values.service.loadBalancerSourceRanges }}
|
||||
(接続元は {{ join ", " . }} に制限されています)
|
||||
{{- end }}
|
||||
{{- else if not .Values.ingress.enabled }}
|
||||
kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "claude-code.fullname" . }} 8080:{{ .Values.service.port }}
|
||||
→ http://localhost:8080/
|
||||
{{- end }}
|
||||
|
||||
@@ -6,13 +6,36 @@ metadata:
|
||||
labels:
|
||||
{{- include "claude-code.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: control-plane
|
||||
{{- with .Values.service.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.service.loadBalancerClass }}
|
||||
loadBalancerClass: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{- toYaml .Values.service.loadBalancerSourceRanges | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.service.externalTrafficPolicy }}
|
||||
externalTrafficPolicy: {{ . }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePort }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "claude-code.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: control-plane
|
||||
|
||||
Reference in New Issue
Block a user