{{- if .Values.uiService.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: "{{ template "consul.fullname" . }}-ui"
  labels:
    heritage: {{ .Release.Service | quote }}
    release: {{ .Release.Name | quote }}
    chart: {{ template "consul.chart" . }}
    component: "{{ .Release.Name }}-{{ .Values.Component }}"
spec:
  ports:
  - name: http
    port: {{ .Values.HttpPort }}
  selector:
    component: "{{ .Release.Name }}-{{ .Values.Component }}"
  type: "{{ .Values.uiService.type }}"
{{- end }}
