# helm_charts_ui-svc.yaml
{{- if .Values.ui.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ template "kubeless.fullname" . }}-ui
  labels:
{{ include "labels.standard" . | indent 4 }}
    controller: {{ template "kubeless.fullname" . }}-ui
spec:
  ports:
  - name: {{ .Values.ui.service.name }}
    port: {{ .Values.ui.service.externalPort }}
    protocol: TCP
    targetPort: 3000
  selector:
    component: ui
    app: {{ template "kubeless.name"  . }}
    release: {{ .Release.Name | quote }}
  sessionAffinity: None
  type: {{ .Values.ui.service.type }}
{{- end }}