apiVersion: v1
kind: Service
metadata:
  name: {{ include "tunneller.fullname" . }}
  labels:
    app.kubernetes.io/name: {{ include "tunneller.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    helm.sh/chart: {{ include "tunneller.chart" . }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.tunnel.port }}
      targetPort: tunnel-port
      protocol: TCP
      name: tunnel-port
  selector:
    app.kubernetes.io/name: {{ include "tunneller.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
