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

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


The following commit(s) were added to refs/heads/master by this push:
     new dac1606  Add another subpath level to `values.yaml` oap config 
override (#142)
dac1606 is described below

commit dac1606b3190fd92937e02cc3770c21f66148731
Author: ScribblerCoder <[email protected]>
AuthorDate: Mon Dec 4 03:49:01 2023 +0300

    Add another subpath level to `values.yaml` oap config override (#142)
---
 chart/skywalking/templates/oap-cm-override.yaml |  9 ++++++++-
 chart/skywalking/templates/oap-deployment.yaml  | 10 +++++++++-
 chart/skywalking/values.yaml                    |  4 ++++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/chart/skywalking/templates/oap-cm-override.yaml 
b/chart/skywalking/templates/oap-cm-override.yaml
index 2cf14ad..2e539c1 100644
--- a/chart/skywalking/templates/oap-cm-override.yaml
+++ b/chart/skywalking/templates/oap-cm-override.yaml
@@ -29,9 +29,16 @@ data:
 {{ $config | indent 4 }}
  {{- else }}
   {{- range $subpath, $subconfig := $config }}
+   {{- if typeIs "string" $subconfig }}
  {{ print $path "-" $subpath }}: |
 {{ $subconfig | indent 4 }}
+   {{- else }}
+     {{- range $subsubpath, $subsubconfig := $subconfig }}
+ {{ print $path "-" $subpath "-" $subsubpath }}: |
+{{ $subsubconfig | indent 4 }}
+     {{- end }}
+    {{- end }}
+   {{- end }}
   {{- end }}
  {{- end }}
-{{- end }}
 {{ end }}
diff --git a/chart/skywalking/templates/oap-deployment.yaml 
b/chart/skywalking/templates/oap-deployment.yaml
index b061ca2..be07c41 100644
--- a/chart/skywalking/templates/oap-deployment.yaml
+++ b/chart/skywalking/templates/oap-deployment.yaml
@@ -170,10 +170,18 @@ spec:
             mountPath: /skywalking/config/{{ $path }}
             subPath: {{ $path }}
           {{- else }}
-          {{- range $subpath, $oalContent := $config }}
+          {{- range $subpath, $subconfig := $config }}
+          {{- if typeIs "string" $subconfig }}
           - name: skywalking-oap-override
             mountPath: /skywalking/config/{{ $path }}/{{ $subpath }}
             subPath: {{ print $path "-" $subpath }}
+          {{- else }}
+          {{- range $subsubpath, $subsubconfig := $subconfig }}
+          - name: skywalking-oap-override
+            mountPath: /skywalking/config/{{ $path }}/{{ $subpath }}/{{ 
$subsubpath }}
+            subPath: {{ print $path "-" $subpath "-" $subsubpath }}
+          {{- end }}
+          {{- end }}
           {{- end }}
           {{- end }}
           {{- end }}
diff --git a/chart/skywalking/values.yaml b/chart/skywalking/values.yaml
index a2e2f0a..90c84a1 100644
--- a/chart/skywalking/values.yaml
+++ b/chart/skywalking/values.yaml
@@ -102,6 +102,10 @@ oap:
     #   <Configuration status="DEBUG">
     #     <!-- ... -->
     #   </Configuration>
+    # ui-initialized-templates:
+    #   general:
+    #     general-service.json: |
+    #       [{"id":"General-Service" ... }]
   # When 'dynamicConfig.enabled' set to true, enable oap dynamic configuration 
through k8s configmap,
   # Note: The default configmap data is empty, please refer to the detailed 
documentation 
(https://github.com/apache/skywalking/blob/master/docs/en/setup/backend/dynamic-config.md)
   # Sync period in seconds. Defaults to 60 seconds.

Reply via email to