apiVersion: v1
kind: Service
metadata:
  name: {{ include "transmission.fullname" . }}
  labels:
    {{- include "transmission.labels" . | nindent 4 }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.port }}
      targetPort: 9091
      protocol: TCP
      name: transmission
    - port: {{ .Values.service.tcpPort }}
      targetPort: 56451
      protocol: TCP
      name: dht-tcp
  selector:
    {{- include "transmission.selectorLabels" . | nindent 4 }}
---
apiVersion: v1
kind: Service
metadata:
  name: {{ include "transmission.fullname" . }}-udp
  labels:
    {{- include "transmission.labels" . | nindent 4 }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.udpPort }}
      targetPort: 56451
      protocol: UDP
      name: dht-udp
  selector:
    {{- include "transmission.selectorLabels" . | nindent 4 }}
