diff --git a/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml b/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml index f9c7ac243..f3beb074f 100644 --- a/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml @@ -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 }} diff --git a/charts/sn-platform-slim/values.yaml b/charts/sn-platform-slim/values.yaml index f9f918eb6..fc7d78814 100644 --- a/charts/sn-platform-slim/values.yaml +++ b/charts/sn-platform-slim/values.yaml @@ -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 ## diff --git a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml index 4913186f2..1d9381a0c 100644 --- a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml @@ -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 }} diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index 26b257fab..71f672f21 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -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 ##