From 2bf8dae9a8e244fd376fe3122c79341e5bb02466 Mon Sep 17 00:00:00 2001 From: mmirecki Date: Tue, 21 Jun 2022 14:47:04 +0200 Subject: [PATCH 1/5] Fix missing device-info in networks-status annotation for chained plugins --- pkg/types/conf.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/types/conf.go b/pkg/types/conf.go index 36637875c..2a9cd0d87 100644 --- a/pkg/types/conf.go +++ b/pkg/types/conf.go @@ -80,6 +80,8 @@ func LoadDelegateNetConf(bytes []byte, net *NetworkSelectionElement, deviceID st if err != nil { return nil, logging.Errorf("LoadDelegateNetConf: failed to add deviceID in NetConfList bytes: %v", err) } + delegateConf.ResourceName = resourceName + delegateConf.DeviceID = deviceID } if net != nil && net.CNIArgs != nil { bytes, err = addCNIArgsInConfList(bytes, net.CNIArgs) From dc57189cf908f942a820e5bbbc0edab8668b6655 Mon Sep 17 00:00:00 2001 From: Tomofumi Hayashi Date: Tue, 21 Jun 2022 23:39:18 +0900 Subject: [PATCH 2/5] Fix revive error --- cmd/config-generation/kubeconfig.go | 1 + cmd/controller/main.go | 2 ++ cmd/main.go | 1 - pkg/checkpoint/doc.go | 17 +++++++++++++++++ pkg/config/doc.go | 17 +++++++++++++++++ pkg/k8sclient/doc.go | 16 ++++++++++++++++ pkg/kubeletclient/doc.go | 17 +++++++++++++++++ pkg/logging/doc.go | 16 ++++++++++++++++ pkg/multus/doc.go | 17 +++++++++++++++++ pkg/netutils/doc.go | 16 ++++++++++++++++ pkg/testing/doc.go | 16 ++++++++++++++++ pkg/types/doc.go | 16 ++++++++++++++++ 12 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 pkg/checkpoint/doc.go create mode 100644 pkg/config/doc.go create mode 100644 pkg/k8sclient/doc.go create mode 100644 pkg/kubeletclient/doc.go create mode 100644 pkg/logging/doc.go create mode 100644 pkg/multus/doc.go create mode 100644 pkg/netutils/doc.go create mode 100644 pkg/testing/doc.go create mode 100644 pkg/types/doc.go diff --git a/cmd/config-generation/kubeconfig.go b/cmd/config-generation/kubeconfig.go index f1199097e..2eeae5217 100644 --- a/cmd/config-generation/kubeconfig.go +++ b/cmd/config-generation/kubeconfig.go @@ -13,6 +13,7 @@ // limitations under the License. // +// this generates kubeconfig file for multus based on service account package main import ( diff --git a/cmd/controller/main.go b/cmd/controller/main.go index 634bef5b8..ee2c533f3 100644 --- a/cmd/controller/main.go +++ b/cmd/controller/main.go @@ -13,6 +13,8 @@ // limitations under the License. // +// this is daemonized entrypoint process. which watches master config +// and generate multus CNI config package main import ( diff --git a/cmd/main.go b/cmd/main.go index 79e69f82c..294e028e6 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -15,7 +15,6 @@ // This is a "Multi-plugin".The delegate concept referred from CNI project // It reads other plugin netconf, and then invoke them, e.g. // flannel or sriov plugin. - package main import ( diff --git a/pkg/checkpoint/doc.go b/pkg/checkpoint/doc.go new file mode 100644 index 000000000..b4c9052d9 --- /dev/null +++ b/pkg/checkpoint/doc.go @@ -0,0 +1,17 @@ +// Copyright (c) 2021 Multus Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package checkpoint is the package that contains the libraries that manipulates kubelet's +// checkpoint API +package checkpoint diff --git a/pkg/config/doc.go b/pkg/config/doc.go new file mode 100644 index 000000000..54de07fe9 --- /dev/null +++ b/pkg/config/doc.go @@ -0,0 +1,17 @@ +// Copyright (c) 2021 Multus Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package config is the package that contains multus cni config related +// utilities. +package config diff --git a/pkg/k8sclient/doc.go b/pkg/k8sclient/doc.go new file mode 100644 index 000000000..9c8df4b10 --- /dev/null +++ b/pkg/k8sclient/doc.go @@ -0,0 +1,16 @@ +// Copyright (c) 2021 Multus Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package k8sclient is the package that contains the Kubernetes client libraries. +package k8sclient diff --git a/pkg/kubeletclient/doc.go b/pkg/kubeletclient/doc.go new file mode 100644 index 000000000..2b020cb3f --- /dev/null +++ b/pkg/kubeletclient/doc.go @@ -0,0 +1,17 @@ +// Copyright (c) 2021 Multus Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package kubeletclient is the package that contains the kubelet's libraries that +// controls podresource API in kubelet +package kubeletclient diff --git a/pkg/logging/doc.go b/pkg/logging/doc.go new file mode 100644 index 000000000..1e3fe3fec --- /dev/null +++ b/pkg/logging/doc.go @@ -0,0 +1,16 @@ +// Copyright (c) 2021 Multus Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package logging is the package that contains logging library. +package logging diff --git a/pkg/multus/doc.go b/pkg/multus/doc.go new file mode 100644 index 000000000..a2c83e62a --- /dev/null +++ b/pkg/multus/doc.go @@ -0,0 +1,17 @@ +// Copyright (c) 2021 Multus Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package multus is the package that contains main multus function, which +// manipulates CNI request for delegate plugins. +package multus diff --git a/pkg/netutils/doc.go b/pkg/netutils/doc.go new file mode 100644 index 000000000..77b1054f4 --- /dev/null +++ b/pkg/netutils/doc.go @@ -0,0 +1,16 @@ +// Copyright (c) 2021 Multus Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package netutils is the package that contains network related utilities. +package netutils diff --git a/pkg/testing/doc.go b/pkg/testing/doc.go new file mode 100644 index 000000000..828906588 --- /dev/null +++ b/pkg/testing/doc.go @@ -0,0 +1,16 @@ +// Copyright (c) 2021 Multus Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package testing is the package that contains unit-test libraries. +package testing diff --git a/pkg/types/doc.go b/pkg/types/doc.go new file mode 100644 index 000000000..010cbe129 --- /dev/null +++ b/pkg/types/doc.go @@ -0,0 +1,16 @@ +// Copyright (c) 2021 Multus Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package types contains common types in the multus. +package types From 107624ccffe4671a023b4b4d9bff5797188af812 Mon Sep 17 00:00:00 2001 From: Tomofumi Hayashi Date: Fri, 7 Jan 2022 22:47:23 +0900 Subject: [PATCH 3/5] Use *[]net.IP for 'default-route' network selection element. --- pkg/multus/multus.go | 8 ++--- pkg/multus/multus_test.go | 2 +- pkg/types/conf.go | 70 ++++++++++++++++++++++----------------- pkg/types/conf_test.go | 68 +++++++++++++++++++++++++++++++++++++ pkg/types/types.go | 4 +-- 5 files changed, 114 insertions(+), 38 deletions(-) diff --git a/pkg/multus/multus.go b/pkg/multus/multus.go index 37140bbf0..340536dce 100644 --- a/pkg/multus/multus.go +++ b/pkg/multus/multus.go @@ -644,7 +644,7 @@ func CmdAdd(args *skel.CmdArgs, exec invoke.Exec, kubeClient *k8s.ClientInfo) (c // https://docs.google.com/document/d/1Ny03h6IDVy_e_vmElOqR7UdTPAG_RNydhVE1Kx54kFQ (4.1.2.1.9) // the list can be empty; if it is, we'll assume the CNI's config for the default gateway holds, // else we'll update the defaultgateway to the one specified. - if delegate.GatewayRequest != nil && delegate.GatewayRequest[0] != nil { + if delegate.GatewayRequest != nil && len(*delegate.GatewayRequest) != 0 { deleteV4gateway = true adddefaultgateway = true logging.Debugf("Detected gateway override on interface %v to %v", ifName, delegate.GatewayRequest) @@ -660,7 +660,7 @@ func CmdAdd(args *skel.CmdArgs, exec invoke.Exec, kubeClient *k8s.ClientInfo) (c // https://docs.google.com/document/d/1Ny03h6IDVy_e_vmElOqR7UdTPAG_RNydhVE1Kx54kFQ (4.1.2.1.9) // the list can be empty; if it is, we'll assume the CNI's config for the default gateway holds, // else we'll update the defaultgateway to the one specified. - if delegate.GatewayRequest != nil && delegate.GatewayRequest[0] != nil { + if delegate.GatewayRequest != nil && len(*delegate.GatewayRequest) != 0 { deleteV6gateway = true adddefaultgateway = true logging.Debugf("Detected gateway override on interface %v to %v", ifName, delegate.GatewayRequest) @@ -681,11 +681,11 @@ func CmdAdd(args *skel.CmdArgs, exec invoke.Exec, kubeClient *k8s.ClientInfo) (c // Here we'll set the default gateway which specified in `default-route` network selection if adddefaultgateway { - err = netutils.SetDefaultGW(args, ifName, delegate.GatewayRequest) + err = netutils.SetDefaultGW(args, ifName, *delegate.GatewayRequest) if err != nil { return nil, cmdErr(k8sArgs, "error setting default gateway: %v", err) } - err = netutils.AddDefaultGWCache(n.CNIDir, rt, netName, ifName, delegate.GatewayRequest) + err = netutils.AddDefaultGWCache(n.CNIDir, rt, netName, ifName, *delegate.GatewayRequest) if err != nil { return nil, cmdErr(k8sArgs, "error setting default gateway in cache: %v", err) } diff --git a/pkg/multus/multus_test.go b/pkg/multus/multus_test.go index 2e4880a2a..fb1c9bf01 100644 --- a/pkg/multus/multus_test.go +++ b/pkg/multus/multus_test.go @@ -68,7 +68,7 @@ type fakeExec struct { delIndex int chkIndex int expectedDelSkip int - plugins map[string]*fakePlugin + plugins map[string]*fakePlugin } func newFakeExec() *fakeExec { diff --git a/pkg/types/conf.go b/pkg/types/conf.go index 36637875c..74ece8031 100644 --- a/pkg/types/conf.go +++ b/pkg/types/conf.go @@ -60,9 +60,9 @@ func LoadDelegateNetConfList(bytes []byte, delegateConf *DelegateNetConf) error } // LoadDelegateNetConf converts raw CNI JSON into a DelegateNetConf structure -func LoadDelegateNetConf(bytes []byte, net *NetworkSelectionElement, deviceID string, resourceName string) (*DelegateNetConf, error) { +func LoadDelegateNetConf(bytes []byte, netElement *NetworkSelectionElement, deviceID string, resourceName string) (*DelegateNetConf, error) { var err error - logging.Debugf("LoadDelegateNetConf: %s, %v, %s", string(bytes), net, deviceID) + logging.Debugf("LoadDelegateNetConf: %s, %v, %s", string(bytes), netElement, deviceID) delegateConf := &DelegateNetConf{} if err := json.Unmarshal(bytes, &delegateConf.Conf); err != nil { @@ -81,8 +81,8 @@ func LoadDelegateNetConf(bytes []byte, net *NetworkSelectionElement, deviceID st return nil, logging.Errorf("LoadDelegateNetConf: failed to add deviceID in NetConfList bytes: %v", err) } } - if net != nil && net.CNIArgs != nil { - bytes, err = addCNIArgsInConfList(bytes, net.CNIArgs) + if netElement != nil && netElement.CNIArgs != nil { + bytes, err = addCNIArgsInConfList(bytes, netElement.CNIArgs) if err != nil { return nil, logging.Errorf("LoadDelegateNetConf(): failed to add cni-args in NetConfList bytes: %v", err) } @@ -97,45 +97,51 @@ func LoadDelegateNetConf(bytes []byte, net *NetworkSelectionElement, deviceID st delegateConf.ResourceName = resourceName delegateConf.DeviceID = deviceID } - if net != nil && net.CNIArgs != nil { - bytes, err = addCNIArgsInConfig(bytes, net.CNIArgs) + if netElement != nil && netElement.CNIArgs != nil { + bytes, err = addCNIArgsInConfig(bytes, netElement.CNIArgs) if err != nil { return nil, logging.Errorf("LoadDelegateNetConf(): failed to add cni-args in NetConfList bytes: %v", err) } } } - if net != nil { - if net.Name != "" { + if netElement != nil { + if netElement.Name != "" { // Overwrite CNI config name with net-attach-def name - delegateConf.Name = fmt.Sprintf("%s/%s", net.Namespace, net.Name) + delegateConf.Name = fmt.Sprintf("%s/%s", netElement.Namespace, netElement.Name) } - if net.InterfaceRequest != "" { - delegateConf.IfnameRequest = net.InterfaceRequest + if netElement.InterfaceRequest != "" { + delegateConf.IfnameRequest = netElement.InterfaceRequest } - if net.MacRequest != "" { - delegateConf.MacRequest = net.MacRequest + if netElement.MacRequest != "" { + delegateConf.MacRequest = netElement.MacRequest } - if net.IPRequest != nil { - delegateConf.IPRequest = net.IPRequest + if netElement.IPRequest != nil { + delegateConf.IPRequest = netElement.IPRequest } - if net.BandwidthRequest != nil { - delegateConf.BandwidthRequest = net.BandwidthRequest + if netElement.BandwidthRequest != nil { + delegateConf.BandwidthRequest = netElement.BandwidthRequest } - if net.PortMappingsRequest != nil { - delegateConf.PortMappingsRequest = net.PortMappingsRequest + if netElement.PortMappingsRequest != nil { + delegateConf.PortMappingsRequest = netElement.PortMappingsRequest } - if net.GatewayRequest != nil { - delegateConf.GatewayRequest = append(delegateConf.GatewayRequest, net.GatewayRequest...) + if netElement.GatewayRequest != nil { + var list []net.IP + if delegateConf.GatewayRequest != nil { + list = append(*delegateConf.GatewayRequest, *netElement.GatewayRequest...) + } else { + list = *netElement.GatewayRequest + } + delegateConf.GatewayRequest = &list } - if net.InfinibandGUIDRequest != "" { - delegateConf.InfinibandGUIDRequest = net.InfinibandGUIDRequest + if netElement.InfinibandGUIDRequest != "" { + delegateConf.InfinibandGUIDRequest = netElement.InfinibandGUIDRequest } - if net.DeviceID != "" { + if netElement.DeviceID != "" { if deviceID != "" { logging.Debugf("Warning: Both RuntimeConfig and ResourceMap provide deviceID. Ignoring RuntimeConfig") } else { - delegateConf.DeviceID = net.DeviceID + delegateConf.DeviceID = netElement.DeviceID } } } @@ -545,11 +551,13 @@ func CheckGatewayConfig(delegates []*DelegateNetConf) error { // Check the gateway for _, delegate := range delegates { - for _, gw := range delegate.GatewayRequest { - if gw.To4() != nil { - v4Gateways++ - } else { - v6Gateways++ + if delegate.GatewayRequest != nil { + for _, gw := range *delegate.GatewayRequest { + if gw.To4() != nil { + v4Gateways++ + } else { + v6Gateways++ + } } } } @@ -565,7 +573,7 @@ func CheckGatewayConfig(delegates []*DelegateNetConf) error { delegates[i].IsFilterV4Gateway = true delegates[i].IsFilterV6Gateway = true } else { - for _, gw := range delegate.GatewayRequest { + for _, gw := range *delegate.GatewayRequest { if gw.To4() != nil { delegates[i].IsFilterV6Gateway = true } else { diff --git a/pkg/types/conf_test.go b/pkg/types/conf_test.go index 960e65adf..de3073880 100644 --- a/pkg/types/conf_test.go +++ b/pkg/types/conf_test.go @@ -909,4 +909,72 @@ var _ = Describe("config operations", func() { Expect(n.Delegates[0].Name).To(Equal("weave-list")) }) + It("test LoadDelegateNetConf keeps without GatewayRequest", func() { + conf := `{ + "name": "node-cni-network", + "type": "multus", + "kubeconfig": "/etc/kubernetes/node-kubeconfig.yaml", + "delegates": [{ + "name": "weave-list", + "plugins": [ {"type" :"weave"} ] + }] + }` + + nsJSON := `{ "name": "foobar" }` + ns := &NetworkSelectionElement{} + + err := json.Unmarshal([]byte(nsJSON), ns) + Expect(err).NotTo(HaveOccurred()) + + netconf, err := LoadDelegateNetConf([]byte(conf), ns, "", "") + Expect(err).NotTo(HaveOccurred()) + Expect(netconf.GatewayRequest).To(BeNil()) + }) + + It("test LoadDelegateNetConf keeps empty GatewayRequest", func() { + conf := `{ + "name": "node-cni-network", + "type": "multus", + "kubeconfig": "/etc/kubernetes/node-kubeconfig.yaml", + "delegates": [{ + "name": "weave-list", + "plugins": [ {"type" :"weave"} ] + }] + }` + + nsJSON := `{ "name": "foobar", "default-route": [] }` + ns := &NetworkSelectionElement{} + + err := json.Unmarshal([]byte(nsJSON), ns) + Expect(err).NotTo(HaveOccurred()) + + netconf, err := LoadDelegateNetConf([]byte(conf), ns, "", "") + Expect(err).NotTo(HaveOccurred()) + Expect(netconf.GatewayRequest).NotTo(BeNil()) + Expect(len(*netconf.GatewayRequest)).To(BeEquivalentTo(0)) + }) + + It("test LoadDelegateNetConf keeps GatewayRequest", func() { + conf := `{ + "name": "node-cni-network", + "type": "multus", + "kubeconfig": "/etc/kubernetes/node-kubeconfig.yaml", + "delegates": [{ + "name": "weave-list", + "plugins": [ {"type" :"weave"} ] + }] + }` + + nsJSON := `{ "name": "foobar", "default-route": [ "10.1.1.1" ] }` + ns := &NetworkSelectionElement{} + + err := json.Unmarshal([]byte(nsJSON), ns) + Expect(err).NotTo(HaveOccurred()) + + netconf, err := LoadDelegateNetConf([]byte(conf), ns, "", "") + Expect(err).NotTo(HaveOccurred()) + Expect(netconf.GatewayRequest).NotTo(BeNil()) + Expect(len(*netconf.GatewayRequest)).To(BeEquivalentTo(1)) + }) + }) diff --git a/pkg/types/types.go b/pkg/types/types.go index 814305be6..6bcb020c8 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -99,7 +99,7 @@ type DelegateNetConf struct { IPRequest []string `json:"ipRequest,omitempty"` PortMappingsRequest []*PortMapEntry `json:"-"` BandwidthRequest *BandwidthEntry `json:"-"` - GatewayRequest []net.IP `json:"default-route,omitempty"` + GatewayRequest *[]net.IP `json:"default-route,omitempty"` IsFilterV4Gateway bool IsFilterV6Gateway bool // MasterPlugin is only used internal housekeeping @@ -150,7 +150,7 @@ type NetworkSelectionElement struct { // CNIArgs contains additional CNI arguments for the network interface CNIArgs *map[string]interface{} `json:"cni-args"` // GatewayRequest contains default route IP address for the pod - GatewayRequest []net.IP `json:"default-route,omitempty"` + GatewayRequest *[]net.IP `json:"default-route,omitempty"` } // K8sArgs is the valid CNI_ARGS used for Kubernetes From 95adff55b0278b6fdd32753c73548af0c10478fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kukr=C3=A1l?= Date: Fri, 8 Jul 2022 14:02:51 +0200 Subject: [PATCH 4/5] write output file for generated kubeconfig This change will make debugging easier in cases when non-default location is used and user forgot to mount new directory. --- cmd/config-generation/kubeconfig.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/config-generation/kubeconfig.go b/cmd/config-generation/kubeconfig.go index 2eeae5217..b313fca6f 100644 --- a/cmd/config-generation/kubeconfig.go +++ b/cmd/config-generation/kubeconfig.go @@ -124,7 +124,7 @@ contexts: current-context: multus-context ` kubeconfig := fmt.Sprintf(kubeConfigTemplate, protocol, k8sServiceIP, k8sServicePort, tlsConfig, serviceAccountToken) - logInfo("Generated KubeConfig: \n%s", kubeconfig) + logInfo("Generated KubeConfig saved to %s: \n%s", outputPath, kubeconfig) return ioutil.WriteFile(outputPath, []byte(kubeconfig), userRWPermission) } From ac6757b9cc1e2f5ee5b18be6a6771c8f4b024216 Mon Sep 17 00:00:00 2001 From: Chris Plock Date: Fri, 15 Jul 2022 15:13:27 -0700 Subject: [PATCH 5/5] Detect python3 fixes https://github.com/k8snetworkplumbingwg/multus-cni/issues/880 --- images/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/entrypoint.sh b/images/entrypoint.sh index 92e8cc426..64d4bb31c 100755 --- a/images/entrypoint.sh +++ b/images/entrypoint.sh @@ -83,7 +83,7 @@ function warn() log "WARN: {$1}" } -if ! type python3 &> /dev/null; then +if type python3 &> /dev/null; then alias python=python3 fi