volume: Add the missing option propagation_mode (#15626)

This commit is contained in:
舍我其谁 2023-01-30 22:32:07 +08:00 committed by GitHub
parent 2fd908f63f
commit 3abb453bd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

3
.changelog/15626.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
fix: Add the missing option propagation_mode for volume_mount
```

View File

@ -91,6 +91,7 @@ func (h *volumeHook) hostVolumeMountConfigurations(taskMounts []*structs.VolumeM
HostPath: hostVolume.Path,
TaskPath: m.Destination,
Readonly: hostVolume.ReadOnly || req.ReadOnly || m.ReadOnly,
PropagationMode: m.PropagationMode,
}
mounts = append(mounts, mcfg)
}
@ -183,6 +184,7 @@ func (h *volumeHook) prepareCSIVolumes(req *interfaces.TaskPrestartRequest, volu
HostPath: csiMountPoint.Source,
TaskPath: m.Destination,
Readonly: request.ReadOnly || m.ReadOnly,
PropagationMode: m.PropagationMode,
}
mounts = append(mounts, mcfg)
}

View File

@ -26,6 +26,7 @@ job "docs" {
volume_mount {
volume = "certs"
destination = "/etc/ssl/certs"
propagation_mode = "private"
}
}
}