kind: Service apiVersion: v1 metadata: name: {{ template "elasticsearch-exporter.fullname" . }} labels: chart: {{ template "elasticsearch-exporter.chart" . }} k8s-app: {{ template "elasticsearch-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: k8s-app: {{ template "elasticsearch-exporter.name" . }} release: "{{ .Release.Name }}"