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 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 ¶ added in v2.21.0
func GetGCPSubnetwork ¶ added in v2.21.0
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
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.
Click to show internal directories.
Click to hide internal directories.