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

feat: add extraArgs for detector to support tls-auth #1124

Merged
merged 3 commits into from
Nov 10, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,20 @@ spec:
image: "{{ .Values.images.pulsar_detector.repository }}:{{ .Values.images.pulsar_detector.tag }}"
imagePullPolicy: {{ .Values.images.pulsar_detector.pullPolicy }}
command: ["sh", "-c"]
{{- if .Values.pulsar_detector.extraArgs }}
args:
- >
bin/pulsar-detector -service-url {{ template "pulsar.detector.serviceUrl" . }} -webservice-url {{ template "pulsar.detector.webServiceUrl" . }} {{- if .Values.auth.authentication.enabled }} -auth-plugin token -auth-params "{\"token\":\"$brokerClientAuthenticationParameters\"}" {{- end }} {{- if .Values.pulsar_detector.extraArgs }} {{.Values.pulsar_detector.extraArgs }} {{- end }};
bin/pulsar-detector \
{{- range $key, $value := .Values.pulsar_detector.extraArgs }}
-{{ $key }} {{ $value }} \
{{- end }}
-service-url {{ template "pulsar.detector.serviceUrl" . }} \
-webservice-url {{ template "pulsar.detector.webServiceUrl" . }}};
{{- else }}
args:
- >
bin/pulsar-detector -service-url {{ template "pulsar.detector.serviceUrl" . }} -webservice-url {{ template "pulsar.detector.webServiceUrl" . }} {{- if .Values.auth.authentication.enabled }} -auth-plugin token -auth-params "{\"token\":\"$brokerClientAuthenticationParameters\"}" {{- end }};
{{- end }}
{{- if .Values.pulsar_detector.resources }}
resources: {{- toYaml .Values.pulsar_detector.resources | nindent 10 }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/sn-platform-slim/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,11 @@ pulsar_detector:
extraVolumes: []
extraVolumeMounts: []
extraEnv: []
## Additional pulsar_detector container arguments
extraArgs: {}
# Configure the tls auth for detector
# auth-plugin: "tls"
# auth-params: "{\"tlsCertFile\":\"/pulsar/certs/pulsar-detector/tls.crt\",\"tlsKeyFile\":\"/pulsar/certs/pulsar-detector/tls.key\"}"
## Proxy service
## templates/pulsar-detector-service.yaml
##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,20 @@ spec:
image: "{{ .Values.images.pulsar_detector.repository }}:{{ .Values.images.pulsar_detector.tag }}"
imagePullPolicy: {{ .Values.images.pulsar_detector.pullPolicy }}
command: ["sh", "-c"]
{{- if .Values.pulsar_detector.extraArgs }}
args:
- >
bin/pulsar-detector -service-url {{ template "pulsar.detector.serviceUrl" . }} -webservice-url {{ template "pulsar.detector.webServiceUrl" . }} {{- if .Values.auth.authentication.enabled }} -auth-plugin token -auth-params "{\"token\":\"$brokerClientAuthenticationParameters\"}" {{- end }} {{- if .Values.pulsar_detector.extraArgs }} {{.Values.pulsar_detector.extraArgs }} {{- end }};
bin/pulsar-detector \
{{- range $key, $value := .Values.pulsar_detector.extraArgs }}
-{{ $key }} {{ $value }} \
{{- end }}
-service-url {{ template "pulsar.detector.serviceUrl" . }} \
-webservice-url {{ template "pulsar.detector.webServiceUrl" . }}};
{{- else }}
args:
- >
bin/pulsar-detector -service-url {{ template "pulsar.detector.serviceUrl" . }} -webservice-url {{ template "pulsar.detector.webServiceUrl" . }} {{- if .Values.auth.authentication.enabled }} -auth-plugin token -auth-params "{\"token\":\"$brokerClientAuthenticationParameters\"}" {{- end }};
{{- end }}
{{- if .Values.pulsar_detector.resources }}
resources: {{- toYaml .Values.pulsar_detector.resources | nindent 10 }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/sn-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,11 @@ pulsar_detector:
extraVolumes: []
extraVolumeMounts: []
extraEnv: []
## Additional pulsar_detector container arguments
extraArgs: {}
# Configure the tls auth for detector
# auth-plugin: "tls"
# auth-params: "{\"tlsCertFile\":\"/pulsar/certs/pulsar-detector/tls.crt\",\"tlsKeyFile\":\"/pulsar/certs/pulsar-detector/tls.key\"}"
## Proxy service
## templates/pulsar-detector-service.yaml
##
Expand Down
Loading