mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-09-03 09:58:30 +00:00
Updates to API endpoint for standardized CRD
The API endpoint wasn't exactly correct after the initial changes to use the new namespace. Updated after a test. Signed-off-by: dougbtv <dosmith@redhat.com>
This commit is contained in:
@@ -335,11 +335,11 @@ func getnetplugin(client *kubernetes.Clientset, networkname string, primary bool
|
|||||||
return "", fmt.Errorf("getnetplugin: network name can't be empty")
|
return "", fmt.Errorf("getnetplugin: network name can't be empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
tprclient := fmt.Sprintf("/apis/kubernetes-network.cni.cncf.io/v1/namespaces/default/networks/%s", networkname)
|
tprclient := fmt.Sprintf("/apis/cni.cncf.io/v1/namespaces/default/kubernetes-network/%s", networkname)
|
||||||
|
|
||||||
netobjdata, err := client.ExtensionsV1beta1().RESTClient().Get().AbsPath(tprclient).DoRaw()
|
netobjdata, err := client.ExtensionsV1beta1().RESTClient().Get().AbsPath(tprclient).DoRaw()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("getnetplugin: failed to get TRP, refer Multus README.md for the usage guide: %v", err)
|
return "", fmt.Errorf("getnetplugin: failed to get CRD (result: %s), refer Multus README.md for the usage guide: %v", netobjdata, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
np := netplugin{}
|
np := netplugin{}
|
||||||
|
Reference in New Issue
Block a user