Documentation ¶
Index ¶
- Constants
- func GenerateControlPlaneSecurityGroupName(clusterName string) string
- func GenerateControlPlaneSubnetName(clusterName string) string
- func GenerateFQDN(publicIPName, location string) string
- func GenerateInternalLBName(clusterName string) string
- func GenerateNodeRouteTableName(clusterName string) string
- func GenerateNodeSecurityGroupName(clusterName string) string
- func GenerateNodeSubnetName(clusterName string) string
- func GenerateOSDiskName(clusterName string) string
- func GeneratePublicIPName(clusterName, hash string) string
- func GeneratePublicLBName(clusterName string) string
- func GenerateVnetName(clusterName string) string
- func ResourceNotFound(err error) bool
- 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" // 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" // 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 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 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 ¶ added in v0.2.1
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 GenerateVnetName ¶
GenerateVnetName generates a virtual network name, based on the cluster name.
func ResourceNotFound ¶
ResourceNotFound parses the error to check if its a resource not found
Types ¶
type FakeCachedService ¶
FakeCachedService updates the cache with name whenever reconcile is called
func (*FakeCachedService) Delete ¶
func (s *FakeCachedService) Delete(ctx context.Context, spec v1alpha1.ResourceSpec) error
Delete returns fake success.
func (*FakeCachedService) Get ¶
func (s *FakeCachedService) Get(ctx context.Context, spec v1alpha1.ResourceSpec) (interface{}, error)
Get returns fake success.
func (*FakeCachedService) Reconcile ¶ added in v0.2.1
func (s *FakeCachedService) Reconcile(ctx context.Context, spec v1alpha1.ResourceSpec) error
Reconcile 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 v1alpha1.ResourceSpec) error
Delete returns fake failure.
func (*FakeFailureService) Get ¶
func (s *FakeFailureService) Get(ctx context.Context, spec v1alpha1.ResourceSpec) (interface{}, error)
Get returns fake failure.
func (*FakeFailureService) Reconcile ¶ added in v0.2.1
func (s *FakeFailureService) Reconcile(ctx context.Context, spec v1alpha1.ResourceSpec) error
Reconcile 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 v1alpha1.ResourceSpec) error
Delete returns fake not found.
func (*FakeNotFoundService) Get ¶
func (s *FakeNotFoundService) Get(ctx context.Context, spec v1alpha1.ResourceSpec) (interface{}, error)
Get returns fake not found.
func (*FakeNotFoundService) Reconcile ¶ added in v0.2.1
func (s *FakeNotFoundService) Reconcile(ctx context.Context, spec v1alpha1.ResourceSpec) error
Reconcile 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 v1alpha1.ResourceSpec) error
Delete returns fake success.
func (*FakeSuccessService) Get ¶
func (s *FakeSuccessService) Get(ctx context.Context, spec v1alpha1.ResourceSpec) (interface{}, error)
Get returns fake success.
func (*FakeSuccessService) Reconcile ¶ added in v0.2.1
func (s *FakeSuccessService) Reconcile(ctx context.Context, spec v1alpha1.ResourceSpec) error
Reconcile returns fake success.
type GetterService ¶ added in v0.2.1
type GetterService interface { Get(ctx context.Context, spec v1alpha1.ResourceSpec) (interface{}, error) Reconcile(ctx context.Context, spec v1alpha1.ResourceSpec) error Delete(ctx context.Context, spec v1alpha1.ResourceSpec) 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 v1alpha1.ResourceSpec) error Delete(ctx context.Context, spec v1alpha1.ResourceSpec) error }
Service is a generic interface used by components offering a type of service. Example: virtualnetworks service would offer Reconcile/Delete methods.
Directories ¶
Path | Synopsis |
---|---|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
services
|
|
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
Package mock_groups is a generated GoMock package.
|
Package mock_groups is a generated GoMock package. |
internalloadbalancers/mock_internalloadbalancers
Package mock_internalloadbalancers is a generated GoMock package.
|
Package mock_internalloadbalancers is a generated GoMock package. |
networkinterfaces/mock_networkinterfaces
Package mock_networkinterfaces is a generated GoMock package.
|
Package mock_networkinterfaces is a generated GoMock package. |
publicips/mock_publicips
Package mock_publicips is a generated GoMock package.
|
Package mock_publicips is a generated GoMock package. |
publicloadbalancers/mock_publicloadbalancers
Package mock_publicloadbalancers is a generated GoMock package.
|
Package mock_publicloadbalancers is a generated GoMock package. |
routetables/mock_routetables
Package mock_routetables is a generated GoMock package.
|
Package mock_routetables is a generated GoMock package. |
securitygroups/mock_securitygroups
Package mock_securitygroups is a generated GoMock package.
|
Package mock_securitygroups is a generated GoMock package. |
subnets/mock_subnets
Package mock_subnets is a generated GoMock package.
|
Package mock_subnets is a generated GoMock package. |
virtualmachineextensions/mock_virtualmachineextensions
Package mock_virtualmachineextensions is a generated GoMock package.
|
Package mock_virtualmachineextensions is a generated GoMock package. |
virtualmachines/mock_virtualmachines
Package mock_virtualmachines is a generated GoMock package.
|
Package mock_virtualmachines is a generated GoMock package. |
virtualnetworks/mock_virtualnetworks
Package mock_virtualnetworks is a generated GoMock package.
|
Package mock_virtualnetworks is a generated GoMock package. |