diff --git a/pkg/danm/danm.go b/pkg/danm/danm.go index 562fcf2c..c5ac5c0e 100644 --- a/pkg/danm/danm.go +++ b/pkg/danm/danm.go @@ -73,9 +73,8 @@ func createInterfaces(args *skel.CmdArgs) error { return fmt.Errorf("Pod manifest could not be parsed with error: %v", err) } extractConnections(cniArgs) - if len(cniArgs.interfaces) == 0 { - log.Println("ERROR: ADD: DANM cannot create interfaces for Pod:" + cniArgs.podId + " , because no network connections are defined in spec.metadata.annotation") - return fmt.Errorf("DANM cannot create interfaces for Pod:%s, because no network connections are defined in spec.metadata.annotation", cniArgs.podId) + if len(cniArgs.interfaces) == 1 && cniArgs.interfaces[0].Network == defaultNetworkName { + log.Println("WARN: ADD: no network connections for Pod: " + cniArgs.podId + " are defined in spec.metadata.annotation. Falling back to use: " + defaultNetworkName) } cniResult, err := setupNetworking(cniArgs) if err != nil {