Documentation ¶
Index ¶
- func BuildOVSPortExternalIDs(containerConfig *interfacestore.InterfaceConfig) map[string]interface{}
- 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(ctx 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() error
- func (s *CNIServer) Run(stopCh <-chan struct{})
- type NetworkConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOVSPortExternalIDs ¶ added in v0.1.1
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 ParseOVSPortInterfaceConfig ¶ added in v0.1.1
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 { *NetworkConfig *cnipb.CniCmdArgs // contains filtered or unexported fields }
type CNIServer ¶
type CNIServer struct {
// contains filtered or unexported fields
}
func New ¶
func New( cniSocket, hostProcPathPrefix string, defaultMTU int, ovsDatapathType string, nodeConfig *types.NodeConfig, ovsBridgeClient ovsconfig.OVSBridgeClient, ofClient openflow.Client, ifaceStore interfacestore.InterfaceStore, kubeClient clientset.Interface, podUpdates chan<- v1beta1.PodReference, ) *CNIServer
func (*CNIServer) CmdAdd ¶
func (s *CNIServer) CmdAdd(ctx context.Context, request *cnipb.CniCmdRequest) (*cnipb.CniCmdResponse, error)
func (*CNIServer) CmdCheck ¶
func (s *CNIServer) CmdCheck(ctx 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 ¶
type NetworkConfig ¶
type NetworkConfig struct { CNIVersion string `json:"cniVersion,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` MTU int `json:"mtu,omitempty"` DNS cnitypes.DNS `json:"dns"` IPAM ipam.IPAMConfig `json:"ipam,omitempty"` RawPrevResult map[string]interface{} `json:"prevResult,omitempty"` PrevResult cnitypes.Result `json:"-"` }
Click to show internal directories.
Click to hide internal directories.