@@ -343,9 +343,14 @@ Merge packs and virtualenvs from st2 with those from st2packs images
343
343
command:
344
344
- 'sh'
345
345
- '-ec'
346
- - |
347
- /bin/cp -aR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
348
- /bin/cp -aR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared
346
+ - >
347
+ if command rsync; then
348
+ rsync -a /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
349
+ rsync -a /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
350
+ else
351
+ /bin/cp -aR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
352
+ /bin/cp -aR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
353
+ fi
349
354
{ {- with .securityContext | default $.Values.st2actionrunner.securityContext | default $.Values.securityContext } }
350
355
{ {/* st2actionrunner is likely the most permissive so use that if defined. */} }
351
356
securityContext: { {- toYaml . | nindent 8 } }
@@ -365,9 +370,14 @@ Merge packs and virtualenvs from st2 with those from st2packs images
365
370
command:
366
371
- 'sh'
367
372
- '-ec'
368
- - |
369
- /bin/cp -aR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
370
- /bin/cp -aR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared
373
+ - >
374
+ if command rsync; then
375
+ rsync -a /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
376
+ rsync -a /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
377
+ else
378
+ /bin/cp -aR /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
379
+ /bin/cp -aR /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared
380
+ fi
371
381
{ {- with .Values.st2actionrunner.securityContext | default .Values.securityContext } }
372
382
{ {/* st2actionrunner is likely the most permissive so use that if defined. */} }
373
383
securityContext: { {- toYaml . | nindent 8 } }
@@ -386,8 +396,12 @@ Merge packs and virtualenvs from st2 with those from st2packs images
386
396
command:
387
397
- 'sh'
388
398
- '-ec'
389
- - |
390
- /bin/cp -aR /opt/stackstorm/configs/. /opt/stackstorm/configs-shared
399
+ - >
400
+ if command rsync; then
401
+ rsync -a /opt/stackstorm/configs/. /opt/stackstorm/configs-shared;
402
+ else
403
+ /bin/cp -aR /opt/stackstorm/configs/. /opt/stackstorm/configs-shared;
404
+ fi
391
405
{ {- with .Values.st2actionrunner.securityContext | default .Values.securityContext } }
392
406
{ {/* st2actionrunner is likely the most permissive so use that if defined. */} }
393
407
securityContext: { {- toYaml . | nindent 8 } }
0 commit comments