From a2d9f79c7e305bd56f117ea74f9b6ee57a410dfa Mon Sep 17 00:00:00 2001 From: Miguel Duarte Barroso Date: Tue, 30 Aug 2022 11:59:06 +0200 Subject: [PATCH] config, deployment: point to multus socket instead of dir The multus socket by default is named `multus.sock` as can be seen in [0]. [0] - https://github.com/k8snetworkplumbingwg/multus-cni/blob/549808011920e6c6f0dd4b78a75250d865e7c1c9/pkg/server/api/socket.go#L23 Signed-off-by: Miguel Duarte Barroso --- pkg/config/types.go | 4 ++-- pkg/config/types_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/config/types.go b/pkg/config/types.go index 0017c424..fcfdd28d 100644 --- a/pkg/config/types.go +++ b/pkg/config/types.go @@ -13,7 +13,7 @@ const ( // DefaultDynamicNetworksControllerConfigFile is the default path of the config file DefaultDynamicNetworksControllerConfigFile = "/etc/cni/net.d/multus.d/daemon-config.json" containerdSocketPath = "/run/containerd/containerd.sock" - defaultMultusRunDir = "/var/run/multus-cni/" + defaultMultusSocketPath = "/var/run/multus-cni/multus.sock" ) type Multus struct { @@ -41,7 +41,7 @@ func LoadConfig(configPath string) (*Multus, error) { } if daemonNetConf.MultusSocketPath == "" { - daemonNetConf.MultusSocketPath = defaultMultusRunDir + daemonNetConf.MultusSocketPath = defaultMultusSocketPath } if daemonNetConf.CriSocketPath == "" { diff --git a/pkg/config/types_test.go b/pkg/config/types_test.go index a765eb6b..72b02a20 100644 --- a/pkg/config/types_test.go +++ b/pkg/config/types_test.go @@ -61,7 +61,7 @@ var _ = Describe("The dynamic network attachment configuration", func() { ).To( WithTransform(func(multusConfig *Multus) string { return multusConfig.MultusSocketPath - }, Equal(defaultMultusRunDir))) + }, Equal(defaultMultusSocketPath))) }) It("specifies the containerd socket as default", func() {