From 7a2714336705576486b919c424126a6b230d152e Mon Sep 17 00:00:00 2001 From: Joon Seo Kim Date: Wed, 27 Sep 2023 05:50:03 +0900 Subject: [PATCH] [prometheus-kafka-exporter] Add nodePort for external use (#3828) * [prometheus-kafka-exporter]: Add nodePort for external use Signed-off-by: Joon Seo Kim Signed-off-by: KimJoonSeo * [prometheus-kafka-exporter]: Add nodePort for external use Signed-off-by: KimJoonSeo * Update charts/prometheus-kafka-exporter/values.yaml Thank you for your suggestion! I did commit the change. Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com> Signed-off-by: Joon Seo Kim --------- Signed-off-by: Joon Seo Kim Signed-off-by: KimJoonSeo Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com> --- charts/prometheus-kafka-exporter/Chart.yaml | 2 +- charts/prometheus-kafka-exporter/templates/service.yaml | 3 +++ charts/prometheus-kafka-exporter/values.yaml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-kafka-exporter/Chart.yaml b/charts/prometheus-kafka-exporter/Chart.yaml index 6019f8c9f161..8c7699e56af6 100644 --- a/charts/prometheus-kafka-exporter/Chart.yaml +++ b/charts/prometheus-kafka-exporter/Chart.yaml @@ -3,7 +3,7 @@ appVersion: "v1.7.0" description: A Helm chart to export the metrics from Kafka in Prometheus format using the kafka-exporter from https://github.com/danielqsj/kafka_exporter name: prometheus-kafka-exporter home: https://github.com/danielqsj/kafka_exporter -version: 2.5.0 +version: 2.6.0 kubeVersion: ">=1.19.0-0" sources: - https://gkarthiks.github.io/helm-charts/charts/prometheus-kafka-exporter diff --git a/charts/prometheus-kafka-exporter/templates/service.yaml b/charts/prometheus-kafka-exporter/templates/service.yaml index b0e77e6b5ea3..c990ac530ab4 100644 --- a/charts/prometheus-kafka-exporter/templates/service.yaml +++ b/charts/prometheus-kafka-exporter/templates/service.yaml @@ -19,6 +19,9 @@ spec: targetPort: exporter-port protocol: TCP name: exporter-port + {{- if (and (eq .Values.service.type "NodePort") .Values.service.nodePort) }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} selector: app: {{ template "prometheus-kafka-exporter.name" . }} release: {{ .Release.Name }} diff --git a/charts/prometheus-kafka-exporter/values.yaml b/charts/prometheus-kafka-exporter/values.yaml index 9244a9e14b48..bd83ab4f012a 100644 --- a/charts/prometheus-kafka-exporter/values.yaml +++ b/charts/prometheus-kafka-exporter/values.yaml @@ -71,6 +71,9 @@ service: port: 9308 labels: {} annotations: {} + # Specifies a custom nodePort for external use. + # Must be used with service.type=NodePort. + nodePort: null liveness: enabled: false