Skip to content
Open
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 @@ -113,14 +113,14 @@ spec:
{{- end }}
{{- if and .Values.auth.authentication.enabled (eq .Values.auth.authentication.provider "jwt") }}
-auth-plugin token
-auth-params "{\"token\":\"$brokerClientAuthenticationParameters\"}"
-auth-params "{\"file\":\"$brokerClientAuthenticationParameters\"}"
{{- 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 and .Values.auth.authentication.enabled (eq .Values.auth.authentication.provider "jwt") }} -auth-plugin token -auth-params "{\"token\":\"$brokerClientAuthenticationParameters\"}" {{- end }};
bin/pulsar-detector -service-url {{ template "pulsar.detector.serviceUrl" . }} -webservice-url {{ template "pulsar.detector.webServiceUrl" . }} {{- if and .Values.auth.authentication.enabled (eq .Values.auth.authentication.provider "jwt") }} -auth-plugin token -auth-params "{\"file\":\"$brokerClientAuthenticationParameters\"}" {{- end }};
{{- end }}
{{- if .Values.pulsar_detector.resources }}
resources: {{- toYaml .Values.pulsar_detector.resources | nindent 10 }}
Expand All @@ -132,21 +132,31 @@ spec:
env:
{{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }}
- name: brokerClientAuthenticationParameters
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-token-admin
key: TOKEN
value: "/mnt/token/TOKEN"
{{- end }}
{{- if .Values.pulsar_detector.extraEnv }}
{{- toYaml .Values.pulsar_detector.extraEnv | nindent 10 }}
{{- end }}
{{- if .Values.pulsar_detector.extraVolumeMounts }}
{{- if or .Values.pulsar_detector.extraVolumeMounts (and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled) }}
volumeMounts:
{{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }}
- mountPath: /mnt/token
name: detector-token
readOnly: true
{{- end }}
{{- if .Values.pulsar_detector.extraVolumeMounts }}
{{- toYaml .Values.pulsar_detector.extraVolumeMounts | nindent 10 }}
{{- end }}
{{- end }}
volumes:
- name: tmp
emptyDir: {}
{{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }}
- name: detector-token
secret:
secretName: {{ .Release.Name }}-token-admin
defaultMode: 420
{{- end }}
{{- if .Values.pulsar_detector.extraVolumes }}
{{- toYaml .Values.pulsar_detector.extraVolumes | nindent 8 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ spec:
{{- end }}
{{- if and .Values.auth.authentication.enabled (eq .Values.auth.authentication.provider "jwt") }}
-auth-plugin token
-auth-params "{\"token\":\"$brokerClientAuthenticationParameters\"}"
-auth-params "{\"file\":\"$brokerClientAuthenticationParameters\"}"
{{- 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 and .Values.auth.authentication.enabled (eq .Values.auth.authentication.provider "jwt") }} -auth-plugin token -auth-params "{\"token\":\"$brokerClientAuthenticationParameters\"}" {{- end }};
bin/pulsar-detector -service-url {{ template "pulsar.detector.serviceUrl" . }} -webservice-url {{ template "pulsar.detector.webServiceUrl" . }} {{- if and .Values.auth.authentication.enabled (eq .Values.auth.authentication.provider "jwt") }} -auth-plugin token -auth-params "{\"file\":\"$brokerClientAuthenticationParameters\"}" {{- end }};
{{- end }}
{{- if .Values.pulsar_detector.resources }}
resources: {{- toYaml .Values.pulsar_detector.resources | nindent 10 }}
Expand All @@ -139,21 +139,31 @@ spec:
{{- end }}
{{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }}
- name: brokerClientAuthenticationParameters
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-token-admin
key: TOKEN
value: "/mnt/token/TOKEN"
{{- end }}
{{- if .Values.pulsar_detector.extraEnv }}
{{- toYaml .Values.pulsar_detector.extraEnv | nindent 10 }}
{{- end }}
{{- if .Values.pulsar_detector.extraVolumeMounts }}
{{- if or .Values.pulsar_detector.extraVolumeMounts (and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled) }}
volumeMounts:
{{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }}
- mountPath: /mnt/token
name: detector-token
readOnly: true
{{- end }}
{{- if .Values.pulsar_detector.extraVolumeMounts }}
{{- toYaml .Values.pulsar_detector.extraVolumeMounts | nindent 10 }}
{{- end }}
{{- end }}
volumes:
- name: tmp
emptyDir: {}
{{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }}
- name: detector-token
secret:
secretName: {{ .Release.Name }}-token-admin
defaultMode: 420
{{- end }}
{{- if .Values.pulsar_detector.extraVolumes }}
{{- toYaml .Values.pulsar_detector.extraVolumes | nindent 8 }}
{{- end }}
Expand Down
Loading