[BUG?]: Create mountpoint for /externals/ (#203)

* runner/controller: Add externals directory mount point

* Runner: Create hack for moving content of /runner/externals/ dir

* Externals dir Mount: mount examples for '__e/node12/bin/node' not found error
This commit is contained in:
Erik Nobel
2020-11-25 01:53:47 +02:00
committed by GitHub
parent 6ce6737f61
commit 4e93879b8f
4 changed files with 21 additions and 3 deletions

View File

@@ -382,12 +382,22 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
},
{
Name: "externals",
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
},
}
pod.Spec.Containers[0].VolumeMounts = []corev1.VolumeMount{
{
Name: "work",
MountPath: "/runner/_work",
},
{
Name: "externals",
MountPath: "/runner/externals",
},
}
pod.Spec.Containers[0].Env = append(pod.Spec.Containers[0].Env, corev1.EnvVar{
Name: "DOCKER_HOST",
@@ -401,6 +411,10 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
Name: "work",
MountPath: "/runner/_work",
},
{
Name: "externals",
MountPath: "/runner/externals",
},
},
Env: []corev1.EnvVar{
{