volume: Add the missing option propagation_mode (#15626)
This commit is contained in:
parent
2fd908f63f
commit
3abb453bd0
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
fix: Add the missing option propagation_mode for volume_mount
|
||||||
|
```
|
|
@ -88,9 +88,10 @@ func (h *volumeHook) hostVolumeMountConfigurations(taskMounts []*structs.VolumeM
|
||||||
}
|
}
|
||||||
|
|
||||||
mcfg := &drivers.MountConfig{
|
mcfg := &drivers.MountConfig{
|
||||||
HostPath: hostVolume.Path,
|
HostPath: hostVolume.Path,
|
||||||
TaskPath: m.Destination,
|
TaskPath: m.Destination,
|
||||||
Readonly: hostVolume.ReadOnly || req.ReadOnly || m.ReadOnly,
|
Readonly: hostVolume.ReadOnly || req.ReadOnly || m.ReadOnly,
|
||||||
|
PropagationMode: m.PropagationMode,
|
||||||
}
|
}
|
||||||
mounts = append(mounts, mcfg)
|
mounts = append(mounts, mcfg)
|
||||||
}
|
}
|
||||||
|
@ -180,9 +181,10 @@ func (h *volumeHook) prepareCSIVolumes(req *interfaces.TaskPrestartRequest, volu
|
||||||
|
|
||||||
for _, m := range mountsForAlias {
|
for _, m := range mountsForAlias {
|
||||||
mcfg := &drivers.MountConfig{
|
mcfg := &drivers.MountConfig{
|
||||||
HostPath: csiMountPoint.Source,
|
HostPath: csiMountPoint.Source,
|
||||||
TaskPath: m.Destination,
|
TaskPath: m.Destination,
|
||||||
Readonly: request.ReadOnly || m.ReadOnly,
|
Readonly: request.ReadOnly || m.ReadOnly,
|
||||||
|
PropagationMode: m.PropagationMode,
|
||||||
}
|
}
|
||||||
mounts = append(mounts, mcfg)
|
mounts = append(mounts, mcfg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ job "docs" {
|
||||||
volume_mount {
|
volume_mount {
|
||||||
volume = "certs"
|
volume = "certs"
|
||||||
destination = "/etc/ssl/certs"
|
destination = "/etc/ssl/certs"
|
||||||
|
propagation_mode = "private"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue