Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateAzureStackHCILoadBalancerMachineName(loadBalancerName string) (string, error)
- func GenerateAzureStackHCILoadBalancerName(clusterName string) string
- func GenerateBackendPoolName(clusterName string) string
- func GenerateControlPlaneBackendPoolName(clusterName string) string
- func GenerateControlPlaneSecurityGroupName(clusterName string) string
- func GenerateControlPlaneSubnetName(clusterName string) string
- func GenerateFQDN(publicIPName, location string) string
- func GenerateIPConfigName(nicName string, index int) string
- func GenerateNICName(machineName string) string
- func GenerateNodeRouteTableName(clusterName string) string
- func GenerateNodeSecurityGroupName(clusterName string) string
- func GenerateNodeSubnetName(clusterName string) string
- func GenerateOSDiskName(machineName string) string
- func GenerateVnetName(clusterName string) string
- func GetDefaultImage(osType infrav1.OSType, k8sVersion string) (*infrav1.Image, error)
- func ResourceAlreadyExists(err error) bool
- func ResourceNotFound(err error) bool
- type GetterService
- type Service
Constants ¶
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" )
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" )
const ( // Role is used to distinguish api server lb from other lbs. // used by SDN integration LBRoleTagName = "Role" LBRoleAksHciApiServer = "AKSHCI_APISERVER" )
nolint: golint
Variables ¶
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
GenerateAzureStackHCILoadBalancerMachineName generates the name of a load balancer machine based on the name of the load balancer.
func GenerateAzureStackHCILoadBalancerName ¶
GenerateAzureStackHCILoadBalancerName generates the name of a load balancer based on the name of a cluster.
func GenerateBackendPoolName ¶
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 ¶
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 ¶
GenerateControlPlaneSecurityGroupName generates a control plane security group name, based on the cluster name.
func GenerateControlPlaneSubnetName ¶
GenerateControlPlaneSubnetName generates a node subnet name, based on the cluster name.
func GenerateFQDN ¶
GenerateFQDN generates a fully qualified domain name, based on the public IP name and cluster location.
func GenerateIPConfigName ¶ added in v1.1.11
GenerateIPConfigName generates the name of an ipconfiguration based on the nic name.
func GenerateNICName ¶
GenerateNICName generates the name of a network interface based on the name of a VM.
func GenerateNodeRouteTableName ¶
GenerateNodeRouteTableName generates a node route table name, based on the cluster name.
func GenerateNodeSecurityGroupName ¶
GenerateNodeSecurityGroupName generates a node security group name, based on the cluster name.
func GenerateNodeSubnetName ¶
GenerateNodeSubnetName generates a node subnet name, based on the cluster name.
func GenerateOSDiskName ¶
GenerateOSDiskName generates the name of an OS disk based on the name of a VM.
func GenerateVnetName ¶
GenerateVnetName generates a virtual network name, based on the cluster name.
func GetDefaultImage ¶
GetDefaultImage returns the default image spec for the provided OS and version of Kubernetes.
func ResourceAlreadyExists ¶
ResourceAlreadyExists parses the error to check if its a resource already exists
func ResourceNotFound ¶
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.