From f1936227539d326459cc025f20730ba974e48fa5 Mon Sep 17 00:00:00 2001 From: Sebastien Dionne Date: Mon, 5 Apr 2021 02:42:58 -0400 Subject: [PATCH] add nodePort support (#337) * add nodePort support --- charts/kafka-ui/templates/service.yaml | 3 +++ charts/kafka-ui/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/charts/kafka-ui/templates/service.yaml b/charts/kafka-ui/templates/service.yaml index 339bb35a5a5..3dba7bd0359 100644 --- a/charts/kafka-ui/templates/service.yaml +++ b/charts/kafka-ui/templates/service.yaml @@ -11,5 +11,8 @@ spec: targetPort: http protocol: TCP name: http + {{- if (and (eq .Values.service.type "NodePort") .Values.service.nodePort) }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} selector: {{- include "kafka-ui.selectorLabels" . | nindent 4 }} diff --git a/charts/kafka-ui/values.yaml b/charts/kafka-ui/values.yaml index 19db6082882..5d20e6d1d37 100644 --- a/charts/kafka-ui/values.yaml +++ b/charts/kafka-ui/values.yaml @@ -41,6 +41,8 @@ securityContext: {} service: type: ClusterIP port: 80 + # if you want to force a specific nodePort. Must be use with service.type=NodePort + # nodePort: ingress: enabled: false