kind: Service
apiVersion: v1
metadata:
  name: {{ template "stackdriver-exporter.fullname" . }}
  labels:
    chart: {{ template "stackdriver-exporter.chart" . }}
    app: {{ template "stackdriver-exporter.name" . }}
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
{{- if .Values.service.annotations }}
  annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{- end }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - name: http
      port: {{ .Values.service.httpPort }}
      protocol: TCP
  selector:
    app: {{ template "stackdriver-exporter.name" . }}
    release: "{{ .Release.Name }}"
