Skip to content

Commit

Permalink
Fix wrong legacy config mount (apache#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
kezhenxu94 authored Nov 17, 2023
1 parent e651c38 commit c281699
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
23 changes: 15 additions & 8 deletions chart/skywalking/templates/oap-init.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chart/skywalking/templates/satellite-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c281699

Please sign in to comment.