Skip to content

Commit

Permalink
Add another subpath level to values.yaml oap config override (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScribblerCoder authored Dec 4, 2023
1 parent c281699 commit dac1606
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
9 changes: 8 additions & 1 deletion chart/skywalking/templates/oap-cm-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
10 changes: 9 additions & 1 deletion chart/skywalking/templates/oap-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions chart/skywalking/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dac1606

Please sign in to comment.