# 배포별로 달라지는 설정만 담는다. # 환경과 무관한 기본값(timeout, 상한, management 포트 등)은 jar 안의 application-ocp.yml이 소유하고, # 이 파일이 같은 이름으로 덮어써 identity와 Tool 원천만 배포 시점에 결정한다. {{- include "mcp-server.validate" . }} {{- $deployment := include "mcp-server.selectedDeployment" . | fromYaml }} apiVersion: v1 kind: ConfigMap metadata: name: {{ include "mcp-server.name" . }}-config labels: {{- include "mcp-server.labels" . | nindent 4 }} data: application-ocp.yml: | mcp: # "{배포 이름}-{global.env}"로 조립된다. 환경끼리 Redis key가 겹치지 않는다. identity: {{ include "mcp-server.identity" . }} # Agent Builder에 등록한 공개 path를 컨테이너가 그대로 처리한다. Route rewrite는 사용하지 않는다. endpoint-path: {{ $deployment.publicPath | quote }} registry: refresh-interval-seconds: {{ .Values.mcp.refreshIntervalSeconds }} refresh-jitter-seconds: {{ .Values.mcp.refreshJitterSeconds }} discovery: # 운영 profile은 Tool Service 매니페스트만 원천으로 쓴다. enabled: true redis: # Portal 조회가 실패한 cold start에서만 읽는 fallback key다. # 포털이 쓰는 key와 반드시 같아야 한다. portal-registry-key: {{ .Values.portal.registryRedisKey | quote }} {{- if eq .Values.mode "portal" }} # route↔Tool Service 매핑의 원천은 Portal이다(ADR-0013). # 배포 하나가 N개 route를 서비스하고, route key는 /mcp/{routeKey} URI에서만 결정된다. # 매핑이 바뀌어도 이 ConfigMap을 고치지 않는다. 그것이 Portal을 원천으로 둔 이유다. portal: enabled: true registry-url: {{ .Values.portal.registryUrl | quote }} refresh-interval-seconds: {{ .Values.portal.refreshIntervalSeconds }} # Portal이 주소를 소유하므로 정적 bundle을 선언하지 않는다. bundles: [] {{- else }} portal: enabled: false # MCP 배포 하나는 Tool Service 하나만 본다(ADR-0007). # 이 목록은 항상 한 항목이며, 늘리려면 배포를 하나 더 만든다. # 주소는 여기서 조립한다. values에 URL을 적기 시작하면 오타가 라우팅 사고가 된다. bundles: - id: {{ .Values.deploymentKey | quote }} namePrefix: {{ $deployment.namePrefix | quote }} manifestUrl: http://{{ include "mcp-server.toolServiceHost" . }}{{ .Values.toolService.manifestPath }} baseEndpoint: http://{{ include "mcp-server.toolServiceHost" . }}{{ .Values.toolService.basePath }} enabled: true {{- end }}