client

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEphemeralIPsFromCluster

func GetEphemeralIPsFromCluster(client *metalgo.Driver, projectID, clusterID string) ([]*models.V1IPResponse, []*models.V1IPResponse, error)

GetEphemeralIPsFromCluster return all ephemeral IPs for given project and cluster

func GetPrivateNetworkFromNodeNetwork

func GetPrivateNetworkFromNodeNetwork(client *metalgo.Driver, 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(client *metalgo.Driver, projectID string, nodeNetworkCIDR string) ([]*models.V1NetworkResponse, error)

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

func GetProjectByID

func GetProjectByID(client *cloudclient.Cloud, projectID string) (*models.V1Project, error)

GetProjectByID returns a project by a given ID

func NewClient

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

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

func NewClientFromCredentials

func NewClientFromCredentials(credentials *metal.Credentials) (*metalgo.Driver, error)

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

func NewCloudClient

func NewCloudClient(ctx context.Context, k8sClient client.Client, secretRef *corev1.SecretReference) (*cloudclient.Cloud, error)

NewCloudClient returns a new cloud client with the provider credentials from a given secret reference.

func NewCloudClientFromCredentials

func NewCloudClientFromCredentials(credentials *metal.Credentials) (*cloudclient.Cloud, error)

NewCloudClientFromCredentials returns a new cloud 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(client *metalgo.Driver, 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