apiVersion: v1
kind: Service
metadata:
  name: {{ template "gohelloworld-chart.name" . }}
  labels:
    app: {{ template "gohelloworld-chart.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.externalPort }}
      targetPort: {{ .Values.service.internalPort }}
      name: {{ .Values.service.name }}
  selector:
    app: {{ template "gohelloworld-chart.name" . }}
    release: {{ .Release.Name }}