Documentation ¶
Index ¶
- Constants
- func ConnectToComputeService(ctx context.Context, serviceAccount string) (*compute.Service, string, error)
- func GetCredentialsForCluster(cloud kubermaticv1.CloudSpec, ...) (serviceAccount string, err error)
- func GetGCPNetwork(ctx context.Context, sa, networkName string) (apiv1.GCPNetwork, error)
- func GetGCPSubnetwork(ctx context.Context, sa, region, subnetworkName string) (apiv1.GCPSubnetwork, error)
- func GetMachineSize(ctx context.Context, machineType, sa, zone string) (*provider.NodeCapacity, error)
- func NewCloudProvider(secretKeyGetter provider.SecretKeySelectorValueFunc) provider.CloudProvider
- func ToGCPNetworkAPIModel(network *compute.Network) apiv1.GCPNetwork
- func ToGCPSubnetworkAPIModel(subnetwork *compute.Subnetwork) apiv1.GCPSubnetwork
- func ValidateCredentials(ctx context.Context, serviceAccount string) error
- type GCPSubnetworkGetter
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 GetGCPSubnetwork ¶
func GetMachineSize ¶
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
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.
Click to show internal directories.
Click to hide internal directories.