{{- if .Values.mcp.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "statehub.mcpFullname" . }}
  labels: {{- include "statehub.mcpLabels" . | nindent 4 }}
spec:
  # ClusterIP only, and deliberately no Ingress: the MCP layer proxies an
  # unauthenticated API and must not be reachable from outside the cluster.
  type: ClusterIP
  ports:
    - port: {{ .Values.mcp.service.port }}
      targetPort: {{ .Values.mcp.service.targetPort }}
      protocol: TCP
      name: sse
  selector: {{- include "statehub.mcpSelectorLabels" . | nindent 4 }}
{{- end }}
