Documentation ¶
Index ¶
- Constants
- func BuildOVSPortExternalIDs(containerConfig *interfacestore.InterfaceConfig) map[string]interface{}
- func IsCNIVersionSupported(reqVersion string) bool
- func NewSecondaryInterfaceConfigurator(ovsBridgeClient ovsconfig.OVSBridgeClient) (*podConfigurator, error)
- func ParseOVSPortInterfaceConfig(portData *ovsconfig.OVSPortData, portConfig *interfacestore.OVSPortConfig) *interfacestore.InterfaceConfig
- type CNIConfig
- type CNIServer
- func (s *CNIServer) CmdAdd(ctx context.Context, request *cnipb.CniCmdRequest) (*cnipb.CniCmdResponse, error)
- func (s *CNIServer) CmdCheck(_ context.Context, request *cnipb.CniCmdRequest) (*cnipb.CniCmdResponse, error)
- func (s *CNIServer) CmdDel(ctx context.Context, request *cnipb.CniCmdRequest) (*cnipb.CniCmdResponse, error)
- func (s *CNIServer) Initialize(ovsBridgeClient ovsconfig.OVSBridgeClient, ofClient openflow.Client, ...) error
- func (s *CNIServer) Run(stopCh <-chan struct{})
- type SriovNet
Constants ¶
View Source
const (
AntreaCNIType = "antrea"
)
Variables ¶
This section is empty.
Functions ¶
func BuildOVSPortExternalIDs ¶
func BuildOVSPortExternalIDs(containerConfig *interfacestore.InterfaceConfig) map[string]interface{}
BuildOVSPortExternalIDs parses OVS port external_ids from InterfaceConfig. external_ids are used to compare and sync container interface configuration.
func IsCNIVersionSupported ¶ added in v1.15.0
func NewSecondaryInterfaceConfigurator ¶ added in v1.14.0
func NewSecondaryInterfaceConfigurator(ovsBridgeClient ovsconfig.OVSBridgeClient) (*podConfigurator, error)
func ParseOVSPortInterfaceConfig ¶
func ParseOVSPortInterfaceConfig(portData *ovsconfig.OVSPortData, portConfig *interfacestore.OVSPortConfig) *interfacestore.InterfaceConfig
ParseOVSPortInterfaceConfig reads the Pod properties saved in the OVS port external_ids, initializes and returns an InterfaceConfig struct. nill will be returned, if the OVS port does not have external IDs or it is not created for a Pod interface.
Types ¶
type CNIConfig ¶
type CNIConfig struct { *types.NetworkConfig // CniCmdArgs received from the CNI plugin. IPAM data in CniCmdArgs can be updated with the // Node's Pod CIDRs for NodeIPAM. *cnipb.CniCmdArgs // K8s CNI_ARGS passed to the CNI plugin. *types.K8sArgs // contains filtered or unexported fields }
type CNIServer ¶
type CNIServer struct {
// contains filtered or unexported fields
}
func New ¶
func New( cniSocket, hostProcPathPrefix string, nodeConfig *config.NodeConfig, kubeClient clientset.Interface, routeClient route.Interface, isChaining, enableBridgingMode, enableSecondaryNetworkIPAM, disableTXChecksumOffload bool, networkConfig *config.NetworkConfig, podNetworkWait *wait.Group, ) *CNIServer
func (*CNIServer) CmdAdd ¶
func (s *CNIServer) CmdAdd(ctx context.Context, request *cnipb.CniCmdRequest) (*cnipb.CniCmdResponse, error)
func (*CNIServer) CmdCheck ¶
func (s *CNIServer) CmdCheck(_ context.Context, request *cnipb.CniCmdRequest) ( *cnipb.CniCmdResponse, error)
func (*CNIServer) CmdDel ¶
func (s *CNIServer) CmdDel(ctx context.Context, request *cnipb.CniCmdRequest) (*cnipb.CniCmdResponse, error)
func (*CNIServer) Initialize ¶
func (s *CNIServer) Initialize( ovsBridgeClient ovsconfig.OVSBridgeClient, ofClient openflow.Client, ifaceStore interfacestore.InterfaceStore, podUpdateNotifier channel.Notifier, ) error
type SriovNet ¶ added in v1.11.0
type SriovNet interface { GetNetDevicesFromPci(pciAddress string) ([]string, error) GetUplinkRepresentor(pciAddress string) (string, error) GetVfIndexByPciAddress(vfPciAddress string) (int, error) GetVfRepresentor(uplink string, vfIndex int) (string, error) GetPfName(vf string) (string, error) GetVfid(addr string, pfName string) (int, error) GetVFLinkNames(pciAddr string) (string, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.