Documentation ¶
Index ¶
- Constants
- func GetDefaultIfSpec(isL3 bool) config.InterfaceSpec
- func NetNsExec(netnsName string, cb func() error) (err error)
- func NewArpRequestPacket(srcMac net.HardwareAddr, srcIp net.IP, dstIp net.IP) ([]byte, error)
- func NewLocalPodSpecFromDel(request *cniproto.DelRequest) *storage.LocalPodSpec
- func NsEnter(netnsName string) (cleanup func(), err error)
- type NetworkPod
- type PodNSNotFoundErr
- type Server
- func (s *Server) ActivateStrictRPF(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) (err error)
- func (s *Server) Add(ctx context.Context, request *cniproto.AddRequest) (*cniproto.AddReply, error)
- func (s *Server) AddHostPort(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) error
- func (s *Server) AddRPFRoutes(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) (err error)
- func (s *Server) AddRedirectToHostToInterface(swIfIndex uint32) error
- func (s *Server) AddVppInterface(podSpec *storage.LocalPodSpec, doHostSideConf bool) (tunTapSwIfIndex uint32, err error)
- func (s *Server) CreatePodRPFVRF(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) (err error)
- func (s *Server) CreatePodVRF(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) (err error)
- func (s *Server) CreateVRFRoutesToPod(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) (err error)
- func (s *Server) DeactivateStrictRPF(podSpec *storage.LocalPodSpec)
- func (s *Server) Del(ctx context.Context, request *cniproto.DelRequest) (*cniproto.DelReply, error)
- func (s *Server) DelHostPort(podSpec *storage.LocalPodSpec)
- func (s *Server) DelRedirectToHostOnInterface(swIfIndex uint32) error
- func (s *Server) DelVppInterface(podSpec *storage.LocalPodSpec)
- func (s *Server) DeletePodVRF(podSpec *storage.LocalPodSpec)
- func (s *Server) DeleteVRFRoutesToPod(podSpec *storage.LocalPodSpec)
- func (s *Server) FetchBufferConfig()
- func (s *Server) ForceAddingNetworkDefinition(networkDefinition *watchers.NetworkDefinition)
- func (s *Server) ParseDefaultIfType(podSpec *storage.LocalPodSpec, ifType storage.VppInterfaceType) (err error)
- func (s *Server) ParseEnableDisableAnnotation(value string) (bool, error)
- func (s *Server) ParsePodAnnotations(podSpec *storage.LocalPodSpec, annotations map[string]string) (err error)
- func (s *Server) ParsePortMappingAnnotation(podSpec *storage.LocalPodSpec, ifType storage.VppInterfaceType, value string) (err error)
- func (s *Server) ParsePortSpec(value string) (ifPortConfigs *storage.LocalIfPortConfigs, err error)
- func (s *Server) ParseSpoofAddressAnnotation(value string) ([]cnet.IPNet, error)
- func (s *Server) RemovePuntRoutes(podSpec *storage.LocalPodSpec, swIfIndex uint32)
- func (s *Server) RoutePblPortsPodInterface(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack, swIfIndex uint32, ...) (err error)
- func (s *Server) RoutePodInterface(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack, swIfIndex uint32, ...) error
- func (s *Server) ServeCNI(t *tomb.Tomb) error
- func (s *Server) SetFelixConfig(felixConfig *felixConfig.Config)
- func (s *Server) SetOurBGPSpec(nodeBGPSpec *common.LocalNodeSpec)
- func (s *Server) SetupPuntRoutes(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack, swIfIndex uint32) (err error)
- func (s *Server) UnroutePblPortsPodInterface(podSpec *storage.LocalPodSpec, swIfIndex uint32)
- func (s *Server) UnroutePodInterface(podSpec *storage.LocalPodSpec, swIfIndex uint32, inPodVrf bool)
Constants ¶
View Source
const ( CalicoAnnotationPrefix string = "cni.projectcalico.org/" VppAnnotationPrefix string = "cni.projectcalico.org/vpp" MemifPortAnnotation string = "ExtraMemifPorts" VclAnnotation string = "Vcl" SpoofAnnotation string = "AllowedSourcePrefixes" IfSpecAnnotation string = "InterfacesSpec" IfSpecPBLAnnotation string = "ExtraMemifSpec" )
Variables ¶
This section is empty.
Functions ¶
func GetDefaultIfSpec ¶ added in v3.25.1
func GetDefaultIfSpec(isL3 bool) config.InterfaceSpec
func NewArpRequestPacket ¶ added in v3.26.0
func NewLocalPodSpecFromDel ¶
func NewLocalPodSpecFromDel(request *cniproto.DelRequest) *storage.LocalPodSpec
Types ¶
type NetworkPod ¶
type PodNSNotFoundErr ¶
type PodNSNotFoundErr struct {
// contains filtered or unexported fields
}
func (PodNSNotFoundErr) Error ¶
func (e PodNSNotFoundErr) Error() string
type Server ¶
type Server struct { RedirectToHostClassifyTableIndex uint32 // contains filtered or unexported fields }
func NewCNIServer ¶
func NewCNIServer(vpp *vpplink.VppLink, policyServerIpam common.PolicyServerIpam, log *logrus.Entry) *Server
Serve runs the grpc server for the Calico CNI backend API
func (*Server) ActivateStrictRPF ¶
func (s *Server) ActivateStrictRPF(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) (err error)
func (*Server) AddHostPort ¶
func (s *Server) AddHostPort(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) error
func (*Server) AddRPFRoutes ¶
func (s *Server) AddRPFRoutes(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) (err error)
func (*Server) AddRedirectToHostToInterface ¶ added in v3.27.0
func (*Server) AddVppInterface ¶
func (s *Server) AddVppInterface(podSpec *storage.LocalPodSpec, doHostSideConf bool) (tunTapSwIfIndex uint32, err error)
AddVppInterface performs the networking for the given config and IPAM result
func (*Server) CreatePodRPFVRF ¶
func (s *Server) CreatePodRPFVRF(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) (err error)
func (*Server) CreatePodVRF ¶
func (s *Server) CreatePodVRF(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) (err error)
func (*Server) CreateVRFRoutesToPod ¶
func (s *Server) CreateVRFRoutesToPod(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) (err error)
func (*Server) DeactivateStrictRPF ¶
func (s *Server) DeactivateStrictRPF(podSpec *storage.LocalPodSpec)
func (*Server) DelHostPort ¶
func (s *Server) DelHostPort(podSpec *storage.LocalPodSpec)
func (*Server) DelRedirectToHostOnInterface ¶ added in v3.27.0
func (*Server) DelVppInterface ¶
func (s *Server) DelVppInterface(podSpec *storage.LocalPodSpec)
CleanUpVPPNamespace deletes the devices in the network namespace.
func (*Server) DeletePodVRF ¶
func (s *Server) DeletePodVRF(podSpec *storage.LocalPodSpec)
func (*Server) DeleteVRFRoutesToPod ¶
func (s *Server) DeleteVRFRoutesToPod(podSpec *storage.LocalPodSpec)
func (*Server) FetchBufferConfig ¶ added in v3.25.1
func (s *Server) FetchBufferConfig()
func (*Server) ForceAddingNetworkDefinition ¶
func (s *Server) ForceAddingNetworkDefinition(networkDefinition *watchers.NetworkDefinition)
ForceAddingNetworkDefinition will add another NetworkDefinition to this CNI server. The usage is mainly for testing purposes.
func (*Server) ParseDefaultIfType ¶
func (s *Server) ParseDefaultIfType(podSpec *storage.LocalPodSpec, ifType storage.VppInterfaceType) (err error)
func (*Server) ParseEnableDisableAnnotation ¶
func (*Server) ParsePodAnnotations ¶
func (*Server) ParsePortMappingAnnotation ¶
func (s *Server) ParsePortMappingAnnotation(podSpec *storage.LocalPodSpec, ifType storage.VppInterfaceType, value string) (err error)
func (*Server) ParsePortSpec ¶
func (s *Server) ParsePortSpec(value string) (ifPortConfigs *storage.LocalIfPortConfigs, err error)
func (*Server) ParseSpoofAddressAnnotation ¶
func (*Server) RemovePuntRoutes ¶
func (s *Server) RemovePuntRoutes(podSpec *storage.LocalPodSpec, swIfIndex uint32)
func (*Server) RoutePblPortsPodInterface ¶
func (s *Server) RoutePblPortsPodInterface(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack, swIfIndex uint32, isL3 bool) (err error)
func (*Server) RoutePodInterface ¶
func (s *Server) RoutePodInterface(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack, swIfIndex uint32, isL3 bool, inPodVrf bool) error
func (*Server) SetFelixConfig ¶
func (s *Server) SetFelixConfig(felixConfig *felixConfig.Config)
func (*Server) SetOurBGPSpec ¶ added in v3.26.0
func (s *Server) SetOurBGPSpec(nodeBGPSpec *common.LocalNodeSpec)
func (*Server) SetupPuntRoutes ¶
func (s *Server) SetupPuntRoutes(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack, swIfIndex uint32) (err error)
func (*Server) UnroutePblPortsPodInterface ¶
func (s *Server) UnroutePblPortsPodInterface(podSpec *storage.LocalPodSpec, swIfIndex uint32)
func (*Server) UnroutePodInterface ¶
func (s *Server) UnroutePodInterface(podSpec *storage.LocalPodSpec, swIfIndex uint32, inPodVrf bool)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.