Skip to content

Commit

Permalink
feat: add extraArgs for detector
Browse files Browse the repository at this point in the history
Signed-off-by: ericsyh <[email protected]>
  • Loading branch information
ericsyh committed Nov 9, 2023
1 parent 5792b4f commit e806b0a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
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\":\"val1\"}"
## Proxy service
## templates/pulsar-detector-service.yaml
##
Expand Down

0 comments on commit e806b0a

Please sign in to comment.