From 59bc0a9eb24e24af3295ba9d8e498e3aa228ed04 Mon Sep 17 00:00:00 2001 From: Guangning E Date: Fri, 6 Jun 2025 08:16:31 +0800 Subject: [PATCH 1/6] Fixed --- .../templates/detector/pulsar-detector-deployment.yaml | 1 + .../templates/detector/pulsar-detector-deployment.yaml | 1 + 2 files changed, 2 insertions(+) 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 fa9515be0..dc364c7d2 100644 --- a/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml @@ -141,6 +141,7 @@ spec: volumeMounts: {{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }} - mountPath: /mnt/token + name: detector-token secretName: {{ .Release.Name }}-token-admin {{- end }} {{- if .Values.pulsar_detector.extraVolumeMounts }} diff --git a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml index 9951554eb..1d67f2acf 100644 --- a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml @@ -148,6 +148,7 @@ spec: volumeMounts: {{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }} - mountPath: /mnt/token + name: detector-token secretName: {{ .Release.Name }}-token-admin {{- end }} {{- if .Values.pulsar_detector.extraVolumeMounts }} From c43462ee81d72255b7eabe822f9e822a31c407d0 Mon Sep 17 00:00:00 2001 From: Guangning E Date: Fri, 6 Jun 2025 08:24:46 +0800 Subject: [PATCH 2/6] Fixed detector token --- .../templates/detector/pulsar-detector-deployment.yaml | 6 ++++++ .../templates/detector/pulsar-detector-deployment.yaml | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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 dc364c7d2..ec2e54550 100644 --- a/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml @@ -151,6 +151,12 @@ spec: 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 }} diff --git a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml index 1d67f2acf..90a4432c6 100644 --- a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml @@ -149,7 +149,7 @@ spec: {{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }} - mountPath: /mnt/token name: detector-token - secretName: {{ .Release.Name }}-token-admin + readOnly: true {{- end }} {{- if .Values.pulsar_detector.extraVolumeMounts }} {{- toYaml .Values.pulsar_detector.extraVolumeMounts | nindent 10 }} @@ -158,6 +158,12 @@ spec: 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 }} From d4cf8759a17ca79397ad4d339628817c5701ee05 Mon Sep 17 00:00:00 2001 From: Guangning E Date: Fri, 6 Jun 2025 08:27:59 +0800 Subject: [PATCH 3/6] Fixed --- .../templates/detector/pulsar-detector-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ec2e54550..dccc4a341 100644 --- a/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml @@ -142,7 +142,7 @@ spec: {{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }} - mountPath: /mnt/token name: detector-token - secretName: {{ .Release.Name }}-token-admin + readOnly: true {{- end }} {{- if .Values.pulsar_detector.extraVolumeMounts }} {{- toYaml .Values.pulsar_detector.extraVolumeMounts | nindent 10 }} From 36203176b127792249286a259de9575f438853a5 Mon Sep 17 00:00:00 2001 From: Guangning E Date: Fri, 6 Jun 2025 08:41:23 +0800 Subject: [PATCH 4/6] Fixed --- .../templates/detector/pulsar-detector-deployment.yaml | 4 ++-- .../templates/detector/pulsar-detector-deployment.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 dccc4a341..ffe448080 100644 --- a/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml @@ -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 $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 $brokerClientAuthenticationParameters {{- end }}; {{- end }} {{- if .Values.pulsar_detector.resources }} resources: {{- toYaml .Values.pulsar_detector.resources | nindent 10 }} diff --git a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml index 90a4432c6..e5cd3aa44 100644 --- a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml @@ -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 $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 $brokerClientAuthenticationParameters {{- end }}; {{- end }} {{- if .Values.pulsar_detector.resources }} resources: {{- toYaml .Values.pulsar_detector.resources | nindent 10 }} From 9e58be2501d59c517db5caa7ed72906964b1a7f7 Mon Sep 17 00:00:00 2001 From: Guangning E Date: Fri, 6 Jun 2025 08:57:13 +0800 Subject: [PATCH 5/6] Fixed --- .../templates/detector/pulsar-detector-deployment.yaml | 2 +- .../templates/detector/pulsar-detector-deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ffe448080..51fc41d90 100644 --- a/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml @@ -132,7 +132,7 @@ spec: env: {{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }} - name: brokerClientAuthenticationParameters - value: "file:///mnt/token/TOKEN" + value: "/mnt/token/TOKEN" {{- end }} {{- if .Values.pulsar_detector.extraEnv }} {{- toYaml .Values.pulsar_detector.extraEnv | nindent 10 }} diff --git a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml index e5cd3aa44..4bba7b731 100644 --- a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml @@ -139,7 +139,7 @@ spec: {{- end }} {{- if and .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled }} - name: brokerClientAuthenticationParameters - value: "file:///mnt/token/TOKEN" + value: "/mnt/token/TOKEN" {{- end }} {{- if .Values.pulsar_detector.extraEnv }} {{- toYaml .Values.pulsar_detector.extraEnv | nindent 10 }} From 69b58f287890038990a2ffcd40fef7699d16e463 Mon Sep 17 00:00:00 2001 From: Guangning E Date: Fri, 6 Jun 2025 09:12:22 +0800 Subject: [PATCH 6/6] Fixed token --- .../templates/detector/pulsar-detector-deployment.yaml | 4 ++-- .../templates/detector/pulsar-detector-deployment.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 55429801c..71e7b173d 100644 --- a/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml @@ -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 }} diff --git a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml index 086d9a15b..b003eb0fb 100644 --- a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml @@ -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 }}