This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch cm
in repository https://gitbox.apache.org/repos/asf/skywalking-helm.git

commit af823f1277115e44bf87026ff62da2021fb1cb93
Author: kezhenxu94 <[email protected]>
AuthorDate: Fri Nov 17 10:52:50 2023 +0800

    Fix wrong legacy config mount
---
 chart/skywalking/templates/oap-init.job.yaml       | 23 ++++++++++++++--------
 .../skywalking/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

Reply via email to