metal

package
v0.7.11 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocateIP

func AllocateIP(client metalgo.Client, 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.Client, projectID, clusterID string) ([]*models.V1IPResponse, error)

FindClusterIPs returns the allowed IPs of the given cluster.

func FindProjectIP

func FindProjectIP(client metalgo.Client, projectID, ip string) (*models.V1IPResponse, error)

FindProjectIP returns the IP

func FindProjectIPsWithTag

func FindProjectIPsWithTag(client metalgo.Client, projectID, tag string) ([]*models.V1IPResponse, error)

FindProjectIPsWithTag returns the IPs of the given project that also have the given tag.

func FreeIP

func FreeIP(client metalgo.Client, ip string) error

FreeIP frees the given IP address.

Types

type MetalService added in v0.7.8

type MetalService struct {
	// contains filtered or unexported fields
}

func New added in v0.7.8

func New(client metalgo.Client, k8sclient clientset.Interface, projectID string) *MetalService

func (*MetalService) GetMachineFromNode added in v0.7.9

func (ms *MetalService) GetMachineFromNode(ctx context.Context, node *v1.Node) (*models.V1MachineResponse, error)

GetMachineFromNode try providerID first, otherwise node.Name to fetch the machine.

func (*MetalService) GetMachineFromNodeName added in v0.7.8

func (ms *MetalService) GetMachineFromNodeName(ctx context.Context, nodeName types.NodeName) (*models.V1MachineResponse, error)

GetMachineFromNodeName returns a machine where hostname matches the kubernetes node.Name.

func (*MetalService) GetMachineFromProviderID added in v0.7.8

func (ms *MetalService) GetMachineFromProviderID(ctx context.Context, providerID string) (*models.V1MachineResponse, error)

GetMachineFromProviderID uses providerID to get the machine id and returns the machine.

func (*MetalService) GetMachinesFromNodes added in v0.7.8

func (ms *MetalService) GetMachinesFromNodes(ctx context.Context, nodes []v1.Node) ([]*models.V1MachineResponse, error)

GetMachinesFromNodes gets metal machines from K8s nodes.

Jump to

Keyboard shortcuts

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