svc-headless.yaml 921 B

1234567891011121314151617181920212223242526
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: {{ template "kafka.fullname" . }}-headless
  5. labels: {{- include "common.labels.standard" . | nindent 4 }}
  6. app.kubernetes.io/component: kafka
  7. {{- if .Values.commonLabels }}
  8. {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
  9. {{- end }}
  10. {{- if .Values.commonAnnotations }}
  11. annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  12. {{- end }}
  13. spec:
  14. type: ClusterIP
  15. clusterIP: None
  16. ports:
  17. - name: tcp-client
  18. port: {{ .Values.service.port }}
  19. protocol: TCP
  20. targetPort: kafka-client
  21. - name: tcp-internal
  22. port: {{ .Values.service.internalPort }}
  23. protocol: TCP
  24. targetPort: kafka-internal
  25. selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
  26. app.kubernetes.io/component: kafka