Skip to content

Commit

Permalink
[sn-platform][sn-platform-slim]: move kop ports and auth configuratio…
Browse files Browse the repository at this point in the history
…ns to broker.kop (#1081)

* fix: move kop configs to .Values.broker

Signed-off-by: ericsyh <[email protected]>

* apply change to slim chart

Signed-off-by: ericsyh <[email protected]>

* fix lint

Signed-off-by: ericsyh <[email protected]>

---------

Signed-off-by: ericsyh <[email protected]>
  • Loading branch information
ericsyh authored Sep 15, 2023
1 parent e9bb695 commit 2efc1d6
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 20 deletions.
4 changes: 2 additions & 2 deletions charts/sn-platform-slim/templates/broker/_broker.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
19 changes: 12 additions & 7 deletions charts/sn-platform-slim/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
##
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions charts/sn-platform/templates/broker/_broker.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/sn-platform/templates/broker/broker-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
19 changes: 12 additions & 7 deletions charts/sn-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
##
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2efc1d6

Please sign in to comment.