apiVersion: v1
kind: Service
metadata:
  name: {{ include "playwright-proxy.fullname" . }}
  labels:
    {{- include "playwright-proxy.labels" . | nindent 4 }}
  {{- with .Values.service.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.port }}
      targetPort: http
      protocol: TCP
      name: http
    - port: 3001
      targetPort: frontend
      protocol: TCP
      name: frontend
    - port: {{ .Values.config.metricsPort }}
      targetPort: metrics
      protocol: TCP
      name: metrics
  selector:
    {{- include "playwright-proxy.selectorLabels" . | nindent 4 }}
