Add disable-imex-channel-creation feature flag

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2024-10-14 13:49:47 +02:00
parent bc9180b59d
commit 457d71c170
2 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,9 @@ func doPrestart() {
if cli.LoadKmods {
args = append(args, "--load-kmods")
}
if hook.Features.DisableImexChannelCreation.IsEnabled() {
args = append(args, "--no-create-imex-channels")
}
if cli.NoPivot {
args = append(args, "--no-pivot")
}

View File

@ -18,6 +18,9 @@ package config
// features specifies a set of named features.
type features struct {
// DisableImexChannelCreation ensures that the implicit creation of
// requested IMEX channels is skipped when invoking the nvidia-container-cli.
DisableImexChannelCreation *feature `toml:"disable-imex-channel-creation,omitempty"`
}
//nolint:unused