container.conf: support attributed string slices

All `[]string`s in containers.conf have now been migrated to attributed
string slices which require some adjustments in Buildah and Podman.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2023-10-25 14:56:03 +02:00
parent 0242a7439e
commit e966c86d98
65 changed files with 10709 additions and 320 deletions

View File

@ -185,7 +185,7 @@ func WithConmonPath(path string) RuntimeOption {
return fmt.Errorf("must provide a valid path: %w", define.ErrInvalidArg)
}
rt.config.Engine.ConmonPath = []string{path}
rt.config.Engine.ConmonPath.Set([]string{path})
return nil
}
@ -198,8 +198,7 @@ func WithConmonEnv(environment []string) RuntimeOption {
return define.ErrRuntimeFinalized
}
rt.config.Engine.ConmonEnvVars = make([]string, len(environment))
copy(rt.config.Engine.ConmonEnvVars, environment)
rt.config.Engine.ConmonEnvVars.Set(environment)
return nil
}
@ -308,7 +307,7 @@ func WithHooksDir(hooksDirs ...string) RuntimeOption {
}
}
rt.config.Engine.HooksDir = hooksDirs
rt.config.Engine.HooksDir.Set(hooksDirs)
return nil
}
}
@ -410,7 +409,7 @@ func WithCNIPluginDir(dir string) RuntimeOption {
return define.ErrRuntimeFinalized
}
rt.config.Network.CNIPluginDirs = []string{dir}
rt.config.Network.CNIPluginDirs.Set([]string{dir})
return nil
}