gcp

package
v3.0.0-...-d6c4d9c Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNetwork = "global/networks/default"
)

Variables

This section is empty.

Functions

func ConnectToComputeService

func ConnectToComputeService(ctx context.Context, serviceAccount string) (*compute.Service, string, error)

ConnectToComputeService establishes a service connection to the Compute Engine.

func GetCredentialsForCluster

func GetCredentialsForCluster(cloud kubermaticv1.CloudSpec, secretKeySelector provider.SecretKeySelectorValueFunc) (serviceAccount string, err error)

GetCredentialsForCluster returns the credentials for the passed in cloud spec or an error.

func GetGCPNetwork

func GetGCPNetwork(ctx context.Context, sa, networkName string) (apiv1.GCPNetwork, error)

func GetGCPSubnetwork

func GetGCPSubnetwork(ctx context.Context, sa, region, subnetworkName string) (apiv1.GCPSubnetwork, error)

func GetMachineSize

func GetMachineSize(ctx context.Context, machineType, sa, zone string) (*provider.NodeCapacity, error)

func NewCloudProvider

func NewCloudProvider(secretKeyGetter provider.SecretKeySelectorValueFunc) provider.CloudProvider

NewCloudProvider creates a new gcp provider.

func ToGCPNetworkAPIModel

func ToGCPNetworkAPIModel(network *compute.Network) apiv1.GCPNetwork

func ToGCPSubnetworkAPIModel

func ToGCPSubnetworkAPIModel(subnetwork *compute.Subnetwork) apiv1.GCPSubnetwork

func ValidateCredentials

func ValidateCredentials(ctx context.Context, serviceAccount string) error

Types

type GCPSubnetworkGetter

type GCPSubnetworkGetter = func(ctx context.Context, sa, region, subnetworkName string) (apiv1.GCPSubnetwork, error)

GCPSubnetworkGetter is a function to retrieve a single subnetwork.

Jump to

Keyboard shortcuts

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