gcp

package
v1.2.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const GcpMaxClusterNameLen int = 40

Variables

This section is empty.

Functions

func NewPlatform

func NewPlatform() platform.Platform

Types

type GCPFlavor

type GCPFlavor struct {
	GuestCPUs                    int
	MaximumPersistentDisksSizeGb string
	MemoryMb                     int
	Name                         string
}

type GCPPlatform

type GCPPlatform struct {
	// contains filtered or unexported fields
}

func (*GCPPlatform) CreateClusterPrerequisites

func (a *GCPPlatform) CreateClusterPrerequisites(ctx context.Context, clusterName string) error

CreateClusterPrerequisites currently does nothing

func (*GCPPlatform) GatherCloudletInfo

func (g *GCPPlatform) GatherCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) error

func (*GCPPlatform) GetCloudletInfraResourcesInfo

func (g *GCPPlatform) GetCloudletInfraResourcesInfo(ctx context.Context) ([]edgeproto.InfraResource, error)

func (*GCPPlatform) GetClusterAdditionalResourceMetric

func (g *GCPPlatform) GetClusterAdditionalResourceMetric(ctx context.Context, cloudlet *edgeproto.Cloudlet, resMetric *edgeproto.Metric, resources []edgeproto.VMResource) error

func (*GCPPlatform) GetClusterAdditionalResources

func (g *GCPPlatform) GetClusterAdditionalResources(ctx context.Context, cloudlet *edgeproto.Cloudlet, vmResources []edgeproto.VMResource, infraResMap map[string]edgeproto.InfraResource) map[string]edgeproto.InfraResource

called by controller, make sure it doesn't make any calls to infra API

func (*GCPPlatform) GetCredentials

func (g *GCPPlatform) GetCredentials(ctx context.Context, clusterName string) error

GetCredentials retrieves kubeconfig credentials from gcloud.

func (*GCPPlatform) GetFeatures

func (o *GCPPlatform) GetFeatures() *edgeproto.PlatformFeatures

func (*GCPPlatform) GetGcpProject

func (g *GCPPlatform) GetGcpProject() string

func (*GCPPlatform) GetGcpRegionFromZone

func (g *GCPPlatform) GetGcpRegionFromZone(zone string) (string, error)

func (*GCPPlatform) GetGcpZone

func (g *GCPPlatform) GetGcpZone() string

func (*GCPPlatform) GetRootLBClients

func (g *GCPPlatform) GetRootLBClients(ctx context.Context) (map[string]platform.RootLBClient, error)

func (*GCPPlatform) InitApiAccessProperties

func (m *GCPPlatform) InitApiAccessProperties(ctx context.Context, accessApi platform.AccessApi, vars map[string]string) error

func (*GCPPlatform) Login

func (g *GCPPlatform) Login(ctx context.Context) error

GCPLogin logs into google cloud

func (*GCPPlatform) NameSanitize

func (g *GCPPlatform) NameSanitize(clusterName string) string

func (*GCPPlatform) RunClusterCreateCommand

func (g *GCPPlatform) RunClusterCreateCommand(ctx context.Context, clusterName string, numNodes uint32, flavor string) error

RunClusterCreateCommand creates a kubernetes cluster on gcloud

func (*GCPPlatform) RunClusterDeleteCommand

func (g *GCPPlatform) RunClusterDeleteCommand(ctx context.Context, clusterName string) error

RunClusterDeleteCommand removes kubernetes cluster on gcloud

func (*GCPPlatform) SetProject

func (g *GCPPlatform) SetProject(ctx context.Context, project string) error

SetProject sets the project in gcloud config

func (*GCPPlatform) SetProperties

func (g *GCPPlatform) SetProperties(props *infracommon.InfraProperties) error

func (*GCPPlatform) SetZone

func (g *GCPPlatform) SetZone(ctx context.Context, zone string) error

SetZone sets the zone in gcloud config

type GCPQuotas

type GCPQuotas struct {
	Limit  float64
	Metric string
}

type GCPQuotasList

type GCPQuotasList struct {
	Quotas GCPQuotas
}

Jump to

Keyboard shortcuts

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