mirror of
https://github.com/harness/drone.git
synced 2025-05-19 02:20:03 +08:00
Update the local volume name to be unique and more descriptive
This commit is contained in:
parent
41ac2992cb
commit
fbdf837f8c
@ -107,7 +107,7 @@ func (s *kubeScheduler) Schedule(ctx context.Context, stage *core.Stage) error {
|
||||
|
||||
var mounts []v1.VolumeMount
|
||||
mount := v1.VolumeMount{
|
||||
Name: "local",
|
||||
Name: name + "-local",
|
||||
MountPath: filepath.Join("/tmp", "drone"),
|
||||
}
|
||||
mounts = append(mounts, mount)
|
||||
@ -115,11 +115,13 @@ func (s *kubeScheduler) Schedule(ctx context.Context, stage *core.Stage) error {
|
||||
var volumes []v1.Volume
|
||||
source := v1.HostPathDirectoryOrCreate
|
||||
volume := v1.Volume{
|
||||
Name: "local",
|
||||
}
|
||||
volume.HostPath = &v1.HostPathVolumeSource{
|
||||
Name: name + "-local",
|
||||
VolumeSource: v1.VolumeSource{
|
||||
HostPath: &v1.HostPathVolumeSource{
|
||||
Path: filepath.Join("/tmp", "drone"),
|
||||
Type: &source,
|
||||
},
|
||||
},
|
||||
}
|
||||
volumes = append(volumes, volume)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user