pkg/config: turn NetavarkPluginDirs into attributedstring.Slice
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
parent
67a73c7cc6
commit
5fb9ed7f84
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -565,7 +565,7 @@ type NetworkConfig struct {
|
|||
CNIPluginDirs attributedstring.Slice `toml:"cni_plugin_dirs,omitempty"`
|
||||
|
||||
// NetavarkPluginDirs is a list of directories which contain netavark plugins.
|
||||
NetavarkPluginDirs []string `toml:"netavark_plugin_dirs,omitempty"`
|
||||
NetavarkPluginDirs attributedstring.Slice `toml:"netavark_plugin_dirs,omitempty"`
|
||||
|
||||
// DefaultNetwork is the network name of the default network
|
||||
// to attach pods to.
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ image_copy_tmp_dir="storage"`
|
|||
gomega.Expect(defaultConfig.Containers.Mounts.Values).To(gomega.BeEquivalentTo(mounts))
|
||||
gomega.Expect(defaultConfig.Containers.PidsLimit).To(gomega.BeEquivalentTo(2048))
|
||||
gomega.Expect(defaultConfig.Network.CNIPluginDirs.Get()).To(gomega.Equal(pluginDirs))
|
||||
gomega.Expect(defaultConfig.Network.NetavarkPluginDirs).To(gomega.Equal([]string{"/usr/netavark"}))
|
||||
gomega.Expect(defaultConfig.Network.NetavarkPluginDirs.Get()).To(gomega.Equal([]string{"/usr/netavark"}))
|
||||
gomega.Expect(defaultConfig.Engine.NumLocks).To(gomega.BeEquivalentTo(2048))
|
||||
gomega.Expect(defaultConfig.Engine.OCIRuntimes).To(gomega.Equal(OCIRuntimeMap))
|
||||
gomega.Expect(defaultConfig.Engine.PlatformToOCIRuntime).To(gomega.Equal(PlatformToOCIRuntimeMap))
|
||||
|
|
@ -431,7 +431,7 @@ image_copy_tmp_dir="storage"`
|
|||
gomega.Expect(config.Containers.Env.Values).To(gomega.BeEquivalentTo(envs))
|
||||
gomega.Expect(config.Containers.UserNS).To(gomega.BeEquivalentTo(""))
|
||||
gomega.Expect(config.Network.CNIPluginDirs.Get()).To(gomega.Equal(DefaultCNIPluginDirs))
|
||||
gomega.Expect(config.Network.NetavarkPluginDirs).To(gomega.Equal(DefaultNetavarkPluginDirs))
|
||||
gomega.Expect(config.Network.NetavarkPluginDirs.Get()).To(gomega.Equal(DefaultNetavarkPluginDirs))
|
||||
gomega.Expect(config.Engine.NumLocks).To(gomega.BeEquivalentTo(2048))
|
||||
gomega.Expect(config.Engine.OCIRuntimes["runc"]).To(gomega.Equal(OCIRuntimeMap["runc"]))
|
||||
gomega.Expect(config.Containers.CgroupConf.Values).To(gomega.BeNil())
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ func defaultConfig() (*Config, error) {
|
|||
DefaultRootlessNetworkCmd: "slirp4netns",
|
||||
DNSBindPort: 0,
|
||||
CNIPluginDirs: attributedstring.Slice{Values: DefaultCNIPluginDirs},
|
||||
NetavarkPluginDirs: DefaultNetavarkPluginDirs,
|
||||
NetavarkPluginDirs: attributedstring.Slice{Values: DefaultNetavarkPluginDirs},
|
||||
},
|
||||
Engine: *defaultEngineConfig,
|
||||
Secrets: defaultSecretConfig(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue