From 8d8f3da99b52889c444d0dc3752199116e61d5c1 Mon Sep 17 00:00:00 2001 From: Eric Shen Date: Fri, 22 Nov 2024 16:06:55 +0800 Subject: [PATCH] feat: support kop proxy in chart (#1190) * feat: support kop proxy in chart Signed-off-by: ericsyh * fix lint Signed-off-by: ericsyh --------- Signed-off-by: ericsyh (cherry picked from commit da726e7f1ba69f3b87bcf6a343fc887104b974e1) --- charts/sn-platform-slim/templates/proxy/proxy-cluster.yaml | 5 +++++ charts/sn-platform-slim/values.yaml | 5 +++++ charts/sn-platform/templates/proxy/proxy-cluster.yaml | 5 +++++ charts/sn-platform/values.yaml | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/charts/sn-platform-slim/templates/proxy/proxy-cluster.yaml b/charts/sn-platform-slim/templates/proxy/proxy-cluster.yaml index fe0b9337..e1c6f1f0 100644 --- a/charts/sn-platform-slim/templates/proxy/proxy-cluster.yaml +++ b/charts/sn-platform-slim/templates/proxy/proxy-cluster.yaml @@ -140,6 +140,11 @@ spec: {{- if .Values.pulsar_metadata.clusterName }} clusterName: {{ .Values.pulsar_metadata.clusterName }} {{- end }} + {{- if .Values.proxy.kopProxy.enabled }} + kopProxy: + enabled: {{ .Values.proxy.kopProxy.enabled }} + kafkaAdvertisedListener: {{ .Values.proxy.kopProxy.kafkaAdvertisedListener }} + {{- end }} usePodIPAsAdvertisedAddress: {{ .Values.broker.usePodIPAsAdvertisedAddress | default "false" }} tls: enabled: {{ and (.Values.tls.enabled) (.Values.tls.proxy.enabled) }} diff --git a/charts/sn-platform-slim/values.yaml b/charts/sn-platform-slim/values.yaml index 3c527689..11ef30b0 100644 --- a/charts/sn-platform-slim/values.yaml +++ b/charts/sn-platform-slim/values.yaml @@ -1503,6 +1503,11 @@ proxy: # limits: # memory: "512Mi" # cpu: "0.8" + # Kafka Proxy supports forward the kafka client request to Pulsar Broker, make sure you enable the kop on the Broker component. + kopProxy: + enabled: false + # Specifies the listeners for Kafka clients. In Kubernetes environments, you should configure the external Proxy LoadBalancer type service address or NodePort type service address for this field. + kafkaAdvertisedListener: # extra environment variable to define for the containers extraEnv: [] # extra secrets to mount for the pods diff --git a/charts/sn-platform/templates/proxy/proxy-cluster.yaml b/charts/sn-platform/templates/proxy/proxy-cluster.yaml index ac11bfee..c8b927d3 100644 --- a/charts/sn-platform/templates/proxy/proxy-cluster.yaml +++ b/charts/sn-platform/templates/proxy/proxy-cluster.yaml @@ -140,6 +140,11 @@ spec: {{- if .Values.pulsar_metadata.clusterName }} clusterName: {{ .Values.pulsar_metadata.clusterName }} {{- end }} + {{- if .Values.proxy.kopProxy.enabled }} + kopProxy: + enabled: {{ .Values.proxy.kopProxy.enabled }} + kafkaAdvertisedListener: {{ .Values.proxy.kopProxy.kafkaAdvertisedListener }} + {{- end }} usePodIPAsAdvertisedAddress: {{ .Values.broker.usePodIPAsAdvertisedAddress | default "false" }} tls: enabled: {{ and (.Values.tls.enabled) (.Values.tls.proxy.enabled) }} diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index d3cd1796..f21c1732 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -1579,6 +1579,11 @@ proxy: # limits: # memory: "512Mi" # cpu: "0.8" + # Kafka Proxy supports forward the kafka client request to Pulsar Broker, make sure you enable the kop on the Broker component. + kopProxy: + enabled: false + # Specifies the listeners for Kafka clients. In Kubernetes environments, you should configure the external Proxy LoadBalancer type service address or NodePort type service address for this field. + kafkaAdvertisedListener: # extra environment variable to define for the containers extraEnv: [] # extra secrets to mount for the pods