service.yaml 792 B

12345678910111213141516171819202122232425262728293031
  1. {{- if .Values.ui.enabled }}
  2. {{- $svcValues := .Values.ui.service }}
  3. apiVersion: v1
  4. kind: Service
  5. metadata:
  6. name: {{ include "kafka.ui.fullname" . }}
  7. labels:
  8. {{- include "kafka.labels" . | nindent 4 }}
  9. {{- with $svcValues.labels }}
  10. {{- toYaml . | nindent 4 }}
  11. {{- end }}
  12. {{- with $svcValues.annotations }}
  13. annotations:
  14. {{- toYaml . | nindent 4 }}
  15. {{- end }}
  16. spec:
  17. {{- if $svcValues.type }}
  18. type: {{ $svcValues.type | quote }}
  19. {{- end }}
  20. ports:
  21. - port: 8080
  22. targetPort: http
  23. protocol: TCP
  24. name: http
  25. {{- if and $svcValues.nodePort (eq $svcValues.type "NodePort") }}
  26. nodePort: {{ $svcValues.nodePort }}
  27. {{- end }}
  28. selector:
  29. {{- include "kafka.selectorLabels" . | nindent 4 }}
  30. component: kafka-ui
  31. {{- end }}