From af823f1277115e44bf87026ff62da2021fb1cb93 Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Fri, 17 Nov 2023 10:52:50 +0800 Subject: [PATCH] Fix wrong legacy config mount --- chart/skywalking/templates/oap-init.job.yaml | 23 ++++++++++++------- .../templates/satellite-deployment.yaml | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/chart/skywalking/templates/oap-init.job.yaml b/chart/skywalking/templates/oap-init.job.yaml index e804990..613ba71 100644 --- a/chart/skywalking/templates/oap-init.job.yaml +++ b/chart/skywalking/templates/oap-init.job.yaml @@ -83,16 +83,23 @@ spec: - name: {{ $key }} value: {{ $value | quote }} {{- end }} + volumeMounts: - {{- if (.Files.Glob "files/conf.d/oap/**") }} - {{ range $path, $bytes := .Files.Glob "files/conf.d/oap/**" }} - - name: skywalking-oap-override - mountPath: {{ print "/skywalking/config/" ($path | replace "files/conf.d/oap/" "") }} - subPath: {{ $path | replace "files/conf.d/oap/" "" | b64enc | replace "=" "-" }} - {{- end }} - {{- end }} + {{- range $path, $config := .Values.oap.config }} + {{- if typeIs "string" $config }} + - name: skywalking-oap-override + mountPath: /skywalking/config/{{ $path }} + subPath: {{ $path }} + {{- else }} + {{- range $subpath, $oalContent := $config }} + - name: skywalking-oap-override + mountPath: /skywalking/config/{{ $path }}/{{ $subpath }} + subPath: {{ print $path "-" $subpath }} + {{- end }} + {{- end }} + {{- end }} volumes: - {{- if (.Files.Glob "files/conf.d/oap/**") }} + {{- if .Values.oap.config }} - name: skywalking-oap-override configMap: name: {{ template "skywalking.fullname" . }}-oap-cm-override diff --git a/chart/skywalking/templates/satellite-deployment.yaml b/chart/skywalking/templates/satellite-deployment.yaml index 7e01911..8c2c960 100644 --- a/chart/skywalking/templates/satellite-deployment.yaml +++ b/chart/skywalking/templates/satellite-deployment.yaml @@ -136,7 +136,7 @@ spec: {{- end }} volumes: - {{- if (.Files.Glob "files/conf.d/satellite/**") }} + {{- if .Values.satellite.config }} - name: skywalking-satellite-override configMap: name: {{ template "skywalking.fullname" . }}-satellite-cm-override