apiVersion: v1
kind: Service
metadata:
  name: {{ .Release.Name }}
  labels:
    app: teamspeak
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - nodePort: {{ .Values.service.voicePort }}
      targetPort: 9987
      protocol: UDP
      name: teamspeak-voice
      port: 9987
    - nodePort: {{ .Values.service.filePort }}
      targetPort: 30033
      protocol: TCP
      name: teamspeak-file
      port: 30033
  selector:
    app: teamspeak
    release: {{ .Release.Name }}
