Documentation ¶
Index ¶
- type PodAnnotationAllocator
- func (allocator *PodAnnotationAllocator) AllocatePodAnnotation(ipAllocator subnet.NamedAllocator, pod *v1.Pod, ...) (*v1.Pod, *util.PodAnnotation, error)
- func (allocator *PodAnnotationAllocator) AllocatePodAnnotationWithTunnelID(ipAllocator subnet.NamedAllocator, idAllocator id.NamedAllocator, pod *v1.Pod, ...) (*v1.Pod, *util.PodAnnotation, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PodAnnotationAllocator ¶
type PodAnnotationAllocator struct {
// contains filtered or unexported fields
}
PodAnnotationAllocator is a utility to handle allocation of the PodAnnotation to Pods.
func NewPodAnnotationAllocator ¶
func NewPodAnnotationAllocator( netInfo util.NetInfo, podLister listers.PodLister, kube kube.InterfaceOVN, claimsReconciler persistentips.PersistentAllocations, ) *PodAnnotationAllocator
func (*PodAnnotationAllocator) AllocatePodAnnotation ¶
func (allocator *PodAnnotationAllocator) AllocatePodAnnotation( ipAllocator subnet.NamedAllocator, pod *v1.Pod, network *nadapi.NetworkSelectionElement, reallocateIP bool, networkRole string) ( *v1.Pod, *util.PodAnnotation, error)
AllocatePodAnnotation allocates the PodAnnotation which includes IPs, a mac address, routes and gateways. Returns the allocated pod annotation and the updated pod. Returns a nil pod and the existing PodAnnotation if no updates are warranted to the pod.
The allocation can be requested through the network selection element or derived from the allocator provided IPs. If the requested IPs cannot be honored, a new set of IPs will be allocated unless reallocateIP is set to false.
func (*PodAnnotationAllocator) AllocatePodAnnotationWithTunnelID ¶
func (allocator *PodAnnotationAllocator) AllocatePodAnnotationWithTunnelID( ipAllocator subnet.NamedAllocator, idAllocator id.NamedAllocator, pod *v1.Pod, network *nadapi.NetworkSelectionElement, reallocateIP bool, networkRole string) ( *v1.Pod, *util.PodAnnotation, error)
AllocatePodAnnotationWithTunnelID allocates the PodAnnotation which includes IPs, a mac address, routes, gateways and a tunnel ID. Returns the allocated pod annotation and the updated pod. Returns a nil pod and the existing PodAnnotation if no updates are warranted to the pod.
The allocation can be requested through the network selection element or derived from the allocator provided IPs. If the requested IPs cannot be honored, a new set of IPs will be allocated unless reallocateIP is set to false.