From 1335f15bf821a40a7cd71448fa805f0be265afcc Mon Sep 17 00:00:00 2001 From: mrproliu <741550557@qq.com> Date: Wed, 3 Jul 2024 08:39:51 +0000 Subject: [PATCH] Adding secret mount in the OAP (#154) --- CHANGES.md | 1 + chart/skywalking/templates/oap-deployment.yaml | 15 +++++++++++++++ chart/skywalking/templates/oap-init.job.yaml | 16 ++++++++++++++++ chart/skywalking/values.yaml | 6 ++++++ 4 files changed, 38 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 82e4c3e..4d560e2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,7 @@ Release Notes. - Bump up BanyanDB Helm version to 0.2.0. - Bump up OAP and UI to 10.0.0. - Make release process work with Linux. +- Support setting `secretMounts` in OAP. 4.5.0 ------------------ diff --git a/chart/skywalking/templates/oap-deployment.yaml b/chart/skywalking/templates/oap-deployment.yaml index be07c41..7b32bbb 100644 --- a/chart/skywalking/templates/oap-deployment.yaml +++ b/chart/skywalking/templates/oap-deployment.yaml @@ -185,6 +185,13 @@ spec: {{- end }} {{- end }} {{- end }} + {{- range .Values.oap.secretMounts }} + - name: {{ .name }} + mountPath: {{ .path }} + {{- if .subPath }} + subPath: {{ .subPath }} + {{- end }} + {{- end }} volumes: {{- if .Values.oap.config }} @@ -192,3 +199,11 @@ spec: configMap: name: {{ template "skywalking.fullname" . }}-oap-cm-override {{- end }} + {{- range .Values.oap.secretMounts }} + - name: {{ .name }} + secret: + secretName: {{ .secretName }} + {{- if .defaultMode }} + defaultMode: {{ .defaultMode }} + {{- end }} + {{- end }} diff --git a/chart/skywalking/templates/oap-init.job.yaml b/chart/skywalking/templates/oap-init.job.yaml index 613ba71..3b1a22d 100644 --- a/chart/skywalking/templates/oap-init.job.yaml +++ b/chart/skywalking/templates/oap-init.job.yaml @@ -98,9 +98,25 @@ spec: {{- end }} {{- end }} {{- end }} + {{- range .Values.oap.secretMounts }} + - name: {{ .name }} + mountPath: {{ .path }} + {{- if .subPath }} + subPath: {{ .subPath }} + {{- end }} + {{- end }} + volumes: {{- if .Values.oap.config }} - name: skywalking-oap-override configMap: name: {{ template "skywalking.fullname" . }}-oap-cm-override {{- end }} + {{- range .Values.oap.secretMounts }} + - name: {{ .name }} + secret: + secretName: {{ .secretName }} + {{- if .defaultMode }} + defaultMode: {{ .defaultMode }} + {{- end }} + {{- end }} diff --git a/chart/skywalking/values.yaml b/chart/skywalking/values.yaml index 8e2d426..cd039bd 100644 --- a/chart/skywalking/values.yaml +++ b/chart/skywalking/values.yaml @@ -126,6 +126,12 @@ oap: # silence-period: 5 # Response time of service {name} is more than 1000ms in 3 minutes of last 10 minutes. + # A list of secrets and their paths to mount inside the pod + secretMounts: [] +# - name: elastic-certificates +# secretName: elastic-certificates +# path: /usr/share/elasticsearch/config/certs + ui: name: ui replicas: 1