apiVersion: v1
kind: Service
metadata:
  name: {{ template "dask.fullname" . }}-scheduler
  labels:
    app: {{ template "dask.name" . }}
    heritage: {{ .Release.Service | quote }}
    release: {{ .Release.Name | quote }}
    chart: {{ template "dask.chart" . }}
    component: scheduler
spec:
  ports:
    - name: {{ template "dask.fullname" . }}-scheduler
      port: {{ .Values.scheduler.servicePort }}
      targetPort: 8786
    - name: {{ template "dask.fullname" . }}-webui
      port: {{ .Values.webUI.servicePort }}
      targetPort: 8787
  selector:
    app: {{ template "dask.name" . }}
    release: {{ .Release.Name | quote }}
    component: scheduler
  type: {{ .Values.scheduler.serviceType }}
