azure

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
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

This section is empty.

Functions

func AddressPoolID added in v0.4.8

func AddressPoolID(subscriptionID, resourceGroup, loadBalancerName, backendPoolName string) string

AddressPoolID returns the azure resource ID for a given backend address pool.

func FrontendIPConfigID added in v0.4.8

func FrontendIPConfigID(subscriptionID, resourceGroup, loadBalancerName, configName string) string

FrontendIPConfigID returns the azure resource ID for a given frontend IP config.

func GenerateBackendAddressPoolName added in v0.4.8

func GenerateBackendAddressPoolName(lbName string) string

GenerateBackendAddressPoolName generates a load balancer backend address pool name.

func GenerateDataDiskName added in v0.4.6

func GenerateDataDiskName(machineName, nameSuffix string) string

GenerateDataDiskName generates the name of a data disk based on the name of a VM.

func GenerateFrontendIPConfigName added in v0.4.8

func GenerateFrontendIPConfigName(lbName string) string

GenerateFrontendIPConfigName generates a load balancer frontend IP config name.

func GenerateInternalLBName

func GenerateInternalLBName(clusterName string) string

GenerateInternalLBName generates a internal load balancer name, based on the cluster name.

func GenerateNICName

func GenerateNICName(machineName string) string

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

func GenerateNodeOutboundIPName added in v0.4.5

func GenerateNodeOutboundIPName(clusterName string) string

GenerateNodeOutboundIPName generates a public IP name, based on the cluster name.

func GenerateNodePublicIPName added in v0.4.5

func GenerateNodePublicIPName(machineName string) string

GenerateNodePublicIPName generates a node public IP name, based on the machine name.

func GenerateOSDiskName

func GenerateOSDiskName(machineName string) string

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

func GenerateOutboundBackendddressPoolName added in v0.4.8

func GenerateOutboundBackendddressPoolName(lbName string) string

GenerateOutboundBackendddressPoolName generates a load balancer outbound backend address pool name.

func GeneratePublicIPName

func GeneratePublicIPName(clusterName, hash string) string

GeneratePublicIPName generates a public IP name, based on the cluster name and a hash.

func GeneratePublicLBName

func GeneratePublicLBName(clusterName string) string

GeneratePublicLBName generates a public load balancer name, based on the cluster name.

func GeneratePublicNICName added in v0.4.6

func GeneratePublicNICName(machineName string) string

GeneratePublicNICName generates the name of a public network interface based on the name of a VM.

func GetDefaultUbuntuImage

func GetDefaultUbuntuImage(k8sVersion string) (*infrav1.Image, error)

GetDefaultUbuntuImage returns the default image spec for Ubuntu.

func NATRuleID added in v0.4.8

func NATRuleID(subscriptionID, resourceGroup, loadBalancerName, natRuleName string) string

NATRuleID returns the azure resource ID for a inbound NAT rule.

func NetworkInterfaceID added in v0.4.8

func NetworkInterfaceID(subscriptionID, resourceGroup, nicName string) string

NetworkInterfaceID returns the azure resource ID for a given network interface.

func ProbeID added in v0.4.8

func ProbeID(subscriptionID, resourceGroup, loadBalancerName, probeName string) string

ProbeID returns the azure resource ID for a given probe.

func PublicIPID added in v0.4.8

func PublicIPID(subscriptionID, resourceGroup, ipName string) string

PublicIPID returns the azure resource ID for a given public IP.

func ResourceNotFound

func ResourceNotFound(err error) bool

ResourceNotFound parses the error to check if it's a resource not found

func RouteTableID added in v0.4.8

func RouteTableID(subscriptionID, resourceGroup, routeTableName string) string

RouteTableID returns the azure resource ID for a given route table.

func SecurityGroupID added in v0.4.8

func SecurityGroupID(subscriptionID, resourceGroup, routeTableName string) string

SecurityGroupID returns the azure resource ID for a given security group.

func SubnetID added in v0.4.8

func SubnetID(subscriptionID, resourceGroup, vnetName, subnetName string) string

SubnetID returns the azure resource ID for a given subnet.

func UserAgent

func UserAgent() string

UserAgent specifies a string to append to the agent identifier.

func VMID added in v0.4.8

func VMID(subscriptionID, resourceGroup, vmName string) string

VMID returns the azure resource ID for a given VM.

Types

type Authorizer added in v0.4.6

type Authorizer interface {
	SubscriptionID() string
	ClientID() string
	ClientSecret() string
	CloudEnvironment() string
	TenantID() string
	BaseURI() string
	Authorizer() autorest.Authorizer
}

Authorizer is an interface which can get the subscription ID, base URI, and authorizer for an Azure service.

type BastionSpec added in v0.4.8

type BastionSpec struct {
	Name         string
	SubnetName   string
	PublicIPName string
	VNetName     string
}

BastionSpec defines the specification for bastion host.

type ClusterDescriber added in v0.4.6

type ClusterDescriber interface {
	Authorizer
	ResourceGroup() string
	ClusterName() string
	Location() string
	AdditionalTags() infrav1.Tags
	Vnet() *infrav1.VnetSpec
	IsVnetManaged() bool
	NodeSubnet() *infrav1.SubnetSpec
	ControlPlaneSubnet() *infrav1.SubnetSpec
	RouteTable() *infrav1.RouteTable
}

ClusterDescriber is an interface which can get common Azure Cluster information

type CredentialGetter added in v0.4.4

type CredentialGetter interface {
	Service
	GetCredentials(ctx context.Context, group string, cluster string) ([]byte, error)
}

CredentialGetter is a Service which knows how to retrieve credentials for an Azure resource in a resource group.

type DiskSpec added in v0.4.6

type DiskSpec struct {
	Name string
}

DiskSpec defines the specification for a Disk.

type InboundNatSpec added in v0.4.7

type InboundNatSpec struct {
	Name             string
	LoadBalancerName string
}

InboundNatSpec defines the specification for an inbound NAT rule.

type LBSpec added in v0.4.6

type LBSpec struct {
	Name             string
	PublicIPName     string
	Role             string
	SubnetName       string
	SubnetCidr       string
	PrivateIPAddress string
	APIServerPort    int32
}

LBSpec defines the specification for a Load Balancer.

type NICSpec added in v0.4.6

type NICSpec struct {
	Name                      string
	MachineName               string
	SubnetName                string
	VNetName                  string
	VNetResourceGroup         string
	StaticIPAddress           string
	PublicLBName              string
	PublicLBAddressPoolName   string
	PublicLBNATRuleName       string
	InternalLBName            string
	InternalLBAddressPoolName string
	PublicIPName              string
	VMSize                    string
	AcceleratedNetworking     *bool
}

NICSpec defines the specification for a Network Interface.

type NSGSpec added in v0.4.7

type NSGSpec struct {
	Name         string
	IngressRules infrav1.IngressRules
}

NSGSpec defines the specification for a Security Group.

type OldService added in v0.4.6

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

OldService is a generic interface for services that have not yet been refactored. Once all services have been converted to use Service, this should be removed. Example: virtualnetworks service would offer Reconcile/Delete methods.

type PublicIPSpec added in v0.4.6

type PublicIPSpec struct {
	Name    string
	DNSName string
}

PublicIPSpec defines the specification for a Public IP.

type RoleAssignmentSpec added in v0.4.7

type RoleAssignmentSpec struct {
	MachineName string
	UUID        string
}

RoleAssignmentSpec defines the specification for a Role Assignment.

type RouteTableSpec added in v0.4.7

type RouteTableSpec struct {
	Name string
}

RouteTableSpec defines the specification for a Route Table.

type ScaleSetSpec added in v0.4.8

type ScaleSetSpec struct {
	Name                         string
	Size                         string
	Capacity                     int64
	SSHKeyData                   string
	OSDisk                       infrav1.OSDisk
	DataDisks                    []infrav1.DataDisk
	SubnetName                   string
	VNetName                     string
	VNetResourceGroup            string
	PublicLBName                 string
	PublicLBAddressPoolName      string
	AcceleratedNetworking        *bool
	TerminateNotificationTimeout *int
}

ScaleSetSpec defines the specification for a Scale Set.

type Service

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

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

type SubnetSpec added in v0.4.7

type SubnetSpec struct {
	Name                string
	CIDR                string
	VNetName            string
	RouteTableName      string
	SecurityGroupName   string
	Role                infrav1.SubnetRole
	InternalLBIPAddress string
}

SubnetSpec defines the specification for a Subnet.

type TagsSpec added in v0.4.8

type TagsSpec struct {
	Scope      string
	Tags       infrav1.Tags
	Annotation string
}

TagsSpec defines the specification for a set of tags.

type VMSpec added in v0.4.7

type VMSpec struct {
	Name                   string
	Role                   string
	NICNames               []string
	SSHKeyData             string
	Size                   string
	Zone                   string
	Identity               infrav1.VMIdentity
	OSDisk                 infrav1.OSDisk
	DataDisks              []infrav1.DataDisk
	UserAssignedIdentities []infrav1.UserAssignedIdentity
	SpotVMOptions          *infrav1.SpotVMOptions
}

VMSpec defines the specification for a Virtual Machine.

type VNetSpec added in v0.4.7

type VNetSpec struct {
	ResourceGroup string
	Name          string
	CIDR          string
}

VNetSpec defines the specification for a Virtual Network.

Directories

Path Synopsis
Run go generate to regenerate this mock.
Run go generate to regenerate this mock.
services
agentpools/mock_agentpools
Package mock_agentpools is a generated GoMock package.
Package mock_agentpools is a generated GoMock package.
bastionhosts/mocks_bastionhosts
Package mock_bastionhosts is a generated GoMock package.
Package mock_bastionhosts 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.
inboundnatrules/mock_inboundnatrules
Package mock_inboundnatrules is a generated GoMock package.
Package mock_inboundnatrules is a generated GoMock package.
loadbalancers/mock_loadbalancers
Package mock_loadbalancers is a generated GoMock package.
Package mock_loadbalancers is a generated GoMock package.
managedclusters/mock_managedclusters
Run go generate to regenerate this mock.
Run go generate to regenerate this mock.
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.
resourceskus/mock_resourceskus
Run go generate to regenerate this mock.
Run go generate to regenerate this mock.
roleassignments/mock_roleassignments
Package mock_roleassignments is a generated GoMock package.
Package mock_roleassignments is a generated GoMock package.
routetables/mock_routetables
Package mock_routetables is a generated GoMock package.
Package mock_routetables is a generated GoMock package.
scalesets/mock_scalesets
Package mock_scalesets is a generated GoMock package.
Package mock_scalesets 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.
tags/mock_tags
Package mock_tags is a generated GoMock package.
Package mock_tags 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.

Jump to

Keyboard shortcuts

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