client

package
v0.22.9 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindClusterFirewalls added in v0.15.1

func FindClusterFirewalls(ctx context.Context, client metalgo.Client, clusterTag, projectID string) ([]*models.V1FirewallResponse, error)

func GetEphemeralIPsFromCluster

func GetEphemeralIPsFromCluster(ctx context.Context, client metalgo.Client, projectID, clusterID string) ([]*models.V1IPResponse, []*models.V1IPResponse, error)

GetEphemeralIPsFromCluster return all ephemeral IPs for given project and cluster

func GetPrivateNetworkFromNodeNetwork

func GetPrivateNetworkFromNodeNetwork(ctx context.Context, client metalgo.Client, projectID string, nodeNetworkCIDR string) (*models.V1NetworkResponse, error)

GetPrivateNetworkFromNodeNetwork returns the private network that belongs to the given node network cidr and project.

func GetPrivateNetworksFromNodeNetwork

func GetPrivateNetworksFromNodeNetwork(ctx context.Context, client metalgo.Client, projectID string, nodeNetworkCIDR string) ([]*models.V1NetworkResponse, error)

GetPrivateNetworksFromNodeNetwork returns the private network that belongs to the given node network cidr and project.

func NewClient

func NewClient(ctx context.Context, k8sClient client.Client, endpoint string, secretRef *corev1.SecretReference) (metalgo.Client, error)

NewClient returns a new metal client with the provider credentials from a given secret reference.

func NewClientFromCredentials

func NewClientFromCredentials(endpoint string, credentials *metal.Credentials) (metalgo.Client, error)

NewClientFromCredentials returns a new metal client with the client constructed from the given credentials.

func ReadCredentialsFromSecretRef

func ReadCredentialsFromSecretRef(ctx context.Context, k8sClient client.Client, secretRef *corev1.SecretReference) (*metal.Credentials, error)

ReadCredentialsFromSecretRef returns metal credentials from the provider credentials from a given secret reference.

func UpdateIPInCluster

func UpdateIPInCluster(ctx context.Context, client metalgo.Client, ip *models.V1IPResponse, clusterID string) error

UpdateIPInCluster update the IP in the cluster to have only these tags left which are not from this cluster

Types

This section is empty.

Jump to

Keyboard shortcuts

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