Skip to content

Commit

Permalink
set MountConfig capabilities for all in-tree drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed May 20, 2020
1 parent e92ed1e commit 60d9d60
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions drivers/docker/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ var (
drivers.NetIsolationModeTask,
},
MustInitiateNetwork: true,
MountConfigs: drivers.MountConfigSupportAll,
}
)

Expand Down
1 change: 1 addition & 0 deletions drivers/exec/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ var (
drivers.NetIsolationModeHost,
drivers.NetIsolationModeGroup,
},
MountConfigs: drivers.MountConfigSupportAll,
}
)

Expand Down
2 changes: 2 additions & 0 deletions drivers/java/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ var (
drivers.NetIsolationModeHost,
drivers.NetIsolationModeGroup,
},
MountConfigs: drivers.MountConfigSupportNone,
}

_ drivers.DriverPlugin = (*Driver)(nil)
Expand All @@ -95,6 +96,7 @@ var (
func init() {
if runtime.GOOS == "linux" {
capabilities.FSIsolation = drivers.FSIsolationChroot
capabilities.MountConfigs = drivers.MountConfigSupportAll
}
}

Expand Down
7 changes: 4 additions & 3 deletions drivers/mock/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,10 @@ func NewMockDriver(logger hclog.Logger) drivers.DriverPlugin {
logger = logger.Named(pluginName)

capabilities := &drivers.Capabilities{
SendSignals: true,
Exec: true,
FSIsolation: drivers.FSIsolationNone,
SendSignals: true,
Exec: true,
FSIsolation: drivers.FSIsolationNone,
MountConfigs: drivers.MountConfigSupportNone,
}

return &Driver{
Expand Down
7 changes: 4 additions & 3 deletions drivers/qemu/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ var (
// capabilities is returned by the Capabilities RPC and indicates what
// optional features this driver supports
capabilities = &drivers.Capabilities{
SendSignals: false,
Exec: false,
FSIsolation: drivers.FSIsolationImage,
SendSignals: false,
Exec: false,
FSIsolation: drivers.FSIsolationImage,
MountConfigs: drivers.MountConfigSupportNone,
}

_ drivers.DriverPlugin = (*Driver)(nil)
Expand Down
1 change: 1 addition & 0 deletions drivers/rawexec/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ var (
drivers.NetIsolationModeHost,
drivers.NetIsolationModeGroup,
},
MountConfigs: drivers.MountConfigSupportNone,
}
)

Expand Down

0 comments on commit 60d9d60

Please sign in to comment.