Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
16 changes: 14 additions & 2 deletions charts/sn-platform-slim/templates/toolset/_toolset.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,18 @@ Define toolset TLS certificate secret name
{{- end -}}
{{- end -}}

{{/*
Define the proxy service host for toolset (ingress when proxy ingress is enabled, else headless).
Toolset uses this so pulsar-admin and client commands reach the proxy via the ingress service.
*/}}
{{- define "toolset.proxy.service.host" -}}
{{- if and .Values.ingress.proxy.enabled (ne .Values.ingress.proxy.type "IstioGateway") -}}
{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-ingress
{{- else -}}
{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-headless
{{- end -}}
{{- end -}}

{{/*
Define the toolset web service url
*/}}
Expand All @@ -169,9 +181,9 @@ http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}:{{ .Val
{{- end -}}
{{- else -}}
{{- if and .Values.tls.enabled .Values.tls.proxy.enabled -}}
https://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}:{{ .Values.proxy.ports.https }}
https://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.https }}
{{- else -}}
http://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}:{{ .Values.proxy.ports.http }}
http://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.http }}
{{- end -}}
Comment thread
tuteng marked this conversation as resolved.
Outdated
{{- end -}}
{{- end -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ data:
{{- end }}
{{- end }}
{{- if .Values.toolset.useProxy }}
# talk to proxy
# talk to proxy (use proxy-ingress when ingress enabled so pulsar-admin works from Toolset pod)
{{- if and .Values.tls.enabled .Values.tls.proxy.enabled }}
webServiceUrl: "https://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-headless:{{ .Values.proxy.ports.https }}/"
brokerServiceUrl: "pulsar+ssl://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-headless:{{ .Values.proxy.ports.pulsarssl }}/"
webServiceUrl: "https://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.https }}/"
brokerServiceUrl: "pulsar+ssl://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.pulsarssl }}/"
useTls: "true"
tlsAllowInsecureConnection: "false"
{{- if .Values.tls.proxy.untrustedCa }}
Expand All @@ -41,8 +41,8 @@ data:
tlsEnableHostnameVerification: "false"
{{- end }}
{{- if not (and .Values.tls.enabled .Values.tls.proxy.enabled) }}
webServiceUrl: "http://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-headless:{{ .Values.proxy.ports.http }}/"
brokerServiceUrl: "pulsar://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-headless:{{ .Values.proxy.ports.pulsar }}/"
webServiceUrl: "http://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.http }}/"
brokerServiceUrl: "pulsar://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.pulsar }}/"
{{- end }}
{{- end }}
# Authentication Settings
Expand Down
16 changes: 14 additions & 2 deletions charts/sn-platform/templates/toolset/_toolset.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,18 @@ Define toolset TLS certificate secret name
{{- end -}}
{{- end -}}

{{/*
Define the proxy service host for toolset (ingress when proxy ingress is enabled, else headless).
Toolset uses this so pulsar-admin and client commands reach the proxy via the ingress service.
*/}}
{{- define "toolset.proxy.service.host" -}}
{{- if and .Values.ingress.proxy.enabled (ne .Values.ingress.proxy.type "IstioGateway") -}}
{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-ingress
{{- else -}}
{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-headless
{{- end -}}
{{- end -}}

{{/*
Define the toolset web service url
*/}}
Expand All @@ -217,9 +229,9 @@ http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}:{{ .Val
{{- end -}}
{{- else -}}
{{- if and .Values.tls.enabled .Values.tls.proxy.enabled -}}
https://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}:{{ .Values.proxy.ports.https }}
https://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.https }}
{{- else -}}
http://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}:{{ .Values.proxy.ports.http }}
http://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.http }}
{{- end -}}
Comment thread
tuteng marked this conversation as resolved.
Outdated
{{- end -}}
{{- end -}}
Expand Down
10 changes: 5 additions & 5 deletions charts/sn-platform/templates/toolset/toolset-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ data:
{{- end }}
{{- end }}
{{- if .Values.toolset.useProxy }}
# talk to proxy
# talk to proxy (use proxy-ingress when ingress enabled so pulsar-admin works from Toolset pod)
{{- if and .Values.tls.enabled .Values.tls.proxy.enabled }}
webServiceUrl: "https://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-headless:{{ .Values.proxy.ports.https }}/"
brokerServiceUrl: "pulsar+ssl://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-headless:{{ .Values.proxy.ports.pulsarssl }}/"
webServiceUrl: "https://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.https }}/"
brokerServiceUrl: "pulsar+ssl://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.pulsarssl }}/"
useTls: "true"
tlsAllowInsecureConnection: "false"
{{- if .Values.tls.proxy.untrustedCa }}
Expand All @@ -41,8 +41,8 @@ data:
tlsEnableHostnameVerification: "false"
{{- end }}
{{- if not (and .Values.tls.enabled .Values.tls.proxy.enabled) }}
webServiceUrl: "http://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-headless:{{ .Values.proxy.ports.http }}/"
brokerServiceUrl: "pulsar://{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}-headless:{{ .Values.proxy.ports.pulsar }}/"
webServiceUrl: "http://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.http }}/"
brokerServiceUrl: "pulsar://{{ template "toolset.proxy.service.host" . }}:{{ .Values.proxy.ports.pulsar }}/"
{{- end }}
{{- end }}
# Authentication Settings
Expand Down
Loading