Documentation ¶
Index ¶
- func AllocateIP(client metalgo.Client, svc v1.Service, ...) (*models.V1IPResponse, error)
- func FindClusterIPs(client metalgo.Client, projectID, clusterID string) ([]*models.V1IPResponse, error)
- func FindProjectIP(client metalgo.Client, projectID, ip string) (*models.V1IPResponse, error)
- func FindProjectIPsWithTag(client metalgo.Client, projectID, tag string) ([]*models.V1IPResponse, error)
- func FreeIP(client metalgo.Client, ip string) error
- type MetalService
- func (ms *MetalService) GetMachineFromNode(ctx context.Context, node *v1.Node) (*models.V1MachineResponse, error)
- func (ms *MetalService) GetMachineFromNodeName(ctx context.Context, nodeName types.NodeName) (*models.V1MachineResponse, error)
- func (ms *MetalService) GetMachineFromProviderID(ctx context.Context, providerID string) (*models.V1MachineResponse, error)
- func (ms *MetalService) GetMachinesFromNodes(ctx context.Context, nodes []v1.Node) ([]*models.V1MachineResponse, error)
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 ¶
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.
Types ¶
type MetalService ¶ added in v0.7.8
type MetalService struct {
// contains filtered or unexported fields
}
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.
Click to show internal directories.
Click to hide internal directories.