Documentation ¶
Index ¶
- func AllocateIP(client *metalgo.Driver, svc v1.Service, ...) (*models.V1IPResponse, error)
- func FindClusterIPs(client *metalgo.Driver, projectID, clusterID string) ([]*models.V1IPResponse, error)
- func FindProjectIP(client *metalgo.Driver, projectID, ip string) (*models.V1IPResponse, error)
- func FindProjectIPsWithTag(client *metalgo.Driver, projectID, tag string) ([]*models.V1IPResponse, error)
- func FreeIP(client *metalgo.Driver, ip string) error
- func GetMachine(client *metalgo.Driver, id string) (*models.V1MachineResponse, error)
- func GetMachineFromNode(client *metalgo.Driver, nodeName types.NodeName) (*models.V1MachineResponse, error)
- func GetMachineFromProviderID(client *metalgo.Driver, providerID string) (*models.V1MachineResponse, error)
- func GetMachinesFromNodes(client *metalgo.Driver, nodes []v1.Node) ([]*models.V1MachineResponse, error)
- func IPAddressesOfIPs(ips []*models.V1IPResponse) []string
- func ListNetworks(client *metalgo.Driver) ([]*models.V1NetworkResponse, error)
- func NetworksByID(nws []*models.V1NetworkResponse) map[string]*models.V1NetworkResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllocateIP ¶
func AllocateIP(client *metalgo.Driver, svc v1.Service, namePrefix, project, network, clusterID string) (*models.V1IPResponse, error)
AllocateIP acquires an IP within the given network for a given project.
func FindClusterIPs ¶
func FindClusterIPs(client *metalgo.Driver, projectID, clusterID string) ([]*models.V1IPResponse, error)
FindClusterIPs returns the IPs of the given cluster.
func FindProjectIP ¶
FindProjectIP returns the IP
func FindProjectIPsWithTag ¶
func FindProjectIPsWithTag(client *metalgo.Driver, projectID, tag string) ([]*models.V1IPResponse, error)
FindProjectIPsWithTag returns the IPs of the given project that also have the given tag.
func GetMachine ¶
GetMachine returns a metal machine by its ID.
func GetMachineFromNode ¶
func GetMachineFromNode(client *metalgo.Driver, nodeName types.NodeName) (*models.V1MachineResponse, error)
GetMachineFromNode returns a machine where hostname matches the kubernetes node.Name.
func GetMachineFromProviderID ¶
func GetMachineFromProviderID(client *metalgo.Driver, providerID string) (*models.V1MachineResponse, error)
GetMachineFromProviderID uses providerID to get the machine id and returns the machine.
func GetMachinesFromNodes ¶
func GetMachinesFromNodes(client *metalgo.Driver, nodes []v1.Node) ([]*models.V1MachineResponse, error)
GetMachinesFromNodes gets metal machines from K8s nodes.
func IPAddressesOfIPs ¶
func IPAddressesOfIPs(ips []*models.V1IPResponse) []string
IPAddressesOfIPs returns the IP address strings of the given ips.
func ListNetworks ¶
func ListNetworks(client *metalgo.Driver) ([]*models.V1NetworkResponse, error)
ListNetworks returns all networks.
func NetworksByID ¶
func NetworksByID(nws []*models.V1NetworkResponse) map[string]*models.V1NetworkResponse
NetworksByID returns networks as map with their ID as the key.
Types ¶
This section is empty.