Skip to content

Commit

Permalink
Do not preserve file attributes during pack file copy
Browse files Browse the repository at this point in the history
Allows copying of files in non-root containers
  • Loading branch information
Stealthii authored and jk464 committed May 8, 2024
1 parent c54dbdb commit 30ed80d
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,9 @@ Merge packs and virtualenvs from st2 with those from st2packs images
- 'sh'
- '-ec'
- |
/bin/cp -aR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
/bin/cp -aR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared
{{- with .securityContext | default $.Values.st2actionrunner.securityContext | default $.Values.securityContext }}
{{/* st2actionrunner is likely the most permissive so use that if defined. */}}
/bin/cp -dR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
/bin/cp -dR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared
{{- with $.Values.securityContext }}
securityContext: {{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
Expand All @@ -372,10 +371,9 @@ Merge packs and virtualenvs from st2 with those from st2packs images
- 'sh'
- '-ec'
- |
/bin/cp -aR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
/bin/cp -aR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared
{{- with .Values.st2actionrunner.securityContext | default .Values.securityContext }}
{{/* st2actionrunner is likely the most permissive so use that if defined. */}}
/bin/cp -dR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
/bin/cp -dR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared
{{- with .Values.securityContext }}
securityContext: {{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
Expand All @@ -393,9 +391,8 @@ Merge packs and virtualenvs from st2 with those from st2packs images
- 'sh'
- '-ec'
- |
/bin/cp -aR /opt/stackstorm/configs/. /opt/stackstorm/configs-shared
{{- with .Values.st2actionrunner.securityContext | default .Values.securityContext }}
{{/* st2actionrunner is likely the most permissive so use that if defined. */}}
/bin/cp -dR /opt/stackstorm/configs/. /opt/stackstorm/configs-shared
{{- with .Values.securityContext }}
securityContext: {{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
Expand Down

0 comments on commit 30ed80d

Please sign in to comment.