apiVersion: v1
kind: Service
metadata:
  name: {{ template "cp-zookeeper.fullname" . }}-headless
  labels:
    app: {{ template "cp-zookeeper.name" . }}
    chart: {{ template "cp-zookeeper.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  ports:
    - port: {{ .Values.serverPort }}
      name: server
    - port: {{ .Values.leaderElectionPort }}
      name: leader-election
  clusterIP: None
  selector:
    app: {{ template "cp-zookeeper.name" . }}
    release: {{ .Release.Name }}