-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Use rsync to copy pack contents #415
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
* Stop generating the DataStore Secret (#385) and checksum labels (#391) when existing secret provided or disabled (by @bmarick) | ||
* 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) | ||
|
||
## v1.0.0 | ||
* Bump to latest CircleCI orb versions ([email protected] and [email protected] by @ZoeLeah) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -343,9 +343,14 @@ Merge packs and virtualenvs from st2 with those from st2packs images | |
command: | ||
- 'sh' | ||
- '-ec' | ||
- | | ||
/bin/cp -aR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared && | ||
/bin/cp -aR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared | ||
- > | ||
if command rsync; then | ||
rsync -a /opt/stackstorm/packs/. /opt/stackstorm/packs-shared && | ||
rsync -a /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared; | ||
else | ||
/bin/cp -aR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Of these we need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I'll push a commit that switches to |
||
/bin/cp -aR /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. */}} | ||
securityContext: {{- toYaml . | nindent 8 }} | ||
|
@@ -365,9 +370,14 @@ Merge packs and virtualenvs from st2 with those from st2packs images | |
command: | ||
- 'sh' | ||
- '-ec' | ||
- | | ||
/bin/cp -aR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared && | ||
/bin/cp -aR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared | ||
- > | ||
if command rsync; then | ||
rsync -a /opt/stackstorm/packs/. /opt/stackstorm/packs-shared && | ||
rsync -a /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 | ||
fi | ||
{{- with .Values.st2actionrunner.securityContext | default .Values.securityContext }} | ||
{{/* st2actionrunner is likely the most permissive so use that if defined. */}} | ||
securityContext: {{- toYaml . | nindent 8 }} | ||
|
@@ -386,8 +396,12 @@ Merge packs and virtualenvs from st2 with those from st2packs images | |
command: | ||
- 'sh' | ||
- '-ec' | ||
- | | ||
/bin/cp -aR /opt/stackstorm/configs/. /opt/stackstorm/configs-shared | ||
- > | ||
if command rsync; then | ||
rsync -a /opt/stackstorm/configs/. /opt/stackstorm/configs-shared; | ||
else | ||
/bin/cp -aR /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. */}} | ||
securityContext: {{- toYaml . | nindent 8 }} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-a
is equivalent to-rlptgoD
: https://www.mankier.com/1/rsync#--archive-r
: copy directories recursively-l
: recreate symlinks in destination-p
: permissions-t
: modification times-g
: copy gid (group id) by name-o
: copy oid (owner id) by name-D
: devices (character and block) and specials (sockets, fifos, etc)Of those, I'm confident we need
-rlp
or-rlE
(where-E
is short for--executability
, a subset of-p
). Depending on which user is running this, we might also want-og
. The other parts of-a
are probably not necessary.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'll push a commit that switches to
-rlptD
based on rsync...Stealthii:stackstorm-k8s:rsync