HostVolumeConfig: Source -> Path

This commit is contained in:
Danielle Lancashire
2019-08-01 11:55:42 +02:00
parent af5d42c058
commit 7b7be83aef
5 changed files with 5 additions and 5 deletions

View File

@@ -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,
}

View File

@@ -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{

View File

@@ -91,7 +91,7 @@ client {
disable_remote_exec = true
host_volume "tmp" {
source = "/tmp"
path = "/tmp"
}
}

View File

@@ -55,7 +55,7 @@
{
"tmp": [
{
"source": "/tmp"
"path": "/tmp"
}
]
}

View File

@@ -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"`
}