apiVersion: v1
kind: Service
metadata:
  name: {{ include "kafka.fullname" . }}-headless
  labels:
    {{- include "kafka.labels" . | nindent 4 }}
spec:
  type: ClusterIP
  clusterIP: None
  publishNotReadyAddresses: true
  ports:
  - name: tcp-kafka-int
    port: {{ .Values.port.kafkaInternal }}
    protocol: TCP
    targetPort: tcp-kafka-int
  - name: tcp-kafka-ext
    port: {{ .Values.port.kafkaExternal }}
    protocol: TCP
    targetPort: tcp-kafka-ext
  selector:
    {{- include "kafka.selectorLabels" . | nindent 4 }}
