Documentation ¶
Index ¶
Constants ¶
View Source
const (
IPBlocksAnnotation = "ipam.nvidia.com/ip-blocks"
)
Variables ¶
This section is empty.
Functions ¶
func IPBlockAnnotationExists ¶
IPBlockAnnotationExists returns true if ip-block annotation exist
func RemoveIPBlockAnnotation ¶
RemoveIPBlockAnnotation removes annotation with ip-block from the node object
Types ¶
type ConfigReader ¶ added in v0.1.0
type ConfigReader interface { // GetPoolByName returns IPPool for the provided pool name or nil if pool doesnt exist GetPoolByName(name string) *IPPool // GetPools returns map with information about all pools GetPools() map[string]*IPPool }
ConfigReader is an interface to which provides access to the pool configuration
func NewConfigReader ¶ added in v0.1.0
func NewConfigReader(node *v1.Node) (ConfigReader, error)
type IPPool ¶
type IPPool struct { Name string `json:"-"` Subnet string `json:"subnet"` StartIP string `json:"startIP"` EndIP string `json:"endIP"` Gateway string `json:"gateway"` }
IPPool represents a block of IPs from a given Subnet
type Manager ¶
type Manager interface { ConfigReader // Update Pool's config from IPPool CR UpdatePool(pool *IPPool) // Remove Pool's config RemovePool(poolName string) }
Manager provide access to pools configuration
func NewManager ¶ added in v0.1.0
func NewManager() Manager
NewManager create and initialize new manager instance
Click to show internal directories.
Click to hide internal directories.