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

@@ -81,7 +81,7 @@ func NetworkBackend(store storage.Store, conf *config.Config, syslog bool) (type
NetworkRunDir: runDir,
NetavarkBinary: netavarkBin,
AardvarkBinary: aardvarkBin,
PluginDirs: conf.Network.NetavarkPluginDirs,
PluginDirs: conf.Network.NetavarkPluginDirs.Get(),
DefaultNetwork: conf.Network.DefaultNetwork,
DefaultSubnet: conf.Network.DefaultSubnet,
DefaultsubnetPools: conf.Network.DefaultSubnetPools,
@@ -181,7 +181,7 @@ func getCniInterface(conf *config.Config) (types.ContainerNetwork, error) {
}
return cni.NewCNINetworkInterface(&cni.InitConfig{
CNIConfigDir: confDir,
CNIPluginDirs: conf.Network.CNIPluginDirs,
CNIPluginDirs: conf.Network.CNIPluginDirs.Get(),
RunDir: conf.Engine.TmpDir,
DefaultNetwork: conf.Network.DefaultNetwork,
DefaultSubnet: conf.Network.DefaultSubnet,

View File

@@ -84,7 +84,7 @@ func Setup(opts *SetupOptions) error {
}
// first append options set in the config
cmdArgs = append(cmdArgs, opts.Config.Network.PastaOptions...)
cmdArgs = append(cmdArgs, opts.Config.Network.PastaOptions.Get()...)
// then append the ones that were set on the cli
cmdArgs = append(cmdArgs, opts.ExtraOptions...)

View File

@@ -124,8 +124,8 @@ func checkSlirpFlags(path string) (*slirpFeatures, error) {
}
func parseNetworkOptions(config *config.Config, extraOptions []string) (*networkOptions, error) {
options := make([]string, 0, len(config.Engine.NetworkCmdOptions)+len(extraOptions))
options = append(options, config.Engine.NetworkCmdOptions...)
options := make([]string, 0, len(config.Engine.NetworkCmdOptions.Get())+len(extraOptions))
options = append(options, config.Engine.NetworkCmdOptions.Get()...)
options = append(options, extraOptions...)
opts := &networkOptions{
// overwrite defaults