Documentation ¶
Index ¶
Constants ¶
View Source
const ( DatastoreETCD = "etcd" DatastoreKubernetes = "kubernetes" )
Datastore types
View Source
const ( // Allocate operation identifier Allocate = 0 // Deallocate operation identifier Deallocate = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { AddressStr string `json:"address"` Gateway net.IP `json:"gateway,omitempty"` Address net.IPNet Version string }
Address is our standard address.
type IPAMConfig ¶
type IPAMConfig struct { Name string Type string `json:"type"` Routes []*cnitypes.Route `json:"routes"` Datastore string `json:"datastore"` Addresses []Address `json:"addresses,omitempty"` OmitRanges []string `json:"exclude,omitempty"` DNS cnitypes.DNS `json:"dns"` Range string `json:"range"` RangeStart net.IP `json:"range_start,omitempty"` RangeEnd net.IP `json:"range_end,omitempty"` GatewayStr string `json:"gateway"` EtcdHost string `json:"etcd_host,omitempty"` EtcdUsername string `json:"etcd_username,omitempty"` EtcdPassword string `json:"etcd_password,omitempty"` EtcdKeyFile string `json:"etcd_key_file,omitempty"` EtcdCertFile string `json:"etcd_cert_file,omitempty"` EtcdCACertFile string `json:"etcd_ca_cert_file,omitempty"` LogFile string `json:"log_file"` LogLevel string `json:"log_level"` Gateway net.IP Kubernetes KubernetesConfig `json:"kubernetes,omitempty"` ConfigurationPath string `json:"configuration_path"` }
IPAMConfig describes the expected json configuration for this plugin
type IPAMEnvArgs ¶
type IPAMEnvArgs struct { cnitypes.CommonArgs IP cnitypes.UnmarshallableString `json:"ip,omitempty"` GATEWAY cnitypes.UnmarshallableString `json:"gateway,omitempty"` }
IPAMEnvArgs are the environment vars we expect
type IPReservation ¶
type IPReservation struct { IP net.IP `json:"ip"` ContainerID string `json:"id"` PodRef string `json:"podref,omitempty"` }
IPReservation is an address that has been reserved by this plugin
type KubernetesConfig ¶
type KubernetesConfig struct { KubeConfigPath string `json:"kubeconfig,omitempty"` K8sAPIRoot string `json:"k8s_api_root,omitempty"` }
KubernetesConfig describes the kubernetes-specific configuration details
type Net ¶
type Net struct { Name string `json:"name"` CNIVersion string `json:"cniVersion"` IPAM *IPAMConfig `json:"ipam"` }
Net is The top-level network config - IPAM plugins are passed the full configuration of the calling plugin, not just the IPAM section.
Click to show internal directories.
Click to hide internal directories.