ipam

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AntreaIPAMType = "antrea"
)

Variables

This section is empty.

Functions

func ExecIPAMCheck

func ExecIPAMCheck(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, ipamType string) error

func ExecIPAMDelete

func ExecIPAMDelete(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, ipamType string, resultKey string) error

func IsIPAMTypeValid

func IsIPAMTypeValid(ipamType string) bool

func RegisterIPAMDriver

func RegisterIPAMDriver(ipamType string, ipamDriver IPAMDriver)

func SecondaryNetworkAdd added in v1.7.0

func SecondaryNetworkAdd(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, networkConfig *types.NetworkConfig) (*current.Result, error)

Antrea IPAM for secondary network.

func SecondaryNetworkCheck added in v1.7.0

func SecondaryNetworkCheck(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, networkConfig *types.NetworkConfig) error

func SecondaryNetworkDel added in v1.7.0

func SecondaryNetworkDel(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, networkConfig *types.NetworkConfig) error

Types

type AntreaIPAM added in v1.4.0

type AntreaIPAM struct {
	// contains filtered or unexported fields
}

Antrea IPAM driver would allocate IP addresses according to object IPAM annotation, if present. If annotation is not present, the driver will delegate functionality to traditional IPAM driver.

func (*AntreaIPAM) Add added in v1.4.0

func (d *AntreaIPAM) Add(args *invoke.Args, k8sArgs *types.K8sArgs, networkConfig []byte) (bool, *IPAMResult, error)

Add allocates next available IP address from associated IP Pool Allocated IP and associated resource are stored in IP Pool status

func (*AntreaIPAM) Check added in v1.4.0

func (d *AntreaIPAM) Check(args *invoke.Args, k8sArgs *types.K8sArgs, networkConfig []byte) (bool, error)

Check verifues IP associated with resource is tracked in IP Pool status

func (*AntreaIPAM) Del added in v1.4.0

func (d *AntreaIPAM) Del(args *invoke.Args, k8sArgs *types.K8sArgs, networkConfig []byte) (bool, error)

Del deletes IP associated with resource from IP Pool status

type AntreaIPAMController added in v1.4.0

type AntreaIPAMController struct {
	// contains filtered or unexported fields
}

Antrea IPAM Controller maintains map of Namespace annotations using Namespace informer. In future, which Antrea IPAM support expands, this controller can be used to store annotations for other objects, such as Statefulsets.

func InitializeAntreaIPAMController added in v1.4.0

func InitializeAntreaIPAMController(crdClient clientsetversioned.Interface,
	informerFactory informers.SharedInformerFactory,
	crdInformerFactory externalversions.SharedInformerFactory,
	podInformer cache.SharedIndexInformer, ipamAnnotations bool) (*AntreaIPAMController, error)

func (*AntreaIPAMController) Run added in v1.4.0

func (c *AntreaIPAMController) Run(stopCh <-chan struct{})

Run starts to watch and process Namespace updates for the Node where Antrea Agent is running, and maintain a mapping between Namespace name and IPAM annotations.

type IPAMDelegator

type IPAMDelegator struct {
	// contains filtered or unexported fields
}

func (*IPAMDelegator) Add

func (d *IPAMDelegator) Add(args *invoke.Args, k8sArgs *argtypes.K8sArgs, networkConfig []byte) (bool, *IPAMResult, error)

func (*IPAMDelegator) Check

func (d *IPAMDelegator) Check(args *invoke.Args, k8sArgs *argtypes.K8sArgs, networkConfig []byte) (bool, error)

func (*IPAMDelegator) Del

func (d *IPAMDelegator) Del(args *invoke.Args, k8sArgs *argtypes.K8sArgs, networkConfig []byte) (bool, error)

type IPAMDriver

type IPAMDriver interface {
	Add(args *invoke.Args, k8sArgs *types.K8sArgs, networkConfig []byte) (bool, *IPAMResult, error)
	Del(args *invoke.Args, k8sArgs *types.K8sArgs, networkConfig []byte) (bool, error)
	Check(args *invoke.Args, k8sArgs *types.K8sArgs, networkConfig []byte) (bool, error)
}

type IPAMResult added in v1.6.0

type IPAMResult struct {
	current.Result
	VLANID uint16
}

func ExecIPAMAdd

func ExecIPAMAdd(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, ipamType string, resultKey string) (*IPAMResult, error)

func GetIPFromCache

func GetIPFromCache(resultKey string) (*IPAMResult, bool)

Directories

Path Synopsis
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.

Jump to

Keyboard shortcuts

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