From 2efc1d63cdb6d5a22c5833822aea5f3f71e42a03 Mon Sep 17 00:00:00 2001 From: Eric Shen Date: Fri, 15 Sep 2023 11:47:04 +0800 Subject: [PATCH] [sn-platform][sn-platform-slim]: move kop ports and auth configurations to broker.kop (#1081) * fix: move kop configs to .Values.broker Signed-off-by: ericsyh * apply change to slim chart Signed-off-by: ericsyh * fix lint Signed-off-by: ericsyh --------- Signed-off-by: ericsyh --- .../templates/broker/_broker.tpl | 4 ++-- .../templates/broker/broker-cluster.yaml | 2 +- charts/sn-platform-slim/values.yaml | 19 ++++++++++++------- .../sn-platform/templates/broker/_broker.tpl | 4 ++-- .../templates/broker/broker-cluster.yaml | 2 +- charts/sn-platform/values.yaml | 19 ++++++++++++------- 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/charts/sn-platform-slim/templates/broker/_broker.tpl b/charts/sn-platform-slim/templates/broker/_broker.tpl index 5b5f062f7..dc418fe4f 100644 --- a/charts/sn-platform-slim/templates/broker/_broker.tpl +++ b/charts/sn-platform-slim/templates/broker/_broker.tpl @@ -90,9 +90,9 @@ Define broker kop settings {{- define "pulsar.broker.kop.settings" -}} {{- if .Values.broker.kop.enabled }} {{- if and .Values.tls.enabled .Values.tls.broker.enabled }} -export PULSAR_PREFIX_listeners="SSL://{{ template "pulsar.broker.hostname" . }}:{{ .Values.kop.ports.ssl }}"; +export PULSAR_PREFIX_listeners="SSL://{{ template "pulsar.broker.hostname" . }}:{{ .Values.broker.kop.ports.ssl }}"; {{- else }} -export PULSAR_PREFIX_listeners="PLAINTEXT://{{ template "pulsar.broker.hostname" . }}:{{ .Values.kop.ports.plaintext }}"; +export PULSAR_PREFIX_listeners="PLAINTEXT://{{ template "pulsar.broker.hostname" . }}:{{ .Values.broker.kop.ports.plaintext }}"; {{- end }} {{- end }} {{- end }} diff --git a/charts/sn-platform-slim/templates/broker/broker-cluster.yaml b/charts/sn-platform-slim/templates/broker/broker-cluster.yaml index b7f672120..ff910f501 100644 --- a/charts/sn-platform-slim/templates/broker/broker-cluster.yaml +++ b/charts/sn-platform-slim/templates/broker/broker-cluster.yaml @@ -295,7 +295,7 @@ spec: {{- end }} {{- if .Values.broker.kop.enabled }} PULSAR_PREFIX_kafkaTransactionCoordinatorEnabled: "true" - {{- if .Values.kop.auth.enabled }} + {{- if .Values.broker.kop.auth.enabled }} PULSAR_PREFIX_saslAllowedMechanisms: "PLAIN" {{- end }} {{- end }} diff --git a/charts/sn-platform-slim/values.yaml b/charts/sn-platform-slim/values.yaml index 58dc58389..bfd3e16e5 100644 --- a/charts/sn-platform-slim/values.yaml +++ b/charts/sn-platform-slim/values.yaml @@ -997,13 +997,13 @@ pulsar_metadata: # # configurationStoreServers: "zk04:2181,zk05:2181,zk06:2181" -## Pulsar: KoP Protocol Handler -kop: - ports: - plaintext: 9092 - ssl: 9093 - auth: - enabled: false +## deprecated: move to broker.kop +# kop: +# ports: +# plaintext: 9092 +# ssl: 9093 +# auth: +# enabled: false ## Pulsar: Broker cluster ## templates/broker-statefulset.yaml ## @@ -1058,6 +1058,11 @@ broker: # - my-pulsar-service-mop.example.com kop: enabled: true + ports: + plaintext: 9092 + ssl: 9093 + auth: + enabled: false tls: enabled: false # trustCertsEnabled controls the kop configuration item kopSslTruststoreLocation=/xxx/truststore.jks diff --git a/charts/sn-platform/templates/broker/_broker.tpl b/charts/sn-platform/templates/broker/_broker.tpl index 5b5f062f7..dc418fe4f 100644 --- a/charts/sn-platform/templates/broker/_broker.tpl +++ b/charts/sn-platform/templates/broker/_broker.tpl @@ -90,9 +90,9 @@ Define broker kop settings {{- define "pulsar.broker.kop.settings" -}} {{- if .Values.broker.kop.enabled }} {{- if and .Values.tls.enabled .Values.tls.broker.enabled }} -export PULSAR_PREFIX_listeners="SSL://{{ template "pulsar.broker.hostname" . }}:{{ .Values.kop.ports.ssl }}"; +export PULSAR_PREFIX_listeners="SSL://{{ template "pulsar.broker.hostname" . }}:{{ .Values.broker.kop.ports.ssl }}"; {{- else }} -export PULSAR_PREFIX_listeners="PLAINTEXT://{{ template "pulsar.broker.hostname" . }}:{{ .Values.kop.ports.plaintext }}"; +export PULSAR_PREFIX_listeners="PLAINTEXT://{{ template "pulsar.broker.hostname" . }}:{{ .Values.broker.kop.ports.plaintext }}"; {{- end }} {{- end }} {{- end }} diff --git a/charts/sn-platform/templates/broker/broker-cluster.yaml b/charts/sn-platform/templates/broker/broker-cluster.yaml index ab4f914d9..540947630 100644 --- a/charts/sn-platform/templates/broker/broker-cluster.yaml +++ b/charts/sn-platform/templates/broker/broker-cluster.yaml @@ -299,7 +299,7 @@ spec: {{- end }} {{- if .Values.broker.kop.enabled }} PULSAR_PREFIX_kafkaTransactionCoordinatorEnabled: "true" - {{- if .Values.kop.auth.enabled }} + {{- if .Values.broker.kop.auth.enabled }} PULSAR_PREFIX_saslAllowedMechanisms: "PLAIN" {{- end }} {{- end }} diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index 942ad0be9..fd43bb537 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -1072,13 +1072,13 @@ pulsar_metadata: # # configurationStoreServers: "zk04:2181,zk05:2181,zk06:2181" -## Pulsar: KoP Protocol Handler -kop: - ports: - plaintext: 9092 - ssl: 9093 - auth: - enabled: false +## deprecated: move to broker.kop +# kop: +# ports: +# plaintext: 9092 +# ssl: 9093 +# auth: +# enabled: false ## Pulsar: Broker cluster ## templates/broker-statefulset.yaml ## @@ -1133,6 +1133,11 @@ broker: # - my-pulsar-service-mop.example.com kop: enabled: true + ports: + plaintext: 9092 + ssl: 9093 + auth: + enabled: false tls: enabled: false # trustCertsEnabled controls the kop configuration item kopSslTruststoreLocation=/xxx/truststore.jks