From a3b8ca6ee4f2a9aba8373c1a8fc901814f39302d 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 fe0b93378..e1c6f1f01 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 18108b710..277affca8 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 ac11bfeec..c8b927d34 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 36e093ff3..b9eaef06a 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -1580,6 +1580,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