azure

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 (
	AZURE_USER     = "AZURE_USER"
	AZURE_PASSWORD = "AZURE_PASSWORD"
)
View Source
const AzureMaxResourceGroupNameLen int = 80
View Source
const NotFound = "could not be found"

Variables

View Source
var AccessVarProps = map[string]*edgeproto.PropertyInfo{
	AZURE_USER: {
		Name:      "Azure user name",
		Mandatory: true,
	},
	AZURE_PASSWORD: {
		Name:      "Azure user password",
		Mandatory: true,
	},
}

Functions

func NewPlatform

func NewPlatform() platform.Platform

Types

type AZFlavor

type AZFlavor struct {
	Disk  int
	Name  string
	RAM   int
	VCPUs int
}

type AZLimit

type AZLimit struct {
	CurrentValue string
	Limit        string
	LocalName    string
	Name         AZName
}

type AZName

type AZName struct {
	LocalizedValue string
	Value          string
}

type AzurePlatform

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

func (*AzurePlatform) CreateClusterPrerequisites

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

CreateClusterPrerequisites executes CreateResourceGroup to create a resource group

func (*AzurePlatform) CreateResourceGroup

func (a *AzurePlatform) CreateResourceGroup(ctx context.Context, group, location string) error

CreateResourceGroup creates azure resource group

func (*AzurePlatform) GatherCloudletInfo

func (a *AzurePlatform) GatherCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) error

func (*AzurePlatform) GetAzureLocation

func (a *AzurePlatform) GetAzureLocation() string

func (*AzurePlatform) GetAzurePass

func (a *AzurePlatform) GetAzurePass() string

func (*AzurePlatform) GetAzureUser

func (a *AzurePlatform) GetAzureUser() string

func (*AzurePlatform) GetCloudletInfraResourcesInfo

func (a *AzurePlatform) GetCloudletInfraResourcesInfo(ctx context.Context) ([]edgeproto.InfraResource, error)

func (*AzurePlatform) GetClusterAdditionalResourceMetric

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

func (*AzurePlatform) GetClusterAdditionalResources

func (a *AzurePlatform) 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 (*AzurePlatform) GetClusterPlatformClient

func (a *AzurePlatform) GetClusterPlatformClient(ctx context.Context, clusterInst *edgeproto.ClusterInst, clientType string) (ssh.Client, error)

func (*AzurePlatform) GetCredentials

func (a *AzurePlatform) GetCredentials(ctx context.Context, clusterName string) error

GetCredentials retrieves kubeconfig credentials from azure for the cluster just created

func (*AzurePlatform) GetFeatures

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

func (*AzurePlatform) GetNodePlatformClient

func (a *AzurePlatform) GetNodePlatformClient(ctx context.Context, node *edgeproto.CloudletMgmtNode) (ssh.Client, error)

func (*AzurePlatform) GetResourceGroupForCluster

func (a *AzurePlatform) GetResourceGroupForCluster(clusterName string) string

func (*AzurePlatform) GetRootLBClients

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

func (*AzurePlatform) InitApiAccessProperties

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

func (*AzurePlatform) ListCloudletMgmtNodes

func (a *AzurePlatform) ListCloudletMgmtNodes(ctx context.Context, clusterInsts []edgeproto.ClusterInst, vmAppInsts []edgeproto.AppInst) ([]edgeproto.CloudletMgmtNode, error)

func (*AzurePlatform) Login

func (a *AzurePlatform) Login(ctx context.Context) error

Login logs into azure

func (*AzurePlatform) NameSanitize

func (a *AzurePlatform) NameSanitize(clusterName string) string

func (*AzurePlatform) RunClusterCreateCommand

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

RunClusterCreateCommand creates a kubernetes cluster on azure

func (*AzurePlatform) RunClusterDeleteCommand

func (a *AzurePlatform) RunClusterDeleteCommand(ctx context.Context, clusterName string) error

RunClusterDeleteCommand removes the kubernetes cluster on azure

func (*AzurePlatform) SetProperties

func (a *AzurePlatform) SetProperties(props *infracommon.InfraProperties) error

Jump to

Keyboard shortcuts

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