Skip to content

Commit 208d0ad

Browse files
author
Andrei Skomorkhov
authored
Merge pull request #39 from rsimkin/fix/pass-tmp-volume-to-pod
Mount /dev/shm fix #38
2 parents d06473a + 59eb6a6 commit 208d0ad

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pool/strategy/kubernetes/provider.go

+12
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ func (p *kubDnsProvider) Create(podName string, nodeParams nodeParams) (nodeAddr
3535
container.Name = podName
3636
container.Image = nodeParams.Image
3737
port, err := strconv.Atoi(nodeParams.Port)
38+
volume := apiV1.Volume{
39+
Name: "dshm",
40+
VolumeSource: apiV1.VolumeSource{
41+
EmptyDir: &apiV1.EmptyDirVolumeSource{},
42+
},
43+
}
44+
pod.Spec.Volumes = append(pod.Spec.Volumes, volume)
45+
volumeMount := apiV1.VolumeMount{
46+
Name: "dshm",
47+
MountPath: "/dev/shm",
48+
}
49+
container.VolumeMounts = append(container.VolumeMounts, volumeMount)
3850
if err != nil {
3951
return "", errors.New("convert to int nodeParams.Port, " + err.Error())
4052
}

0 commit comments

Comments
 (0)