Skip to content

Commit

Permalink
feat: propagate the err message from getNetDelegate
Browse files Browse the repository at this point in the history
  • Loading branch information
xujihui1985 committed Dec 21, 2023
1 parent acfbd42 commit b819c8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/k8sclient/k8sclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
nettypes "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1"
netclient "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/clientset/versioned/typed/k8s.cni.cncf.io/v1"
netutils "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/utils"

"gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/kubeletclient"
"gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging"
"gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types"
Expand Down Expand Up @@ -541,7 +542,7 @@ func GetDefaultNetworks(pod *v1.Pod, conf *types.NetConf, kubeClient *ClientInfo
delegate, resourceMap, err := getNetDelegate(kubeClient, pod, conf.ClusterNetwork, conf.ConfDir, conf.MultusNamespace, resourceMap)

if err != nil {
return resourceMap, logging.Errorf("GetDefaultNetworks: failed to get clusterNetwork %s in namespace %s", conf.ClusterNetwork, conf.MultusNamespace)
return resourceMap, logging.Errorf("GetDefaultNetworks: failed to get clusterNetwork %s in namespace %s: %v", conf.ClusterNetwork, conf.MultusNamespace, err)
}
delegate.MasterPlugin = true
delegates = append(delegates, delegate)
Expand Down

0 comments on commit b819c8b

Please sign in to comment.