mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-12-24 11:51:13 +08:00
hotfix: fix get cidr npe (#259)
This commit is contained in:
@@ -137,9 +137,10 @@ func GetPodCIDRFromCNI(ctx context.Context, clientset *kubernetes.Clientset, res
|
||||
}
|
||||
|
||||
configList, err := libcni.ConfListFromBytes([]byte(content))
|
||||
if err == nil {
|
||||
log.Infoln("get cni config", configList.Name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Infoln("get cni config", configList.Name)
|
||||
var cidr []*net.IPNet
|
||||
for _, plugin := range configList.Plugins {
|
||||
switch plugin.Network.Type {
|
||||
|
||||
Reference in New Issue
Block a user