From 2b294a6b39fff6551c45ddc8a848f4bfd442f8ca Mon Sep 17 00:00:00 2001 From: Matt Oswalt Date: Tue, 19 Mar 2019 20:47:16 -0700 Subject: [PATCH 1/2] Setting proper permissions on copied lesson dir, using config'd location Signed-off-by: Matt Oswalt --- scheduler/scheduler.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scheduler/scheduler.go b/scheduler/scheduler.go index dbe1b919..31ecf4cc 100644 --- a/scheduler/scheduler.go +++ b/scheduler/scheduler.go @@ -210,15 +210,14 @@ func (ls *LessonScheduler) getVolumesConfiguration() ([]corev1.Volume, []corev1. Name: "copy-local-files", Image: "bash", Command: []string{ - "cp", + "bash", }, Args: []string{ - "-r", - "/antidote-ro/lessons/", - "/antidote", - // "-r", - // fmt.Sprintf("%s-ro/*", ls.SyringeConfig.LessonRepoDir), - // ls.SyringeConfig.LessonRepoDir, + "-c", + fmt.Sprintf("cp -r %s-ro/lessons/ %s && adduser -D antidote && chown -R antidote:antidote %s", + ls.SyringeConfig.LessonRepoDir, + ls.SyringeConfig.LessonRepoDir, + ls.SyringeConfig.LessonRepoDir), }, VolumeMounts: []corev1.VolumeMount{ { From 7ce851ac5ac8aa57b1e3dcbcdf6d045abd7cee02 Mon Sep 17 00:00:00 2001 From: Matt Oswalt Date: Tue, 19 Mar 2019 20:58:10 -0700 Subject: [PATCH 2/2] updated changelog Signed-off-by: Matt Oswalt --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e84f5f5..be21ba3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Removed subnet requirement in lesson defs [#88](https://github.com/nre-learning/syringe/pull/88) - Added validation for making sure configs are present for each stage and device [#89](https://github.com/nre-learning/syringe/pull/89) - Add version to build info, share with syrctl [#90](https://github.com/nre-learning/syringe/pull/90) +- Setting proper permissions on copied lesson dir, using config'd location [#92](https://github.com/nre-learning/syringe/pull/92) ## v0.3.0 - February 11, 2019