apiVersion: v1
kind: Service
metadata:
  name: {{ include "ender.fullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "ender.labels" . | nindent 4 }}
spec:
  type: {{ .Values.service.type }}
  ports:
    {{- range $key, $val := .Values.service.ports }}
    - port: {{ $val }}
      targetPort: {{ $key }}
      protocol: TCP
      name: {{ $key }}
    {{- end}}
  selector:
    {{- include "ender.selectorLabels" . | nindent 4 }}
