Share runner's working directory with docker sidecar
@@ -281,6 +281,10 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
Env: env,
EnvFrom: runner.Spec.EnvFrom,
VolumeMounts: []corev1.VolumeMount{
+ {
+ Name: "work",
+ MountPath: "/runner/_work",
+ },
{
Name: "docker",
MountPath: "/var/run",
@@ -295,6 +299,10 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
Name: "docker",
Image: r.DockerImage,
VolumeMounts: []corev1.VolumeMount{
+ {
+ Name: "work",
+ MountPath: "/runner/_work",
+ },
{
Name: "docker",
MountPath: "/var/run",
@@ -306,7 +314,13 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
},
},
Volumes: []corev1.Volume{
- corev1.Volume{
+ {
+ Name: "work",
+ VolumeSource: corev1.VolumeSource{
+ EmptyDir: &corev1.EmptyDirVolumeSource{},
+ },
+ },
+ {
Name: "docker",
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{},
