apiVersion: v1
kind: Service
metadata:
  name: {{ include "elasticsearch.data.fullname" . }}
  labels: {{- include "common.labels.standard" . | nindent 4 }}
    app.kubernetes.io/component: data
  annotations: {{ include "common.tplvalues.render" ( dict "value" .Values.data.service.annotations "context" $) | nindent 4 }}
spec:
  type: ClusterIP
  publishNotReadyAddresses: true
  ports:
    - name: {{ include "elasticsearch.httpPortName" . }}
      port: 9200
      targetPort: {{ include "elasticsearch.httpPortName" . }}
    - name: tcp-transport
      port: 9300
      targetPort: transport
      nodePort: null
  selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
    app.kubernetes.io/component: data
