mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
HostVolumeConfig: Source -> Path
This commit is contained in:
@@ -78,7 +78,7 @@ func (h *volumeHook) hostVolumeMountConfigurations(taskMounts []*structs.VolumeM
|
||||
}
|
||||
|
||||
mcfg := &drivers.MountConfig{
|
||||
HostPath: hostVolume.Source,
|
||||
HostPath: hostVolume.Path,
|
||||
TaskPath: m.Destination,
|
||||
Readonly: hostVolume.ReadOnly || req.ReadOnly || m.ReadOnly,
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ var basicConfig = &Config{
|
||||
NoHostUUID: helper.BoolToPtr(false),
|
||||
DisableRemoteExec: true,
|
||||
HostVolumes: []*structs.ClientHostVolumeConfig{
|
||||
{Name: "tmp", Source: "/tmp"},
|
||||
{Name: "tmp", Path: "/tmp"},
|
||||
},
|
||||
},
|
||||
Server: &ServerConfig{
|
||||
|
||||
2
command/agent/testdata/basic.hcl
vendored
2
command/agent/testdata/basic.hcl
vendored
@@ -91,7 +91,7 @@ client {
|
||||
disable_remote_exec = true
|
||||
|
||||
host_volume "tmp" {
|
||||
source = "/tmp"
|
||||
path = "/tmp"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
command/agent/testdata/basic.json
vendored
2
command/agent/testdata/basic.json
vendored
@@ -55,7 +55,7 @@
|
||||
{
|
||||
"tmp": [
|
||||
{
|
||||
"source": "/tmp"
|
||||
"path": "/tmp"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ const (
|
||||
// ClientHostVolumeConfig is used to configure access to host paths on a Nomad Client
|
||||
type ClientHostVolumeConfig struct {
|
||||
Name string `hcl:",key"`
|
||||
Source string `hcl:"source"`
|
||||
Path string `hcl:"path"`
|
||||
ReadOnly bool `hcl:"read_only"`
|
||||
Hidden bool `hcl:"hidden"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user