Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateFQDN(publicIPName, location string) string
- func GenerateInternalLBName(clusterName string) string
- func GenerateNICName(machineName string) string
- func GenerateNodeOutboundIPName(clusterName string) string
- func GenerateNodePublicIPName(nicName string) string
- func GenerateOSDiskName(machineName string) string
- func GeneratePublicIPName(clusterName, hash string) string
- func GeneratePublicLBName(clusterName string) string
- func GetDefaultUbuntuImage(k8sVersion string) (*infrav1.Image, error)
- func ResourceNotFound(err error) bool
- func UserAgent() string
- type CredentialGetter
- type FakeCachedService
- type FakeFailureService
- type FakeNotFoundService
- type FakeStruct
- type FakeSuccessService
- type GetterService
- type Service
Constants ¶
const ( // DefaultUserName is the default username for created vm DefaultUserName = "capi" // DefaultInternalLBIPAddress is the default internal load balancer ip address DefaultInternalLBIPAddress = "10.0.0.100" // DefaultAzureDNSZone is the default provided azure dns zone DefaultAzureDNSZone = "cloudapp.azure.com" )
const ( // DefaultImageOfferID is the default Azure Marketplace offer ID DefaultImageOfferID = "capi" // DefaultImagePublisherID is the default Azure Marketplace publisher ID DefaultImagePublisherID = "cncf-upstream" // LatestVersion is the image version latest LatestVersion = "latest" )
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 GenerateFQDN ¶
GenerateFQDN generates a fully qualified domain name, based on the public IP name and cluster location.
func GenerateInternalLBName ¶
GenerateInternalLBName generates a internal load balancer name, based on the cluster name.
func GenerateNICName ¶
GenerateNICName generates the name of a network interface based on the name of a VM.
func GenerateNodeOutboundIPName ¶ added in v0.4.5
GenerateNodeOutboundIPName generates a public IP name, based on the cluster name.
func GenerateNodePublicIPName ¶ added in v0.4.5
GenerateNodePublicIPName generates a node public IP name, based on the NIC name.
func GenerateOSDiskName ¶
GenerateOSDiskName generates the name of an OS disk based on the name of a VM.
func GeneratePublicIPName ¶
GeneratePublicIPName generates a public IP name, based on the cluster name and a hash.
func GeneratePublicLBName ¶
GeneratePublicLBName generates a public load balancer name, based on the cluster name.
func GetDefaultUbuntuImage ¶
GetDefaultUbuntuImage returns the default image spec for Ubuntu.
func ResourceNotFound ¶
ResourceNotFound parses the error to check if it's a resource not found
Types ¶
type CredentialGetter ¶ added in v0.4.4
type CredentialGetter interface { GetterService GetCredentials(ctx context.Context, group string, cluster string) ([]byte, error) }
CredentialGetter is a GetterService which knows how to retrieve credentials for an Azure resource in a resource group.
type FakeCachedService ¶
FakeCachedService updates the cache with name whenever reconcile is called
func (*FakeCachedService) Delete ¶
func (s *FakeCachedService) Delete(ctx context.Context, spec interface{}) error
Delete returns fake success.
type FakeFailureService ¶
type FakeFailureService struct { }
FakeFailureService generic service which always returns failure.
func (*FakeFailureService) Delete ¶
func (s *FakeFailureService) Delete(ctx context.Context, spec interface{}) error
Delete returns fake failure.
type FakeNotFoundService ¶
type FakeNotFoundService struct { }
FakeNotFoundService generic service which always returns not found
func (*FakeNotFoundService) Delete ¶
func (s *FakeNotFoundService) Delete(ctx context.Context, spec interface{}) error
Delete returns fake not found.
type FakeSuccessService ¶
type FakeSuccessService struct { }
FakeSuccessService generic service which always returns success.
func (*FakeSuccessService) Delete ¶
func (s *FakeSuccessService) Delete(ctx context.Context, spec interface{}) error
Delete returns fake success.
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.
Directories ¶
Path | Synopsis |
---|---|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
services
|
|
agentpools/mock_agentpools
Package mock_agentpools is a generated GoMock package.
|
Package mock_agentpools is a generated GoMock package. |
availabilityzones/mock_availabilityzones
Package mock_availabilityzones is a generated GoMock package.
|
Package mock_availabilityzones is a generated GoMock package. |
disks/mock_disks
Package mock_disks is a generated GoMock package.
|
Package mock_disks is a generated GoMock package. |
groups/mock_groups
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
inboundnatrules/mock_inboundnatrules
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
internalloadbalancers/mock_internalloadbalancers
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
managedclusters/mock_managedclusters
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
networkinterfaces/mock_networkinterfaces
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
publicips/mock_publicips
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
publicloadbalancers/mock_publicloadbalancers
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
resourceskus/mock_resourceskus
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
roleassignments/mock_roleassignments
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
routetables/mock_routetables
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
scalesets/mock_scalesets
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
securitygroups/mock_securitygroups
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
subnets/mock_subnets
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
virtualmachineextensions/mock_virtualmachineextensions
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
virtualmachines/mock_virtualmachines
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
virtualnetworks/mock_virtualnetworks
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |