Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultConfDir is the default dir where configurations are found DefaultConfDir = "/etc/cni/net.d/nv-ipam.d" // DefaultDataDir is the default dir where cni stores data and binaries DefaultDataDir = "/var/lib/cni/nv-ipam" // DefaultLogFile default log file path to be used for logging DefaultLogFile = "/var/log/nv-ipam-cni.log" // HostLocalDataDir is the relative path within the data dir for host-local state data HostLocalDataDir = "state/host-local" // K8sNodeNameFile is the file name containing k8s node name K8sNodeNameFile = "k8s-node-name" // DefaultKubeConfigFileName is the default name of kubeconfig file DefaultKubeConfigFileName = "nv-ipam.kubeconfig" // ConfFileName is the name of CNI configuration file found in conf dir ConfFileName = "nv-ipam.conf" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostLocalIPAMConfig ¶
type HostLocalIPAMConfig struct { Type string `json:"type"` DataDir string `json:"dataDir"` Ranges []HostLocalRangeSet `json:"ranges"` }
type HostLocalNetConf ¶
type HostLocalNetConf struct { Name string `json:"name"` CNIVersion string `json:"cniVersion"` IPAM *HostLocalIPAMConfig `json:"ipam"` }
func HostLocalNetConfFromNetConfAndPool ¶
func HostLocalNetConfFromNetConfAndPool(nc *NetConf, p *pool.IPPool) *HostLocalNetConf
type HostLocalRange ¶
type HostLocalRangeSet ¶
type HostLocalRangeSet []HostLocalRange
type IPAMConf ¶
type IPAMConf struct { types.IPAM // PoolName is the name of the pool to be used to allocate IP PoolName string `json:"poolName,omitempty"` Kubeconfig string `json:"kubeconfig,omitempty"` DataDir string `json:"dataDir,omitempty"` ConfDir string `json:"confDir,omitempty"` LogFile string `json:"logFile,omitempty"` LogLevel string `json:"logLevel,omitempty"` // internal configuration NodeName string K8sClient *kubernetes.Clientset }
IPAMConf is the configuration supported by our CNI plugin
func LoadFromConfFile ¶
LoadFromConfFile returns *IPAMConf with values from config file located in filePath.
Click to show internal directories.
Click to hide internal directories.