gcp

package
v2.26.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 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 added in v2.21.0

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

func GetGCPSubnetwork added in v2.21.0

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

func GetMachineSize added in v2.22.0

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 added in v2.21.0

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

func ToGCPSubnetworkAPIModel added in v2.21.0

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

func ValidateCredentials added in v2.20.0

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

Types

type GCPSubnetworkGetter added in v2.21.0

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