DPDeviceFile is used by Device Plugins to pass device data to CNIs, as defined
in the device-info-spec. The name of the DPDeviceFile is defined by the
device-info-spec as:
<ResourceName>-<DeviceID>-device.json
If the DPDeviceFile exists, the NPWG implementation makes a copy of the file
and passes the name of the file to the delegate CNI via capabilityArgs as
CNIDeviceFile. If the DPDeviceFile does not exist, the filename is still
passed to the CNI. The CNI can create the file and popluate it if a device
is created within the CNI.
The name of the CNIDeviceFile is not defined by device-info-spec, but to
ensure the name does not clash it is formed by the following unique triplet:
[networkName, PodUUID, ifName]
k8snetworkplumbingwg/network-attachment-definition-client repo has utility
functions to abstract some of this functionality so it can be reused across
Device Plugins, NPWG implementations and CNIs.
Signed-off-by: Billy McFall <22157057+Billy99@users.noreply.github.com>
RuntimeConfig depends on the delegate configuration. The Netconf runtime
information should be merged with the delegate config and the result
added to each command that is sent to the delegates. That was being done
for all commands except for delPlugins.
Do not export MergeCNIRuntimeConfig and call it from
CreateCNIRuntimeConf that now accepts a delegate ptr.
Call it from delPlugins for each delegate
Signed-off-by: Billy McFall <22157057+Billy99@users.noreply.github.com>
This change introduces gopkg.in to allow everyone to use multus
code as library. Currently multus-cni uses version 'v3', hence
it hits go modules limitation, as #504 describes.
This change fix#504 with gopkg.in.
This changes introduce CNI RuntimeConfig for portmap, bandwidth,
ip and mac for latest specification. IP and Mac is previously
applied through CNI_ARGS, but it is changed to RuntimeConfig
for now.
* Improved coverage of checkpoint.go to 96.4%
* Improved coverage of checkpoint.go to 96.4%
* Fixed unit tests in checkpoint_test.go and conf_test.go
* Removed unnecessary comments
* improved conf code coverage by an amount that is greater than 0!
* improved coverage, but line 144 of conf.go needs a look
* Added unit tests to multus and types, also fixed a bug in conf.go
* increased code coverage in multus.go and conf.go, also added bug fixes and formatting
* hopefully resolved merge conflicts
* addressed all comments in review
* changed 'thejohn' to '_not_type' for readability
* Added network status annotations section to quickstart and added more unit tests
* added more tests to k8sclient.go
* added another test to k8sclient.go
* Added new function to testing.go and cleaned up tests
* Added a test for GetLoggingLevel
* Added up to 96% coverage for checkpoint.go
* Improved coverage of checkpoint.go to 96.4%
* Improved coverage of checkpoint.go to 96.4%
* Adding changes so i will have them saved for my remote fork thingy
* Fixed unit tests in checkpoint_test.go and conf_test.go
* Removed unnecessary comments
* improved conf code coverage by an amount that is greater than 0!
* improved coverage, but line 144 of conf.go needs a look
* Added unit tests to multus and types, also fixed a bug in conf.go
* added label to import types/020 in types.go
* hopefully resolved merge conflicts
* increased code coverage in multus.go and conf.go, also added bug fixes and formatting
* addressed all comments in review
* Updated testing.go with better comments
* changed 'thejohn' to '_not_type' for readability
* added additional unit tests
* added tests to kubeletclient.go
* added more unit tests to k8sclient.go and kubeletclient.go
* Added network status annotations section to quickstart and added more unit tests
* made changes to tests based on code review
This fixes#243 with following changes:
+ Optimize to fetch Pod from k8s client
+ Change to use cache always in DEL.
+ If failed to fetch the pod info from k8s clinet in deletion,
use cached delegates as emergency bailout
+ Add test cases for cache
Crash happens in code line `conf.Delegates[0] = delegate` in function TryLoadPodDelegates,
because len(conf.Delegates) is 0.
Signed-off-by: Huanle Han <hanhuanle@caicloud.io>
This changes introduce goreleaser, which does cross-compile and
package, as well as add version into go code. This change also
changes .travis.yml to allow to other users' forked repo.
Change the Network Attachment Selection Annotation long-form
interface name request JSON key from 'interfaceRequest' to
'interface' to conform with the V1 NPWG spec.