Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't preserve ownership when copying pack contents #418

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Stop generating the checksum labels for Auth Secret (#392) when existing secret provided or disabled (by @bmarick)
* Use `image.pullPolicy` for all containers including init containers that use `image.utilityImage`. (#397) (by @jk464)
* Use `rsync` to copy pack contents when available, falling back to `cp`. (#414) (by @cognifloyd)
* Support non-root container environments when copying pack contents (#414) (by @Stealthii)

## v1.0.0
* Bump to latest CircleCI orb versions (kubernetes@1.3.1 and helm@3.0.0 by @ZoeLeah)
Expand Down
26 changes: 13 additions & 13 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,12 @@ Merge packs and virtualenvs from st2 with those from st2packs images
- 'sh'
- '-ec'
- >
if command rsync; then
rsync -a /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
rsync -a /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
if hash rsync 2>/dev/null; then
rsync -rlptD /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
rsync -rlptD /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
else
/bin/cp -aR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
/bin/cp -aR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
cp -P --preserve=mode,timestamps,links,xattr /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
cp -P --preserve=mode,timestamps,links,xattr /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
fi
{{- with .securityContext | default $.Values.st2actionrunner.securityContext | default $.Values.securityContext }}
{{/* st2actionrunner is likely the most permissive so use that if defined. */}}
Expand All @@ -371,12 +371,12 @@ Merge packs and virtualenvs from st2 with those from st2packs images
- 'sh'
- '-ec'
- >
if command rsync; then
rsync -a /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
rsync -a /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
if hash rsync 2>/dev/null; then
rsync -rlptD /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
rsync -rlptD /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
else
/bin/cp -aR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
/bin/cp -aR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared
cp -P --preserve=mode,timestamps,links,xattr /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
cp -P --preserve=mode,timestamps,links,xattr /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared
fi
{{- with .Values.st2actionrunner.securityContext | default .Values.securityContext }}
{{/* st2actionrunner is likely the most permissive so use that if defined. */}}
Expand All @@ -397,10 +397,10 @@ Merge packs and virtualenvs from st2 with those from st2packs images
- 'sh'
- '-ec'
- >
if command rsync; then
rsync -a /opt/stackstorm/configs/. /opt/stackstorm/configs-shared;
if hash rsync 2>/dev/null; then
rsync -rlptD /opt/stackstorm/configs/. /opt/stackstorm/configs-shared;
else
/bin/cp -aR /opt/stackstorm/configs/. /opt/stackstorm/configs-shared;
cp -P --preserve=mode,timestamps,links,xattr /opt/stackstorm/configs/. /opt/stackstorm/configs-shared;
fi
{{- with .Values.st2actionrunner.securityContext | default .Values.securityContext }}
{{/* st2actionrunner is likely the most permissive so use that if defined. */}}
Expand Down
Loading