svc-headless.yaml 828 B

12345678910111213141516171819202122232425262728
  1. {{- $svcValues := .Values.broker.service }}
  2. {{- $thisFullName := include "kafka.broker.headless.serviceName" . }}
  3. {{- $componet := include "kafka.broker.componet" . }}
  4. apiVersion: v1
  5. kind: Service
  6. metadata:
  7. name: {{ $thisFullName }}
  8. labels:
  9. {{- include "kafka.labels" . | nindent 4 }}
  10. component: {{ $componet | quote }}
  11. spec:
  12. type: ClusterIP
  13. clusterIP: None
  14. publishNotReadyAddresses: true
  15. ports:
  16. - port: {{ .Values.broker.service.port }}
  17. targetPort: broker
  18. protocol: TCP
  19. name: broker
  20. {{- if (eq (include "kafka.combinedMode" .) "true") }}
  21. - port: {{ .Values.controller.service.port }}
  22. targetPort: controller
  23. protocol: TCP
  24. name: controller
  25. {{- end }}
  26. selector:
  27. {{- include "kafka.selectorLabels" . | nindent 4 }}
  28. component: {{ $componet | quote }}