apiVersion: v1
kind: Service
metadata:
  name: {{ include "mailhog.fullname" . }}
  labels:
{{ include "mailhog.labels" . | indent 4 }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.port }}
      targetPort: http
      protocol: TCP
      name: http
    - port: {{ .Values.service.smtp.port }}
      targetPort: smtp
      protocol: TCP
      name: smtp
  selector:
    app.kubernetes.io/name: {{ include "mailhog.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
