config

package
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigMapKey is the name of the key in ConfigMap which store
	// configuration
	ConfigMapKey = "config"
)

Variables

This section is empty.

Functions

func ValidatePool added in v0.1.0

func ValidatePool(name string, subnet string, gateway string, blockSize int) error

ValidatePool validates the IPPool parameters

Types

type Config

type Config struct {
	// configuration for IP pools
	Pools map[string]PoolConfig `json:"pools"`
	// selector for nodes, if empty match all nodes
	NodeSelector map[string]string `json:"nodeSelector"`
}

Config contains configuration for IPAM controller

func (*Config) Validate

func (c *Config) Validate() error

Validate validates IPAM controller config

type PoolConfig

type PoolConfig struct {
	// subnet of the pool
	Subnet string `json:"subnet"`
	// amount of IPs to allocate for each node,
	// must be less than amount of available IPs in the subnet
	PerNodeBlockSize int `json:"perNodeBlockSize"`
	// gateway for the pool, defaults to the first IP of the Subnet if not set
	Gateway string `json:"gateway"`
}

PoolConfig contains configuration for IP pool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL