Documentation ¶
Index ¶
- Constants
- func AddIPAMResult(key string, result *IPAMResult)
- func ExecIPAMCheck(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, ipamType string) error
- func ExecIPAMDelete(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, ipamType string, ...) error
- func IsIPAMTypeValid(ipamType string) bool
- func RegisterIPAMDriver(ipamType string, ipamDriver IPAMDriver)
- func ResetIPAMDriver(ipamType string, driver IPAMDriver)
- func SecondaryNetworkAdd(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, ...) (*current.Result, error)
- func SecondaryNetworkCheck(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, ...) error
- func SecondaryNetworkDel(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, ...) error
- type AntreaIPAM
- func (d *AntreaIPAM) Add(args *invoke.Args, k8sArgs *types.K8sArgs, networkConfig []byte) (bool, *IPAMResult, error)
- func (d *AntreaIPAM) Check(args *invoke.Args, k8sArgs *types.K8sArgs, networkConfig []byte) (bool, error)
- func (d *AntreaIPAM) Del(args *invoke.Args, k8sArgs *types.K8sArgs, networkConfig []byte) (bool, error)
- type AntreaIPAMController
- type IPAMDelegator
- func (d *IPAMDelegator) Add(args *invoke.Args, k8sArgs *argtypes.K8sArgs, networkConfig []byte) (bool, *IPAMResult, error)
- func (d *IPAMDelegator) Check(args *invoke.Args, k8sArgs *argtypes.K8sArgs, networkConfig []byte) (bool, error)
- func (d *IPAMDelegator) Del(args *invoke.Args, k8sArgs *argtypes.K8sArgs, networkConfig []byte) (bool, error)
- type IPAMDriver
- type IPAMResult
Constants ¶
const (
AntreaIPAMType = "antrea"
)
Variables ¶
This section is empty.
Functions ¶
func AddIPAMResult ¶ added in v1.11.0
func AddIPAMResult(key string, result *IPAMResult)
func ExecIPAMCheck ¶
func ExecIPAMDelete ¶
func IsIPAMTypeValid ¶
func RegisterIPAMDriver ¶
func RegisterIPAMDriver(ipamType string, ipamDriver IPAMDriver)
func ResetIPAMDriver ¶ added in v1.11.0
func ResetIPAMDriver(ipamType string, driver IPAMDriver)
The following functions are only for testing.
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
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)
type IPAMDriver ¶
type IPAMResult ¶ added in v1.6.0
func ExecIPAMAdd ¶
func ExecIPAMAdd(cniArgs *cnipb.CniCmdArgs, k8sArgs *types.K8sArgs, ipamType string, resultKey string) (*IPAMResult, error)
func GetIPFromCache ¶
func GetIPFromCache(resultKey string) (*IPAMResult, bool)