cni

package
v0.18.1-calicov3.21.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2022 License: Apache-2.0, Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VppAnnotationPrefix  string = "cni.projectcalico.org/vpp."
	MemifPortAnnotation  string = "memif.ports"
	TunTapPortAnnotation string = "tuntap.ports"
	Memifl3Annotation    string = "memif.l3"
	TunTapl3Annotation   string = "tuntap.l3"
	VclAnnotation        string = "vcl"
)

Variables

This section is empty.

Functions

func NewLocalPodSpecFromDel

func NewLocalPodSpecFromDel(request *pb.DelRequest) *storage.LocalPodSpec

Types

type Server

type Server struct {
	*common.CalicoVppServerData
	// contains filtered or unexported fields
}

func NewCNIServer

func NewCNIServer(vpp *vpplink.VppLink, ipam watchers.IpamCache, log *logrus.Entry) *Server

Serve runs the grpc server for the Calico CNI backend API

func (*Server) Add

func (s *Server) Add(ctx context.Context, request *pb.AddRequest) (*pb.AddReply, error)

func (*Server) AddHostPort

func (s *Server) AddHostPort(podSpec *storage.LocalPodSpec, stack *vpplink.CleanupStack) error

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) BindHostPort

func (s *Server) BindHostPort(port storage.HostPortBinding, containerIp net.IP, stack *vpplink.CleanupStack) (id uint32, 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) Del

func (s *Server) Del(ctx context.Context, request *pb.DelRequest) (*pb.DelReply, error)

func (*Server) DelHostPort

func (s *Server) DelHostPort(podSpec *storage.LocalPodSpec)

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) FetchNDataThreads

func (s *Server) FetchNDataThreads()

func (*Server) OnVppRestart

func (s *Server) OnVppRestart()

func (*Server) ParseDefaultIfType

func (s *Server) ParseDefaultIfType(podSpec *storage.LocalPodSpec, ifType storage.VppInterfaceType) (err error)

func (*Server) ParseEnableDisableAnnotation

func (s *Server) ParseEnableDisableAnnotation(value string) (bool, error)

func (*Server) ParsePodAnnotations

func (s *Server) ParsePodAnnotations(podSpec *storage.LocalPodSpec, annotations map[string]string) (err error)

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) ParseTrueFalseAnnotation

func (s *Server) ParseTrueFalseAnnotation(value string) (bool, error)

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) error

func (*Server) ServeCNI

func (s *Server) ServeCNI(t *tomb.Tomb) error

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL