Documentation ¶
Index ¶
- Constants
- func CleanupMultitenancyResources(enableInfraVnet bool, nwCfg *cni.NetworkConfig, ...)
- func GetEndpointID(args *cniSkel.CmdArgs) string
- func GetMultiTenancyCNIResult(enableInfraVnet bool, nwCfg *cni.NetworkConfig, plugin *netPlugin, ...) (*cniTypesCurr.Result, *cns.GetNetworkContainerResponse, net.IPNet, ...)
- func NewPlugin(name string, config *common.PluginConfig, client NnsClient) (*netPlugin, error)
- func SetCustomDimensions(cniMetric *telemetry.AIMetric, nwCfg *cni.NetworkConfig, err error)
- func SetupRoutingForMultitenancy(nwCfg *cni.NetworkConfig, cnsNetworkConfig *cns.GetNetworkContainerResponse, ...)
- type AzureIPAMInvoker
- type CNSIPAMInvoker
- type ExecutionMode
- type IPAMInvoker
- type IPv4ResultInfo
- type NnsClient
Constants ¶
View Source
const ( CNI_ADD = "ADD" CNI_DEL = "DEL" CNI_UPDATE = "UPDATE" )
CNI Operation Types
Variables ¶
This section is empty.
Functions ¶
func CleanupMultitenancyResources ¶ added in v1.0.12
func CleanupMultitenancyResources(enableInfraVnet bool, nwCfg *cni.NetworkConfig, azIpamResult *cniTypesCurr.Result, plugin *netPlugin)
func GetEndpointID ¶
GetEndpointID returns a unique endpoint ID based on the CNI args.
func GetMultiTenancyCNIResult ¶ added in v1.0.12
func GetMultiTenancyCNIResult( enableInfraVnet bool, nwCfg *cni.NetworkConfig, plugin *netPlugin, k8sPodName string, k8sNamespace string, ifName string) (*cniTypesCurr.Result, *cns.GetNetworkContainerResponse, net.IPNet, *cniTypesCurr.Result, error)
GetMultiTenancyCNIResult retrieves network goal state of a container from CNS
func NewPlugin ¶
func NewPlugin(name string, config *common.PluginConfig, client NnsClient) (*netPlugin, error)
NewPlugin creates a new netPlugin object.
func SetCustomDimensions ¶
func SetCustomDimensions(cniMetric *telemetry.AIMetric, nwCfg *cni.NetworkConfig, err error)
func SetupRoutingForMultitenancy ¶ added in v1.0.8
func SetupRoutingForMultitenancy( nwCfg *cni.NetworkConfig, cnsNetworkConfig *cns.GetNetworkContainerResponse, azIpamResult *cniTypesCurr.Result, epInfo *network.EndpointInfo, result *cniTypesCurr.Result)
Types ¶
type AzureIPAMInvoker ¶
type AzureIPAMInvoker struct {
// contains filtered or unexported fields
}
func NewAzureIpamInvoker ¶
func NewAzureIpamInvoker(plugin *netPlugin, nwInfo *network.NetworkInfo) *AzureIPAMInvoker
func (*AzureIPAMInvoker) Add ¶
func (invoker *AzureIPAMInvoker) Add(nwCfg *cni.NetworkConfig, _ *cniSkel.CmdArgs, subnetPrefix *net.IPNet, options map[string]interface{}) (*cniTypesCurr.Result, *cniTypesCurr.Result, error)
type CNSIPAMInvoker ¶
type CNSIPAMInvoker struct {
// contains filtered or unexported fields
}
func NewCNSInvoker ¶
func NewCNSInvoker(podName, namespace string) (*CNSIPAMInvoker, error)
func (*CNSIPAMInvoker) Add ¶
func (invoker *CNSIPAMInvoker) Add(nwCfg *cni.NetworkConfig, args *cniSkel.CmdArgs, hostSubnetPrefix *net.IPNet, options map[string]interface{}) (*cniTypesCurr.Result, *cniTypesCurr.Result, error)
Add uses the requestipconfig API in cns, and returns ipv4 and a nil ipv6 as CNS doesn't support IPv6 yet
type ExecutionMode ¶ added in v1.2.9
type ExecutionMode string
const ( Default ExecutionMode = "default" Baremetal ExecutionMode = "baremetal" )
type IPAMInvoker ¶
type IPAMInvoker interface { //Add returns two results, one IPv4, the other IPv6. Add(nwCfg *cni.NetworkConfig, args *cniSkel.CmdArgs, subnetPrefix *net.IPNet, options map[string]interface{}) (*cniTypesCurr.Result, *cniTypesCurr.Result, error) //Delete calls to the invoker source, and returns error. Returning an error here will fail the CNI Delete call. Delete(address *net.IPNet, nwCfg *cni.NetworkConfig, args *cniSkel.CmdArgs, options map[string]interface{}) error }
IPAMInvoker is used by the azure-vnet CNI plugin to call different sources for IPAM. This interface can be used to call into external binaries, like the azure-vnet-ipam binary, or simply act as a client to an external ipam, such as azure-cns.
type IPv4ResultInfo ¶ added in v1.1.8
type IPv4ResultInfo struct {
// contains filtered or unexported fields
}
type NnsClient ¶
type NnsClient interface { // Do network port programming for the pod via node network service. // podName - name of the pod as received from containerD // nwNamesapce - network namespace name as received from containerD AddContainerNetworking(ctx context.Context, podName, nwNamespace string) (error, *nnscontracts.ConfigureContainerNetworkingResponse) // Undo or delete network port programming for the pod via node network service. // podName - name of the pod as received from containerD // nwNamesapce - network namespace name as received from containerD DeleteContainerNetworking(ctx context.Context, podName, nwNamespace string) (error, *nnscontracts.ConfigureContainerNetworkingResponse) }
client for node network service
Source Files ¶
Click to show internal directories.
Click to hide internal directories.