aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/plugins/network/plugin.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/k8splugin/plugins/network/plugin.go')
-rw-r--r--src/k8splugin/plugins/network/plugin.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/k8splugin/plugins/network/plugin.go b/src/k8splugin/plugins/network/plugin.go
index fb163189..74ac3473 100644
--- a/src/k8splugin/plugins/network/plugin.go
+++ b/src/k8splugin/plugins/network/plugin.go
@@ -42,12 +42,7 @@ func Create(data *utils.ResourceData, client kubernetes.Interface) (string, erro
return "", pkgerrors.Wrap(err, "Decode network object error")
}
- config, err := network.DecodeConfig()
- if err != nil {
- return "", pkgerrors.Wrap(err, "Fail to decode network's configuration")
- }
-
- cniType := config["cnitype"].(string)
+ cniType := network.Spec.CniType
typePlugin, ok := utils.LoadedPlugins[cniType+"-network"]
if !ok {
return "", pkgerrors.New("No plugin for resource " + cniType + " found")