apiVersion: v1
kind: Service
metadata:
  name: {{ name }}
  namespace: {{ namespace }}
spec:
  selector:
    app: {{ name }}
  ports:
{%- if is_web %}
    - name: http
      port: 80
      targetPort: {{ port }}
{%- elif is_http %}
    - name: http
      port: {{ port }}
      targetPort: {{ port }}
{%- else %}
    - name: grpc
      port: {{ port }}
      targetPort: {{ port }}
{%- if has_http_port %}
    - name: http
      port: {{ http_port }}
      targetPort: {{ http_port }}
{%- endif %}
{%- if mcp_sidecar %}
    - name: mcp
      port: 50052
      targetPort: 50052
{%- endif %}
{%- endif %}
