From 7dfd370fd8f48d8ce503a4a51e83e8387d250020 Mon Sep 17 00:00:00 2001 From: Eric Shen Date: Mon, 30 Oct 2023 21:38:32 +0800 Subject: [PATCH] feat: support extra configurions for the detector (#1115) * feat: support extra configures for detector Signed-off-by: ericsyh * apply to the sn-platform chart Signed-off-by: ericsyh * fix ci Signed-off-by: ericsyh --------- Signed-off-by: ericsyh (cherry picked from commit 0ff96e15ce90eec6858e93d5e558d2ac426a1915) --- .../detector/pulsar-detector-deployment.yaml | 11 +++++++++++ charts/sn-platform-slim/values.yaml | 3 +++ .../detector/pulsar-detector-deployment.yaml | 11 +++++++++++ charts/sn-platform/values.yaml | 3 +++ 4 files changed, 28 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 f8597af15..f9c7ac243 100644 --- a/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform-slim/templates/detector/pulsar-detector-deployment.yaml @@ -127,4 +127,15 @@ spec: name: {{ .Release.Name }}-token-admin key: TOKEN {{- end }} + {{- if .Values.pulsar_detector.extraEnv }} + {{- toYaml .Values.pulsar_detector.extraEnv | nindent 10 }} + {{- end }} + {{- if .Values.pulsar_detector.extraVolumeMounts }} + volumeMounts: + {{- toYaml .Values.pulsar_detector.extraVolumeMounts | nindent 10 }} + {{- end }} + {{- if .Values.pulsar_detector.extraVolumes }} + volumes: + {{- toYaml .Values.pulsar_detector.extraVolumes | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sn-platform-slim/values.yaml b/charts/sn-platform-slim/values.yaml index 8c8606508..4ca29391a 100644 --- a/charts/sn-platform-slim/values.yaml +++ b/charts/sn-platform-slim/values.yaml @@ -1396,6 +1396,9 @@ pulsar_detector: limits: {} # memory: "1Gi" # cpu: "0.4" + extraVolumes: [] + extraVolumeMounts: [] + extraEnv: [] ## 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 b45f2aaf0..4913186f2 100644 --- a/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml +++ b/charts/sn-platform/templates/detector/pulsar-detector-deployment.yaml @@ -134,4 +134,15 @@ spec: name: {{ .Release.Name }}-token-admin key: TOKEN {{- end }} + {{- if .Values.pulsar_detector.extraEnv }} + {{- toYaml .Values.pulsar_detector.extraEnv | nindent 10 }} + {{- end }} + {{- if .Values.pulsar_detector.extraVolumeMounts }} + volumeMounts: + {{- toYaml .Values.pulsar_detector.extraVolumeMounts | nindent 10 }} + {{- end }} + {{- if .Values.pulsar_detector.extraVolumes }} + volumes: + {{- toYaml .Values.pulsar_detector.extraVolumes | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index ab3c29dac..bff2a4e2e 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -1471,6 +1471,9 @@ pulsar_detector: limits: {} # memory: "1Gi" # cpu: "0.4" + extraVolumes: [] + extraVolumeMounts: [] + extraEnv: [] ## Proxy service ## templates/pulsar-detector-service.yaml ##