apiVersion: v1
kind: Service
metadata:
  name: {{ template "seq.fullname" . }}
  labels:
    app: {{ template "seq.name" . }}
    chart: {{ template "seq.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.ui.service.port }}
      targetPort: ui
      protocol: TCP
      name: ui
    - port: {{ .Values.ingestion.service.port }}
      targetPort: ingestion
      protocol: TCP
      name: ingestion
{{- if .Values.gelf.enabled }}
    - port: {{ .Values.gelf.service.port }}
      targetPort: gelf
      protocol: {{ .Values.gelf.service.protocol }}
      name: gelf
{{- end }}
  selector:
    app: {{ template "seq.name" . }}
    release: {{ .Release.Name }}
