Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve naming of TLS values for proxy, function worker, websocket proxy #170

Merged
merged 1 commit into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,9 @@ There are many components to consider when enabling TLS for a Pulsar Cluster. To
endpoints, set `enableTls: true` in the values file and configure certificates. This setting will enable TLS endpoints
for the Broker pods, Function Worker pods, and Proxy pods. However, this setting will not configure the proxy or the
function worker to use TLS for connections with the broker. You can enable those by configuring
`tls.proxy.enabled: true` and `tls.function.enabled: true`, respectively. Because the function worker only connects to
the broker over TLS when authentication is configured, make sure to enable authentication if you'd like the function
worker to connect to the broker over TLS.
`tls.proxy.enableTlsWithBroker: true` and `tls.function.enableTlsWithBroker: true`, respectively. Because the function
worker only connects to the broker over TLS when authentication is configured, make sure to enable authentication if
you'd like the function worker to connect to the broker over TLS.

#### Hostname Verification

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ data:
{{- end }}
tlsKeyFilePath: "/pulsar/tls-pk8.key"
{{- end }}
{{- if and .Values.enableTls .Values.tls.function.enabled }}
{{- if or (and .Values.enableTls .Values.tls.function.enabled) (and .Values.enableTls .Values.tls.function.enableTlsWithBroker) }}
useTls: "true"
tlsEnableHostnameVerification: "{{ .Values.tls.proxy.enableHostnameVerification }}"
pulsarServiceUrl: "pulsar+ssl://{{ template "pulsar.fullname" . }}-{{ .Values.brokerSts.component }}:6651"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ data:
webServicePortTls: "8443"
servicePortTls: "6651"
# Used to enable via .Values.tls.function.enabled, but that is deprecated now.
{{- if or .Values.tls.function.enabled .Values.tls.proxy.enabled }}
{{- if or .Values.tls.function.enabled .Values.tls.proxy.enableTlsWithBroker }}
tlsEnabledWithBroker: "true"
tlsHostnameVerificationEnabled: "{{ .Values.tls.proxy.enableHostnameVerification }}"
{{- else }}
tlsEnabledWithBroker: "false"
{{- end }}
{{- if .Values.extra.function }}
{{- if or .Values.tls.function.enabled .Values.tls.proxy.enabled }}
{{- if or .Values.tls.function.enabled .Values.tls.proxy.enableTlsWithBroker }}
functionWorkerWebServiceURLTLS: "https://{{ template "pulsar.fullname" . }}-{{ .Values.function.component }}-ca:6751"
{{- else }}
functionWorkerWebServiceURL: "http://{{ template "pulsar.fullname" . }}-{{ .Values.function.component }}-ca:6750"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ data:
tlsEnabled: "true"
tlsCertificateFilePath: /pulsar/certs/tls.crt
tlsKeyFilePath: /pulsar/tls-pk8.key
{{- if or .Values.tls.websocket.enabled .Values.enableTls }}
# .Values.tls.websocket.enabled is deprecated
{{- if or (or .Values.tls.websocket.enabled .Values.enableTls) (and .Values.enableTls .Values.tls.websocket.enableTlsWithBroker) }}
brokerClientTlsEnabled: "true"
{{- if or .Values.secrets .Values.createCertificates.selfSigned.enabled}}
tlsTrustCertsFilePath: /pulsar/certs/ca.crt
Expand Down
14 changes: 7 additions & 7 deletions helm-chart-sources/pulsar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ default_storage:
# TLS-enabled ports on the service. To allow TLS connections only, remove the plain-text ports.
# See the proxy and broker sections for details.
# This flag enables TLS for all client and admin facing components: broker, proxy, websocket proxy, standalone function
# worker. You must deploy the broker as a StatefulSet for hostname verification to work. The function worker and the
# proxy will network with the brokers over TLS when this flag is set to true.
# worker. You must deploy the broker as a StatefulSet for hostname verification to work. In order to enable Pulsar
# components to network using TLS, see the tls.<component> section below; by default, intra cluster networking is
# plaintext.
enableTls: false
tlsSecretName: pulsar-tls

Expand Down Expand Up @@ -150,15 +151,14 @@ tls:
# NOTE: the function worker's connection to the broker is only over TLS if brokerClientAuthenticationEnabled is true
# or if authenticationEnabled is true in the function's configuration.
function:
enabled: false
enableTlsWithBroker: false
# NOTE: temporarily false to allow for easy transition. In next major version bump, this will default to true.
enableHostnameVerification: false
# Enable TLS between WebSocket proxy and broker
websocket:
enabled: false
# Enable TLS between proxy and broker and between proxy and function worker
enableTlsWithBroker: false
proxy:
enabled: false
# Applies to connections to standalone function worker, too.
enableTlsWithBroker: false
# Applies to upstream broker and function worker TLS connections.
# NOTE: temporarily false to allow for easy transition. In next major version bump, this will default to true.
enableHostnameVerification: false
Expand Down