Documentation ¶
Index ¶
- Constants
- func GenerateControlPlaneSecurityGroupName(clusterName string) string
- func GenerateControlPlaneSubnetName(clusterName string) string
- func GenerateDataDiskName(machineName, suffix string) string
- func GenerateFQDN(publicIPName, location string) string
- func GenerateInternalLBName(clusterName string) string
- func GenerateMachineProviderID(subscriptionID, resourceGroupName, machineName string) string
- func GenerateMachinePublicIPName(clusterName, machineName string) (string, error)
- func GenerateManagedIdentityName(subscriptionID, resourceGroupName, managedIdentityName string) string
- func GenerateNetworkInterfaceName(machineName string) string
- func GenerateNodeRouteTableName(clusterName string) string
- func GenerateNodeSecurityGroupName(clusterName string) string
- func GenerateNodeSubnetName(clusterName string) string
- func GenerateOSDiskName(machineName string) string
- func GeneratePublicIPName(clusterName, hash string) string
- func GeneratePublicLBName(clusterName string) string
- func GenerateVnetName(clusterName string) string
- func InvalidCredentials(err error) bool
- func ResourceNotFound(err error) bool
- type FakeCachedService
- type FakeFailureService
- type FakeNotFoundService
- type FakeStruct
- type FakeSuccessService
- type Service
- type Spec
Constants ¶
const ( // DefaultUserName is the default username for created vm DefaultUserName = "capi" // DefaultVnetCIDR is the default Vnet CIDR DefaultVnetCIDR = "10.0.0.0/8" // 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" // DefaultAzureDNSZone is the default provided azure dns zone DefaultAzureDNSZone = "cloudapp.azure.com" )
const (
// UserAgent used for communicating with azure
UserAgent = "cluster-api-azure-services"
)
Variables ¶
This section is empty.
Functions ¶
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 GenerateDataDiskName ¶
GenerateDataDiskName generates Data disks names used by VM
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 GenerateMachineProviderID ¶
GenerateMachineProviderID generates machine provider id.
func GenerateMachinePublicIPName ¶
GenerateMachinePublicIPName generates a public IP name for a machine, based on the cluster name and a hash.
func GenerateManagedIdentityName ¶
func GenerateManagedIdentityName(subscriptionID, resourceGroupName, managedIdentityName string) string
GenerateManagedIdentityName generates managed identity name.
func GenerateNetworkInterfaceName ¶
GenerateNetworkInterfaceName generates network interface name used by 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 OS disk name used by 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 GenerateVnetName ¶
GenerateVnetName generates a virtual network name, based on the cluster name.
func InvalidCredentials ¶
InvalidCredentials parses the error to check if its an invalid credentials error
func ResourceNotFound ¶
ResourceNotFound parses the error to check if its a resource not found
Types ¶
type FakeCachedService ¶
FakeCachedService updates the cache with name whenefver createorupdate is called
func (*FakeCachedService) CreateOrUpdate ¶
func (s *FakeCachedService) CreateOrUpdate(ctx context.Context, spec Spec) error
CreateOrUpdate returns fake success.
type FakeFailureService ¶
type FakeFailureService struct { }
FakeFailureService generic service which always returns failure.
func (*FakeFailureService) CreateOrUpdate ¶
func (s *FakeFailureService) CreateOrUpdate(ctx context.Context, spec Spec) error
CreateOrUpdate returns fake failure.
type FakeNotFoundService ¶
type FakeNotFoundService struct { }
FakeNotFoundService generic service which always returns not found
func (*FakeNotFoundService) CreateOrUpdate ¶
func (s *FakeNotFoundService) CreateOrUpdate(ctx context.Context, spec Spec) error
CreateOrUpdate returns fake not found.
type FakeSuccessService ¶
type FakeSuccessService struct { }
FakeSuccessService generic service which always returns success.
func (*FakeSuccessService) CreateOrUpdate ¶
func (s *FakeSuccessService) CreateOrUpdate(ctx context.Context, spec Spec) error
CreateOrUpdate returns fake success.
type Service ¶
type Service interface { Get(ctx context.Context, spec Spec) (interface{}, error) CreateOrUpdate(ctx context.Context, spec Spec) error Delete(ctx context.Context, spec Spec) error }
Service is a generic interface used by components offering a type of service. example: Network service would offer get/createorupdate/delete.
Directories ¶
Path | Synopsis |
---|---|
Package mock_azure is a generated GoMock package.
|
Package mock_azure is a generated GoMock package. |
services
|
|
resourceskus/mock_resourceskus
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |