{{- if .Values.features.streaming.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ template "scdf.fullname" . }}-skipper
  labels:
    app: {{ template "scdf.name" . }}
    component: skipper
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
{{- if .Values.skipper.service.labels }}
{{ toYaml .Values.skipper.service.labels | indent 4 }}
{{- end }}
{{- if .Values.skipper.service.annotations }}
  annotations:
{{ toYaml .Values.skipper.service.annotations | indent 4 }}
{{- end }}
spec:
  type: {{ .Values.skipper.service.type }}
  ports:
    - port: 80
      targetPort: http
      name: http
  selector:
    app: {{ template "scdf.name" . }}
    component: skipper
    release: {{ .Release.Name }}
{{- end }}
