ibcni

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

README

CNI IPAM Driver

Infoblox IPAM Driver for CNI

cni-infoblox is an IPAM driver for CNI that interfaces with Infoblox to provide IP Address Management service. CNI is the generic plugin-based networking layer for supporting container runtime environments.

For a detailed description of the driver, including a step by step deployment example, refer to the community blog on the Infoblox website: CNI Networking and IPAM.

Prerequisite

  • A NIOS DDI Appliance with cloud automation License.

To use the plugin, you need access to the Infoblox DDI product. For evaluation purposes, you can download a virtual version of the product from the Infoblox Download Center and you can also assign temp license by login into the Infoblox DDI appliance console with this command set temp_license. Alternatively, if you are an existing Infoblox customer, you can download it from the support site.

Refer to CONFIG.md for details on vNIOS configuration.

  • Infoblox WAPI user should have the following permissions
Permission         Type	Resource	                            Resource Type        permission
[DHCP]	           All IPv4 DHCP Fixed Addresses/Reservations  IPv4 DHCP fixed address   RW
[DNS, DHCP, IPAM]  All Hosts                                   Host                      RW
[DHCP, DNS, IPAM]  All IPv4 Host Addresses                     IPv4 Host address         RW
[GRID]	           All Membes                                  Member                    RW
[DHCP, IPAM]       All IPv4 Networks                           IPv4 Network              RW
[DHCP, IPAM]       All Network Views                           Network view              RW
[CLOUD]	           All Tenants                                 Tenant                    RW
[DNS]	           All DNS Views                               DNS View                  RW

Configuring Supported container runtimes

Refer to the following links to configure each container runtime to use infoblox cni plugin:

  • Kubernetes - README-K8S.md
  • Rocket - With the Rocket(rkt), deallocate of IP does not work. Until rocket has latest cni, the infoblox plugin support will not be provided. Still configuring rocket to use infoblox cni plugin can be read at README-rkt.md

Development

  • Build - For dependencies and build instructions, refer to BUILD.md .

Limitations

  • Doesn't have Infoblox DNS support.
  • For one Kubernetes deployment only one Infoblox Network view can be used.

Troubleshoot

If you get a message Cloud Network Automation License not available or Infoblox WAPI user not having sufficient permissions. in the cni-infoblox-daemon log then you have to check for the "Cloud Network Automation License" has applied and also check for sufficient permissions for the "Infoblox WAPI User" as given in the prerequisite.

Documentation

Index

Constants

View Source
const (
	HTTP_REQUEST_TIMEOUT  = 60
	HTTP_POOL_CONNECTIONS = 10
)

Variables

This section is empty.

Functions

func GetDefaultSocketDir

func GetDefaultSocketDir() string

Types

type Config

type Config struct {
	GridConfig
	DriverConfig
}

func LoadConfig

func LoadConfig() (config *Config)

type Container

type Container struct {
	NetworkContainer string // CIDR of Network Container
	NetworkView      string // Network view
	ContainerObj     *ibclient.NetworkContainer
	// contains filtered or unexported fields
}

type DriverConfig

type DriverConfig struct {
	SocketDir        string
	DriverName       string
	NetworkView      string
	NetworkContainer string
	PrefixLength     uint
	ClusterName      string
}

type DriverSocket

type DriverSocket struct {
	SocketDir  string
	DriverName string

	SocketFile string
}

func NewDriverSocket

func NewDriverSocket(socketDir string, driverName string) *DriverSocket

func (*DriverSocket) GetSocketFile

func (s *DriverSocket) GetSocketFile() string

func (*DriverSocket) SetupSocket

func (s *DriverSocket) SetupSocket() string

type ExtCmdArgs

type ExtCmdArgs struct {
	skel.CmdArgs
	IfMac string
}

Extend skel.CmdArgs to include IfMac IfMac is set in the plugin and sent to the daemon

type GridConfig

type GridConfig struct {
	GridHost            string
	WapiVer             string
	WapiPort            string
	WapiUsername        string
	WapiPassword        string
	SslVerify           string
	HttpRequestTimeout  int
	HttpPoolConnections int
	HttpPoolMaxSize     int
}

type IBInfobloxDriver added in v1.0.0

type IBInfobloxDriver interface {
	RequestNetworkView(netviewName string) (string, error)
	RequestAddress(netviewName string, cidr string, ipAddr string, macAddr string, name string, vmID string) (string, error)
	GetAddress(netviewName string, cidr string, ipAddr string, macAddr string) (*ibclient.FixedAddress, error)
	UpdateAddress(fixedAddrRef string, macAddr string, name string, vmID string) (*ibclient.FixedAddress, error)
	ReleaseAddress(netviewName string, ipAddr string, macAddr string) (ref string, err error)
	RequestNetwork(netconf NetConfig, netviewName string) (network string, err error)
	CreateGateway(cidr string, gw net.IP, netviewName string) (string, error)
}

type IPAMConfig

type IPAMConfig struct {
	Type             string        `json:"type"`
	SocketDir        string        `json:"socket-dir"`
	NetworkView      string        `json:"network-view"`
	NetworkContainer string        `json:"network-container"`
	PrefixLength     uint          `json:"prefix-length"`
	Subnet           types.IPNet   `json:"subnet"`
	Gateway          net.IP        `json:"gateway"`
	Routes           []types.Route `json:"routes"`
}

type InfobloxDriver

type InfobloxDriver struct {
	Containers []Container

	DefaultNetworkView string
	DefaultPrefixLen   uint
	// contains filtered or unexported fields
}

func NewInfobloxDriver

func NewInfobloxDriver(objMgr ibclient.IBObjectManager, networkView string, networkContainer string, prefixLength uint) *InfobloxDriver

func (*InfobloxDriver) CreateGateway added in v1.0.0

func (ibDrv *InfobloxDriver) CreateGateway(cidr string, gw net.IP, netviewName string) (string, error)

func (*InfobloxDriver) GetAddress added in v1.0.0

func (ibDrv *InfobloxDriver) GetAddress(netviewName string, cidr string, ipAddr string, macAddr string) (*ibclient.FixedAddress, error)

func (*InfobloxDriver) ReleaseAddress

func (ibDrv *InfobloxDriver) ReleaseAddress(netviewName string, ipAddr string, macAddr string) (ref string, err error)

func (*InfobloxDriver) RequestAddress

func (ibDrv *InfobloxDriver) RequestAddress(netviewName string, cidr string, ipAddr string, macAddr string, name string, vmID string) (string, error)

func (*InfobloxDriver) RequestNetwork

func (ibDrv *InfobloxDriver) RequestNetwork(netconf NetConfig, netviewName string) (network string, err error)

func (*InfobloxDriver) RequestNetworkView

func (ibDrv *InfobloxDriver) RequestNetworkView(netviewName string) (string, error)

func (*InfobloxDriver) UpdateAddress added in v1.0.0

func (ibDrv *InfobloxDriver) UpdateAddress(fixedAddrRef string, macAddr string, name string, vmID string) (*ibclient.FixedAddress, error)

type NetConfig

type NetConfig struct {
	Name      string      `json:"name"`
	Type      string      `json:"type"`
	Bridge    string      `json:"bridge"`
	IsGateway bool        `json:"isGateway"`
	IPAM      *IPAMConfig `json:"ipam"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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