Documentation ¶
Index ¶
- Constants
- type IPAMHandler
- func (h *IPAMHandler) AddHostSpec(key ficV1.HostSpec)
- func (h *IPAMHandler) CreateIPAMResource() error
- func (h *IPAMHandler) GetIPAMCR() *ficV1.IPAM
- func (h *IPAMHandler) GetIpAddressForHostSpec(key ficV1.HostSpec) (string, bool)
- func (h *IPAMHandler) RegisterIPAMCRD()
- func (h *IPAMHandler) ReleaseIP(ipamLabel string, host string, key string, ref ResourceRef) string
- func (h *IPAMHandler) RemoveIPAMCRHostSpec(ipamCR *ficV1.IPAM, key ficV1.HostSpec, index int) (res *ficV1.IPAM, err error)
- func (h *IPAMHandler) RemoveResourceRef(key ficV1.HostSpec, ref ResourceRef)
- func (h *IPAMHandler) RemoveUnusedIPAMEntries()
- func (h *IPAMHandler) RequestIP(ipamLabel string, host string, key string, ref ResourceRef) (string, int)
- func (h *IPAMHandler) UpdateCacheWithIpAddress(key ficV1.HostSpec, ipAdd string)
- func (h *IPAMHandler) UpdateResourceRef(key ficV1.HostSpec, ref ResourceRef)
- type ResourceRef
Constants ¶
View Source
const ( IPAMNamespace = "kube-system" NotEnabled = iota InvalidInput NotRequested Requested Allocated )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPAMHandler ¶
type IPAMHandler struct { IPAMCR string IpamCli *ipammachinery.IPAMClient FirstPostResponse bool // key is IPSec.Key and value is map of ResouceInfo IpamResourceStore map[ficV1.HostSpec]map[ResourceRef]struct{} // contains filtered or unexported fields }
func NewIpamHandler ¶
func NewIpamHandler(ctlrId string, config *rest.Config, ipamCli *ipammachinery.IPAMClient) *IPAMHandler
func (*IPAMHandler) AddHostSpec ¶
func (h *IPAMHandler) AddHostSpec(key ficV1.HostSpec)
AddHostSpec function to add ipSpec to the ipam context
func (*IPAMHandler) CreateIPAMResource ¶
func (h *IPAMHandler) CreateIPAMResource() error
Create IPAM CRD
func (*IPAMHandler) GetIPAMCR ¶
func (h *IPAMHandler) GetIPAMCR() *ficV1.IPAM
func (*IPAMHandler) GetIpAddressForHostSpec ¶
func (h *IPAMHandler) GetIpAddressForHostSpec(key ficV1.HostSpec) (string, bool)
GetIpAddressForHostSpec function to check if fic ipSpec exists in the ipam context
func (*IPAMHandler) ReleaseIP ¶
func (h *IPAMHandler) ReleaseIP(ipamLabel string, host string, key string, ref ResourceRef) string
func (*IPAMHandler) RemoveIPAMCRHostSpec ¶
func (*IPAMHandler) RemoveResourceRef ¶
func (h *IPAMHandler) RemoveResourceRef(key ficV1.HostSpec, ref ResourceRef)
RemoveResourceRef function to remove the resource ref entry from IPAM Resource store
func (*IPAMHandler) RemoveUnusedIPAMEntries ¶
func (h *IPAMHandler) RemoveUnusedIPAMEntries()
func (*IPAMHandler) RequestIP ¶
func (h *IPAMHandler) RequestIP(ipamLabel string, host string, key string, ref ResourceRef) (string, int)
Request IPAM for virtual IP address
func (*IPAMHandler) UpdateCacheWithIpAddress ¶
func (h *IPAMHandler) UpdateCacheWithIpAddress(key ficV1.HostSpec, ipAdd string)
function to add ipSpec to the ipam context
func (*IPAMHandler) UpdateResourceRef ¶
func (h *IPAMHandler) UpdateResourceRef(key ficV1.HostSpec, ref ResourceRef)
UpdateResourceRef function to update the IPAM Resource store
type ResourceRef ¶
Click to show internal directories.
Click to hide internal directories.