@@ -50,7 +50,7 @@ func experimentExecution(experimentsDetails *experimentTypes.ExperimentDetails,
50
50
51
51
// Wait till the completion of the helper pod
52
52
// set an upper limit for the waiting time
53
- log .Info ("[Wait]: waiting till the completion of the helper pod" )
53
+ log .Info ("[Wait]: Waiting till the completion of the helper pod" )
54
54
podStatus , err := status .WaitForCompletion (experimentsDetails .ChaosNamespace , appLabel , clients , experimentsDetails .ChaosDuration + experimentsDetails .Timeout , common .GetContainerNames (chaosDetails )... )
55
55
if err != nil || podStatus == "Failed" {
56
56
common .DeleteAllHelperPodBasedOnJobCleanupPolicy (appLabel , chaosDetails , clients )
@@ -90,6 +90,7 @@ func PrepareChaos(experimentsDetails *experimentTypes.ExperimentDetails, clients
90
90
// createHelperPod derive the attributes for helper pod and create the helper pod
91
91
func createHelperPod (experimentsDetails * experimentTypes.ExperimentDetails , clients clients.ClientSets , chaosDetails * types.ChaosDetails , runID string ) error {
92
92
const volumeName = "script-volume"
93
+ const mountPath = "/mnt"
93
94
helperPod := & corev1.Pod {
94
95
ObjectMeta : v1.ObjectMeta {
95
96
GenerateName : experimentsDetails .ExperimentName + "-helper-" ,
@@ -111,14 +112,14 @@ func createHelperPod(experimentsDetails *experimentTypes.ExperimentDetails, clie
111
112
"run" ,
112
113
},
113
114
Args : []string {
114
- experimentsDetails .ScriptPath ,
115
+ mountPath + "/" + experimentsDetails .ScriptSecretKey ,
115
116
"-q" ,
116
117
},
117
118
Resources : chaosDetails .Resources ,
118
119
VolumeMounts : []corev1.VolumeMount {
119
120
{
120
121
Name : volumeName ,
121
- MountPath : experimentsDetails . ScriptPath ,
122
+ MountPath : "/mnt" ,
122
123
},
123
124
},
124
125
},
@@ -127,8 +128,8 @@ func createHelperPod(experimentsDetails *experimentTypes.ExperimentDetails, clie
127
128
{
128
129
Name : volumeName ,
129
130
VolumeSource : corev1.VolumeSource {
130
- HostPath : & corev1.HostPathVolumeSource {
131
- Path : experimentsDetails .ScriptPath ,
131
+ Secret : & corev1.SecretVolumeSource {
132
+ SecretName : experimentsDetails .ScriptSecretName ,
132
133
},
133
134
},
134
135
},
0 commit comments