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 { // GetPoolByKey returns IPPool for the provided pool name or nil if pool doesn't exist GetPoolByKey(key string) *Pool // GetPools returns map with information about all pools GetPools() map[string]*Pool }
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 ExclusionRange ¶ added in v0.2.0
ExclusionRange contains range of IP to exclude from the allocation
type Manager ¶
type Manager interface { ConfigReader // Update Pool's config from IPPool CR UpdatePool(key string, pool *Pool) // Remove Pool's config by key RemovePool(key string) }
Manager provide access to pools configuration
func NewManager ¶ added in v0.1.0
func NewManager() Manager
NewManager create and initialize new manager instance
type Pool ¶ added in v0.2.0
type Pool struct { Name string `json:"-"` Subnet string `json:"subnet"` StartIP string `json:"startIP"` EndIP string `json:"endIP"` Gateway string `json:"gateway"` Exclusions []ExclusionRange `json:"exclusions"` Routes []Route `json:"routes"` DefaultGateway bool `json:"defaultGateway"` }
Pool represents generic pool configuration
Click to show internal directories.
Click to hide internal directories.