apiVersion: v1
kind: Service
metadata:
  name: {{template "fullname" .}}
  labels:
    heritage: {{ .Release.Service | quote }}
    release: {{ .Release.Name | quote }}
    chart: "{{.Chart.Name}}-{{.Chart.Version}}"
    app: {{template "fullname" .}}
spec:
  ports:
  - port: {{default 8081 .Values.httpPort}}
    targetPort: 8081
    protocol: TCP
    name: http
  selector:
    app: {{template "fullname" .}}
  type: {{.Values.ServiceType}}