azurestackhci

package
v1.1.13-hotfix.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultUserName is the default username for created vm
	DefaultUserName = "clouduser"
	// DefaultVnetCIDR is the default Vnet CIDR
	DefaultVnetCIDR = "10.0.0.0/8"
	// DefaultVnetRouteDestinationPrefix is the destination prefix of the default Vnet route
	DefaultVnetRouteDestinationPrefix = "0.0.0.0/0"
	// DefaultVnetRouteNextHop is the next hop of the default Vnet route
	DefaultVnetRouteNextHop = "10.0.0.1"
	// DefaultControlPlaneSubnetCIDR is the default Control Plane Subnet CIDR
	DefaultControlPlaneSubnetCIDR = "10.0.0.0/16"
	// DefaultNodeSubnetCIDR is the default Node Subnet CIDR
	DefaultNodeSubnetCIDR = "10.1.0.0/16"
	// DefaultInternalLBIPAddress is the default internal load balancer ip address
	DefaultInternalLBIPAddress = "10.0.0.100"
	// DefaultAzureStackHCIDNSZone is the default provided azurestackhci dns zone
	DefaultAzureStackHCIDNSZone = "cloudapp.azurestackhci.com"
	// UserAgent used for communicating with azurestackhci
	UserAgent = "cluster-api-azurestackhci-services"
)
View Source
const (
	// DefaultImageOfferID is the default image offer ID
	DefaultImageOfferID = "linux"
	// DefaultImageSKU is the default image SKU
	DefaultImageSKU = "linux"
	// DefaultImagePublisherID is the default publisher ID
	DefaultImagePublisherID = "na"
	// LatestVersion is the image version latest
	LatestVersion = "latest"
)
View Source
const (
	// Role is used to distinguish api server lb from other lbs.
	// used by SDN integration
	LBRoleTagName         = "Role"
	LBRoleAksHciApiServer = "AKSHCI_APISERVER"
)

Variables

View Source
var SupportedAvailabilityZoneLocations = []string{

	"centralus",
	"eastus",
	"eastus2",
	"westus2",

	"francecentral",
	"northeurope",
	"uksouth",
	"westeurope",

	"japaneast",
	"southeastasia",
}

SupportedAvailabilityZoneLocations is a slice of the locations where Availability Zones are supported. This is used to validate whether a virtual machine should leverage an Availability Zone. Based on the Availability Zones listed in https://docs.microsoft.com/en-us/azure/availability-zones/az-overview

Functions

func GenerateAzureStackHCILoadBalancerMachineName added in v0.3.7

func GenerateAzureStackHCILoadBalancerMachineName(loadBalancerName string) (string, error)

GenerateAzureStackHCILoadBalancerMachineName generates the name of a load balancer machine based on the name of the load balancer.

func GenerateAzureStackHCILoadBalancerName

func GenerateAzureStackHCILoadBalancerName(clusterName string) string

GenerateAzureStackHCILoadBalancerName generates the name of a load balancer based on the name of a cluster.

func GenerateBackendPoolName

func GenerateBackendPoolName(clusterName string) string

GenerateBackendPoolName generates the name of a backend pool based on the name of a cluster. This backend pool name should be used by control plane and worker nodes.

func GenerateControlPlaneBackendPoolName

func GenerateControlPlaneBackendPoolName(clusterName string) string

GenerateControlPlaneBackendPoolName generates the name of a control plane backend pool based on the name of a cluster. This backend pool name should be used by the control plane only

func GenerateControlPlaneSecurityGroupName

func GenerateControlPlaneSecurityGroupName(clusterName string) string

GenerateControlPlaneSecurityGroupName generates a control plane security group name, based on the cluster name.

func GenerateControlPlaneSubnetName

func GenerateControlPlaneSubnetName(clusterName string) string

GenerateControlPlaneSubnetName generates a node subnet name, based on the cluster name.

func GenerateFQDN

func GenerateFQDN(publicIPName, location string) string

GenerateFQDN generates a fully qualified domain name, based on the public IP name and cluster location.

func GenerateIPConfigName added in v1.1.11

func GenerateIPConfigName(nicName string, index int) string

GenerateIPConfigName generates the name of an ipconfiguration based on the nic name.

func GenerateNICName

func GenerateNICName(machineName string) string

GenerateNICName generates the name of a network interface based on the name of a VM.

func GenerateNodeRouteTableName

func GenerateNodeRouteTableName(clusterName string) string

GenerateNodeRouteTableName generates a node route table name, based on the cluster name.

func GenerateNodeSecurityGroupName

func GenerateNodeSecurityGroupName(clusterName string) string

GenerateNodeSecurityGroupName generates a node security group name, based on the cluster name.

func GenerateNodeSubnetName

func GenerateNodeSubnetName(clusterName string) string

GenerateNodeSubnetName generates a node subnet name, based on the cluster name.

func GenerateOSDiskName

func GenerateOSDiskName(machineName string) string

GenerateOSDiskName generates the name of an OS disk based on the name of a VM.

func GenerateVnetName

func GenerateVnetName(clusterName string) string

GenerateVnetName generates a virtual network name, based on the cluster name.

func GetDefaultImage

func GetDefaultImage(osType infrav1.OSType, k8sVersion string) (*infrav1.Image, error)

GetDefaultImage returns the default image spec for the provided OS and version of Kubernetes.

func ResourceAlreadyExists

func ResourceAlreadyExists(err error) bool

ResourceAlreadyExists parses the error to check if its a resource already exists

func ResourceNotFound

func ResourceNotFound(err error) bool

ResourceNotFound parses the error to check if its a resource not found

Types

type GetterService

type GetterService interface {
	Get(ctx context.Context, spec interface{}) (interface{}, error)
	Reconcile(ctx context.Context, spec interface{}) error
	Delete(ctx context.Context, spec interface{}) error
}

GetterService is a temporary interface used by components which still require Get methods. Once all components move to storing provider information within the relevant Cluster/Machine specs, this interface should be removed.

type Service

type Service interface {
	Reconcile(ctx context.Context, spec interface{}) error
	Delete(ctx context.Context, spec interface{}) error
}

Service is a generic interface used by components offering a type of service. Example: virtualnetworks service would offer Reconcile/Delete methods.

Jump to

Keyboard shortcuts

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