Documentation ¶
Index ¶
- Constants
- Variables
- func AddressPoolID(subscriptionID, resourceGroup, loadBalancerName, backendPoolName string) string
- func AutoRestClientAppendUserAgent(c *autorest.Client, extension string)
- func AvailabilitySetID(subscriptionID, resourceGroup, availabilitySetName string) string
- func FrontendIPConfigID(subscriptionID, resourceGroup, loadBalancerName, configName string) string
- func GenerateAvailabilitySetName(clusterName, nodeGroup string) string
- func GenerateBackendAddressPoolName(lbName string) string
- func GenerateControlPlaneOutboundIPName(clusterName string) string
- func GenerateControlPlaneOutboundLBName(clusterName string) string
- func GenerateDataDiskName(machineName, nameSuffix string) string
- func GenerateFrontendIPConfigName(lbName string) string
- func GenerateNICName(machineName string) string
- func GenerateNatGatewayIPName(clusterName, subnetName string) string
- func GenerateNodeOutboundIPName(clusterName string) string
- func GenerateNodePublicIPName(machineName string) string
- func GenerateOSDiskName(machineName string) string
- func GenerateOutboundBackendAddressPoolName(lbName string) string
- func GeneratePrivateDNSZoneName(clusterName string) string
- func GeneratePrivateFQDN(clusterName string) string
- func GeneratePublicNICName(machineName string) string
- func GenerateVNetLinkName(vnetName string) string
- func GenerateVnetPeeringName(sourceVnetName string, remoteVnetName string) string
- func GetDefaultUbuntuImage(k8sVersion string) (*infrav1.Image, error)
- func GetDefaultWindowsImage(k8sVersion, runtime string) (*infrav1.Image, error)
- func IsOperationNotDoneError(target error) bool
- func NATRuleID(subscriptionID, resourceGroup, loadBalancerName, natRuleName string) string
- func NatGatewayID(subscriptionID, resourceGroup, natgatewayName string) string
- func NetworkInterfaceID(subscriptionID, resourceGroup, nicName string) string
- func ProbeID(subscriptionID, resourceGroup, loadBalancerName, probeName string) string
- func PublicIPID(subscriptionID, resourceGroup, ipName string) string
- func ResourceConflict(err error) bool
- func ResourceGroupID(subscriptionID, resourceGroup string) string
- func ResourceGroupNotFound(err error) bool
- func ResourceNotFound(err error) bool
- func RouteTableID(subscriptionID, resourceGroup, routeTableName string) string
- func SecurityGroupID(subscriptionID, resourceGroup, nsgName string) string
- func SetAutoRestClientDefaults(c *autorest.Client, auth autorest.Authorizer)
- func SubnetID(subscriptionID, resourceGroup, vnetName, subnetName string) string
- func UserAgent() string
- func VMID(subscriptionID, resourceGroup, vmName string) string
- func VNetID(subscriptionID, resourceGroup, vnetName string) string
- func WithIndex(name string, n int) string
- type AADProfile
- type APIServerAccessProfile
- type AgentPoolSpec
- type AsyncStatusUpdater
- type Authorizer
- type AvailabilitySetSpec
- type AzureBastionSpec
- type BastionSpec
- type ClusterDescriber
- type ClusterScoper
- type CredentialGetter
- type DiskSpec
- type ExtensionSpec
- type InboundNatSpec
- type LBSpec
- type LoadBalancerProfile
- type ManagedClusterSpec
- type NICSpec
- type NSGSpec
- type NatGatewaySpec
- type NetworkDescriber
- type OperationNotDoneError
- type PrivateDNSLinkSpec
- type PrivateDNSSpec
- type PublicIPSpec
- type ReconcileError
- type ReconcileErrorType
- type Reconciler
- type ResourceSpecGetter
- type ResourceType
- type RoleAssignmentSpec
- type RouteTableRole
- type RouteTableSpec
- type SKU
- type ScaleSetSpec
- type SubnetSpec
- type TagsSpec
- type VMDeletedError
- type VMSS
- type VMSSVM
- type VMSpec
- type VNetSpec
- type VnetPeeringSpec
Constants ¶
const ( // DefaultImageOfferID is the default Azure Marketplace offer ID. DefaultImageOfferID = "capi" // DefaultWindowsImageOfferID is the default Azure Marketplace offer ID for Windows. DefaultWindowsImageOfferID = "capi-windows" // DefaultImagePublisherID is the default Azure Marketplace publisher ID. DefaultImagePublisherID = "cncf-upstream" // LatestVersion is the image version latest. LatestVersion = "latest" )
const ( // LinuxOS is Linux OS value for OSDisk.OSType. LinuxOS = "Linux" // WindowsOS is Windows OS value for OSDisk.OSType. WindowsOS = "Windows" )
const ( // VirtualMachine ... VirtualMachine = "VirtualMachine" // VirtualMachineScaleSet ... VirtualMachineScaleSet = "VirtualMachineScaleSet" )
const (
// ControlPlaneNodeGroup will be used to create availability set for control plane machines.
ControlPlaneNodeGroup = "control-plane"
)
const (
// DefaultUserName is the default username for a created VM.
DefaultUserName = "capi"
)
const (
// Global is the Azure global location value.
Global = "global"
)
const (
// PrivateAPIServerHostname will be used as the api server hostname for private clusters.
PrivateAPIServerHostname = "apiserver"
)
const ( // ProviderIDPrefix will be appended to the beginning of Azure resource IDs to form the Kubernetes Provider ID. // NOTE: this format matches the 2 slashes format used in cloud-provider and cluster-autoscaler. ProviderIDPrefix = "azure://" )
Variables ¶
var ( // LinuxBootstrapExtensionCommand is the command the VM bootstrap extension will execute to verify Linux nodes bootstrap completes successfully. LinuxBootstrapExtensionCommand = fmt.Sprintf("for i in $(seq 1 %d); do test -f %s && break; if [ $i -eq %d ]; then return 1; else sleep %d; fi; done", bootstrapExtensionRetries, bootstrapSentinelFile, bootstrapExtensionRetries, bootstrapExtensionSleep) // WindowsBootstrapExtensionCommand is the command the VM bootstrap extension will execute to verify Windows nodes bootstrap completes successfully. WindowsBootstrapExtensionCommand = fmt.Sprintf("powershell.exe -Command \"for ($i = 0; $i -lt %d; $i++) {if (Test-Path '%s') {exit 0} else {Start-Sleep -Seconds %d}} exit -2\"", bootstrapExtensionRetries, bootstrapSentinelFile, bootstrapExtensionSleep) )
var ErrNotOwned = errors.New("resource is not managed and cannot be deleted")
ErrNotOwned is returned when a resource can't be deleted because it isn't owned.
Functions ¶
func AddressPoolID ¶
AddressPoolID returns the azure resource ID for a given backend address pool.
func AutoRestClientAppendUserAgent ¶
AutoRestClientAppendUserAgent autorest client calls "AddToUserAgent" but ignores errors.
func AvailabilitySetID ¶
AvailabilitySetID returns the azure resource ID for a given availability set.
func FrontendIPConfigID ¶
FrontendIPConfigID returns the azure resource ID for a given frontend IP config.
func GenerateAvailabilitySetName ¶
GenerateAvailabilitySetName generates the name of a availability set based on the cluster name and the node group. node group identifies the set of nodes that belong to this availability set: For control plane nodes, this will be `control-plane`. For worker nodes, this will be the machine deployment name.
func GenerateBackendAddressPoolName ¶
GenerateBackendAddressPoolName generates a load balancer backend address pool name.
func GenerateControlPlaneOutboundIPName ¶
GenerateControlPlaneOutboundIPName generates a public IP name, based on the cluster name.
func GenerateControlPlaneOutboundLBName ¶
GenerateControlPlaneOutboundLBName generates the name of the control plane outbound LB.
func GenerateDataDiskName ¶
GenerateDataDiskName generates the name of a data disk based on the name of a VM.
func GenerateFrontendIPConfigName ¶
GenerateFrontendIPConfigName generates a load balancer frontend IP config name.
func GenerateNICName ¶
GenerateNICName generates the name of a network interface based on the name of a VM.
func GenerateNatGatewayIPName ¶
GenerateNatGatewayIPName generates a nat gateway IP name.
func GenerateNodeOutboundIPName ¶
GenerateNodeOutboundIPName generates a public IP name, based on the cluster name.
func GenerateNodePublicIPName ¶
GenerateNodePublicIPName generates a node public IP name, based on the machine name.
func GenerateOSDiskName ¶
GenerateOSDiskName generates the name of an OS disk based on the name of a VM.
func GenerateOutboundBackendAddressPoolName ¶
GenerateOutboundBackendAddressPoolName generates a load balancer outbound backend address pool name.
func GeneratePrivateDNSZoneName ¶
GeneratePrivateDNSZoneName generates the name of a private DNS zone based on the cluster name.
func GeneratePrivateFQDN ¶
GeneratePrivateFQDN generates FQDN for a private API Server.
func GeneratePublicNICName ¶
GeneratePublicNICName generates the name of a public network interface based on the name of a VM.
func GenerateVNetLinkName ¶
GenerateVNetLinkName generates the name of a virtual network link name based on the vnet name.
func GenerateVnetPeeringName ¶ added in v1.0.0
GenerateVnetPeeringName generates the name for a peering between two vnets.
func GetDefaultUbuntuImage ¶
GetDefaultUbuntuImage returns the default image spec for Ubuntu.
func GetDefaultWindowsImage ¶
GetDefaultWindowsImage returns the default image spec for Windows.
func IsOperationNotDoneError ¶ added in v0.5.3
IsOperationNotDoneError returns true if the target is an OperationNotDoneError.
func NatGatewayID ¶
NatGatewayID returns the azure resource ID for a given nat gateway.
func NetworkInterfaceID ¶
NetworkInterfaceID returns the azure resource ID for a given network interface.
func PublicIPID ¶
PublicIPID returns the azure resource ID for a given public IP.
func ResourceConflict ¶
ResourceConflict parses the error to check if it's a resource conflict error (409).
func ResourceGroupID ¶ added in v1.0.0
ResourceGroupID returns the azure resource ID for a given resource group.
func ResourceGroupNotFound ¶
ResourceGroupNotFound parses the error to check if it's a resource group not found error.
func ResourceNotFound ¶
ResourceNotFound parses the error to check if it's a resource not found error.
func RouteTableID ¶
RouteTableID returns the azure resource ID for a given route table.
func SecurityGroupID ¶
SecurityGroupID returns the azure resource ID for a given security group.
func SetAutoRestClientDefaults ¶
func SetAutoRestClientDefaults(c *autorest.Client, auth autorest.Authorizer)
SetAutoRestClientDefaults set authorizer and user agent for autorest client.
func UserAgent ¶
func UserAgent() string
UserAgent specifies a string to append to the agent identifier.
Types ¶
type AADProfile ¶ added in v0.5.2
type AADProfile struct { // Managed - Whether to enable managed AAD. Managed bool // EnableAzureRBAC - Whether to enable Azure RBAC for Kubernetes authorization. EnableAzureRBAC bool // AdminGroupObjectIDs - AAD group object IDs that will have admin role of the cluster. AdminGroupObjectIDs []string }
AADProfile is Azure Active Directory configuration to integrate with AKS, for aad authentication.
type APIServerAccessProfile ¶ added in v0.5.3
type APIServerAccessProfile struct { // AuthorizedIPRanges - Authorized IP Ranges to kubernetes API server. AuthorizedIPRanges []string // EnablePrivateCluster - Whether to create the cluster as a private cluster or not. EnablePrivateCluster *bool // PrivateDNSZone - Private dns zone mode for private cluster. PrivateDNSZone *string // EnablePrivateClusterPublicFQDN - Whether to create additional public FQDN for private cluster or not. EnablePrivateClusterPublicFQDN *bool }
APIServerAccessProfile is the access profile for AKS API server.
type AgentPoolSpec ¶ added in v0.5.2
type AgentPoolSpec struct { // Name is the name of agent pool. Name string // ResourceGroup is the name of the Azure resource group for the AKS Cluster. ResourceGroup string // Cluster is the name of the AKS cluster. Cluster string // Version defines the desired Kubernetes version. Version *string // SKU defines the Azure VM size for the agent pool VMs. SKU string // Replicas is the number of desired machines. Replicas int32 // OSDiskSizeGB is the OS disk size in GB for every machine in this agent pool. OSDiskSizeGB int32 // VnetSubnetID is the Azure Resource ID for the subnet which should contain nodes. VnetSubnetID string // Mode represents mode of an agent pool. Possible values include: 'System', 'User'. Mode string }
AgentPoolSpec contains agent pool specification details.
type AsyncStatusUpdater ¶ added in v0.5.3
type AsyncStatusUpdater interface { SetLongRunningOperationState(*infrav1.Future) GetLongRunningOperationState(string, string) *infrav1.Future DeleteLongRunningOperationState(string, string) UpdatePutStatus(clusterv1.ConditionType, string, error) UpdateDeleteStatus(clusterv1.ConditionType, string, error) UpdatePatchStatus(clusterv1.ConditionType, string, error) }
AsyncStatusUpdater is an interface used to keep track of long running operations in Status that has Conditions and Futures.
type Authorizer ¶
type Authorizer interface { SubscriptionID() string ClientID() string ClientSecret() string CloudEnvironment() string TenantID() string BaseURI() string Authorizer() autorest.Authorizer HashKey() string }
Authorizer is an interface which can get the subscription ID, base URI, and authorizer for an Azure service.
type AvailabilitySetSpec ¶
type AvailabilitySetSpec struct {
Name string
}
AvailabilitySetSpec defines the specification for an availability set.
type AzureBastionSpec ¶
type AzureBastionSpec struct { Name string SubnetSpec infrav1.SubnetSpec PublicIPName string VNetName string }
AzureBastionSpec defines the specification for azure bastion feature.
type BastionSpec ¶
type BastionSpec struct {
AzureBastion *AzureBastionSpec
}
BastionSpec defines the specification for the generic bastion feature.
type ClusterDescriber ¶
type ClusterDescriber interface { Authorizer ResourceGroup() string ClusterName() string Location() string AdditionalTags() infrav1.Tags AvailabilitySetEnabled() bool CloudProviderConfigOverrides() *infrav1.CloudProviderConfigOverrides FailureDomains() []string }
ClusterDescriber is an interface which can get common Azure Cluster information.
type ClusterScoper ¶
type ClusterScoper interface { ClusterDescriber NetworkDescriber }
ClusterScoper combines the ClusterDescriber and NetworkDescriber interfaces.
type CredentialGetter ¶
type CredentialGetter interface { Reconciler 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 ExtensionSpec ¶ added in v0.5.3
type ExtensionSpec struct { Name string VMName string Publisher string Version string ProtectedSettings map[string]string }
ExtensionSpec defines the specification for a VM or VMScaleSet extension.
func GetBootstrappingVMExtension ¶
func GetBootstrappingVMExtension(osType string, cloud string, vmName string) *ExtensionSpec
GetBootstrappingVMExtension returns the CAPZ Bootstrapping VM extension. The CAPZ Bootstrapping extension is a simple clone of https://github.com/Azure/custom-script-extension-linux for Linux or https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-windows for Windows. This extension allows running arbitrary scripts on the VM. Its role is to detect and report Kubernetes bootstrap failure or success.
type InboundNatSpec ¶
InboundNatSpec defines the specification for an inbound NAT rule.
type LBSpec ¶
type LBSpec struct { Name string Role string Type infrav1.LBType SKU infrav1.SKU SubnetName string BackendPoolName string FrontendIPConfigs []infrav1.FrontendIP APIServerPort int32 IdleTimeoutInMinutes *int32 }
LBSpec defines the specification for a Load Balancer.
type LoadBalancerProfile ¶ added in v0.5.3
type LoadBalancerProfile struct { // ManagedOutboundIPs - Desired managed outbound IPs for the cluster load balancer. ManagedOutboundIPs *int32 // OutboundIPPrefixes - Desired outbound IP Prefix resources for the cluster load balancer. OutboundIPPrefixes []string // OutboundIPs - Desired outbound IP resources for the cluster load balancer. OutboundIPs []string // AllocatedOutboundPorts - Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. AllocatedOutboundPorts *int32 // IdleTimeoutInMinutes - Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. IdleTimeoutInMinutes *int32 }
LoadBalancerProfile - Profile of the cluster load balancer.
type ManagedClusterSpec ¶ added in v0.5.2
type ManagedClusterSpec struct { // Name is the name of this AKS Cluster. Name string // ResourceGroupName is the name of the Azure resource group for this AKS Cluster. ResourceGroupName string // NodeResourceGroupName is the name of the Azure resource group containing IaaS VMs. NodeResourceGroupName string // VnetSubnetID is the Azure Resource ID for the subnet which should contain nodes. VnetSubnetID string // Location is a string matching one of the canonical Azure region names. Examples: "westus2", "eastus". Location string // Tags is a set of tags to add to this cluster. Tags map[string]string // Version defines the desired Kubernetes version. Version string // LoadBalancerSKU for the managed cluster. Possible values include: 'Standard', 'Basic'. Defaults to Standard. LoadBalancerSKU string // NetworkPlugin used for building Kubernetes network. Possible values include: 'azure', 'kubenet'. Defaults to azure. NetworkPlugin string // NetworkPolicy used for building Kubernetes network. Possible values include: 'calico', 'azure'. Defaults to azure. NetworkPolicy string // SSHPublicKey is a string literal containing an ssh public key. Will autogenerate and discard if not provided. SSHPublicKey string // AgentPools is the list of agent pool specifications in this cluster. AgentPools []AgentPoolSpec // PodCIDR is the CIDR block for IP addresses distributed to pods PodCIDR string // ServiceCIDR is the CIDR block for IP addresses distributed to services ServiceCIDR string // DNSServiceIP is an IP address assigned to the Kubernetes DNS service DNSServiceIP *string // AADProfile is Azure Active Directory configuration to integrate with AKS, for aad authentication. AADProfile *AADProfile // SKU is the SKU of the AKS to be provisioned. SKU *SKU // LoadBalancerProfile is the profile of the cluster load balancer. LoadBalancerProfile *LoadBalancerProfile // APIServerAccessProfile is the access profile for AKS API server. APIServerAccessProfile *APIServerAccessProfile }
ManagedClusterSpec contains properties to create a managed cluster.
type NICSpec ¶
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 IPv6Enabled bool EnableIPForwarding bool }
NICSpec defines the specification for a Network Interface.
type NSGSpec ¶
type NSGSpec struct { Name string SecurityRules infrav1.SecurityRules }
NSGSpec defines the specification for a Security Group.
type NatGatewaySpec ¶
type NatGatewaySpec struct { NatGatewayIP infrav1.PublicIPSpec Name string Subnet infrav1.SubnetSpec }
NatGatewaySpec defines the specification for a Nat Gateway.
type NetworkDescriber ¶
type NetworkDescriber interface { Vnet() *infrav1.VnetSpec IsVnetManaged() bool ControlPlaneSubnet() infrav1.SubnetSpec Subnets() infrav1.Subnets Subnet(string) infrav1.SubnetSpec NodeSubnets() []infrav1.SubnetSpec SetSubnet(infrav1.SubnetSpec) IsIPv6Enabled() bool ControlPlaneRouteTable() infrav1.RouteTable APIServerLBName() string APIServerLBPoolName(string) string IsAPIServerPrivate() bool GetPrivateDNSZoneName() string OutboundLBName(string) string OutboundPoolName(string) string }
NetworkDescriber is an interface which can get common Azure Cluster Networking information.
type OperationNotDoneError ¶
OperationNotDoneError is used to represent a long-running operation that is not yet complete.
func NewOperationNotDoneError ¶
func NewOperationNotDoneError(future *infrav1.Future) OperationNotDoneError
NewOperationNotDoneError returns a new OperationNotDoneError wrapping a Future.
func (OperationNotDoneError) Error ¶
func (onde OperationNotDoneError) Error() string
Error returns the error represented as a string.
func (OperationNotDoneError) Is ¶
func (onde OperationNotDoneError) Is(target error) bool
Is returns true if the target is an OperationNotDoneError.
type PrivateDNSLinkSpec ¶ added in v1.0.0
PrivateDNSLinkSpec defines the specification for a virtual network link in a private DNS zone.
type PrivateDNSSpec ¶
type PrivateDNSSpec struct { ZoneName string Links []PrivateDNSLinkSpec Records []infrav1.AddressRecord }
PrivateDNSSpec defines the specification for a private DNS zone.
type PublicIPSpec ¶
PublicIPSpec defines the specification for a Public IP.
type ReconcileError ¶
type ReconcileError struct {
// contains filtered or unexported fields
}
ReconcileError represents an error that is not automatically recoverable errorType indicates what type of action is required to recover. It can take two values: 1. `Transient` - Can be recovered through manual intervention, will be requeued after. 2. `Terminal` - Cannot be recovered, will not be requeued.
func WithTerminalError ¶
func WithTerminalError(err error) ReconcileError
WithTerminalError wraps the error in a ReconcileError with errorType as `Terminal`.
func WithTransientError ¶
func WithTransientError(err error, requeueAfter time.Duration) ReconcileError
WithTransientError wraps the error in a ReconcileError with errorType as `Transient`.
func (ReconcileError) Error ¶
func (t ReconcileError) Error() string
Error returns the error message for a ReconcileError.
func (ReconcileError) Is ¶
func (t ReconcileError) Is(target error) bool
Is returns true if the target is a ReconcileError.
func (ReconcileError) IsTerminal ¶
func (t ReconcileError) IsTerminal() bool
IsTerminal returns if the ReconcileError is recoverable.
func (ReconcileError) IsTransient ¶
func (t ReconcileError) IsTransient() bool
IsTransient returns if the ReconcileError is recoverable.
func (ReconcileError) RequeueAfter ¶
func (t ReconcileError) RequeueAfter() time.Duration
RequeueAfter returns requestAfter value.
type ReconcileErrorType ¶
type ReconcileErrorType string
ReconcileErrorType represents the type of a ReconcileError.
const ( // TransientErrorType can be recovered, will be requeued after a configured time interval. TransientErrorType ReconcileErrorType = "Transient" // TerminalErrorType cannot be recovered, will not be requeued. TerminalErrorType ReconcileErrorType = "Terminal" )
type Reconciler ¶
type Reconciler interface { Reconcile(ctx context.Context) error Delete(ctx context.Context) error }
Reconciler is a generic interface used by components offering a type of service. Example: virtualnetworks service would offer Reconcile/Delete methods.
type ResourceSpecGetter ¶ added in v0.5.3
type ResourceSpecGetter interface { // ResourceName returns the name of the resource. ResourceName() string // OwnerResourceName returns the name of the resource that owns the resource // in the case that the resource is an Azure subresource. OwnerResourceName() string // ResourceGroupName returns the name of the resource group the resource is in. ResourceGroupName() string // Parameters takes the existing resource and returns the desired parameters of the resource. // If the resource does not exist, or we do not care about existing parameters to update the resource, existing should be nil. // If no update is needed on the resource, Parameters should return nil. Parameters(existing interface{}) (interface{}, error) }
ResourceSpecGetter is an interface for getting all the required information to create/update/delete an Azure resource.
type ResourceType ¶
type ResourceType string
ResourceType defines the type azure resource being reconciled. Eg. Virtual Machine, Virtual Machine Scale Sets.
type RoleAssignmentSpec ¶
RoleAssignmentSpec defines the specification for a Role Assignment.
type RouteTableRole ¶
type RouteTableRole string
RouteTableRole defines the unique role of a route table.
type RouteTableSpec ¶
type RouteTableSpec struct { Name string Subnet infrav1.SubnetSpec }
RouteTableSpec defines the specification for a Route Table.
type SKU ¶ added in v0.5.3
type SKU struct { // Tier - Tier of a managed cluster SKU. Tier string }
SKU - AKS SKU.
type ScaleSetSpec ¶
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 Identity infrav1.VMIdentity UserAssignedIdentities []infrav1.UserAssignedIdentity SecurityProfile *infrav1.SecurityProfile SpotVMOptions *infrav1.SpotVMOptions FailureDomains []string }
ScaleSetSpec defines the specification for a Scale Set.
type SubnetSpec ¶
type SubnetSpec struct { Name string CIDRs []string VNetName string RouteTableName string SecurityGroupName string Role infrav1.SubnetRole NatGatewayName string }
SubnetSpec defines the specification for a Subnet.
type TagsSpec ¶
type TagsSpec struct { Scope string Tags infrav1.Tags // Annotation is the key which stores the last applied tags as value in JSON format. // The last applied tags are used to find out which tags are being managed by CAPZ // and if any has to be deleted by comparing it with the new desired tags Annotation string }
TagsSpec defines the specification for a set of tags.
type VMDeletedError ¶
type VMDeletedError struct {
ProviderID string
}
VMDeletedError is returned when a virtual machine is deleted outside of capz.
func (VMDeletedError) Error ¶
func (vde VMDeletedError) Error() string
Error returns the error string.
type VMSS ¶
type VMSS struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Sku string `json:"sku,omitempty"` Capacity int64 `json:"capacity,omitempty"` Zones []string `json:"zones,omitempty"` Image infrav1.Image `json:"image,omitempty"` State infrav1.ProvisioningState `json:"vmState,omitempty"` Identity infrav1.VMIdentity `json:"identity,omitempty"` Tags infrav1.Tags `json:"tags,omitempty"` Instances []VMSSVM `json:"instances,omitempty"` }
VMSS defines a virtual machine scale set.
func (VMSS) HasEnoughLatestModelOrNotMixedModel ¶
HasEnoughLatestModelOrNotMixedModel returns true if VMSS instance have the latest model applied to all or equal to the capacity.
func (VMSS) HasLatestModelApplied ¶
HasLatestModelApplied returns true if the VMSS instance matches the VMSS image reference.
func (VMSS) HasLatestModelAppliedToAll ¶
HasLatestModelAppliedToAll returns true if all VMSS instance have the latest model applied.
func (VMSS) HasModelChanges ¶
HasModelChanges returns true if the spec fields which will mutate the Azure VMSS model are different.
func (VMSS) InstancesByProviderID ¶
InstancesByProviderID returns VMSSVMs by ID.
type VMSSVM ¶
type VMSSVM struct { ID string `json:"id,omitempty"` InstanceID string `json:"instanceID,omitempty"` Image infrav1.Image `json:"image,omitempty"` Name string `json:"name,omitempty"` AvailabilityZone string `json:"availabilityZone,omitempty"` State infrav1.ProvisioningState `json:"vmState,omitempty"` }
VMSSVM defines a VM in a virtual machine scale set.
func (VMSSVM) ProviderID ¶
ProviderID returns the K8s provider ID for the VMSS instance.
type VMSpec ¶
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 SecurityProfile *infrav1.SecurityProfile }
VMSpec defines the specification for a Virtual Machine.
Directories ¶
Path | Synopsis |
---|---|
Package mock_azure is a generated GoMock package.
|
Package mock_azure is a generated GoMock package. |
mocks
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. |
async/mock_async
Package mock_async is a generated GoMock package.
|
Package mock_async is a generated GoMock package. |
availabilitysets/mock_availabilitysets
Package mock_availabilitysets is a generated GoMock package.
|
Package mock_availabilitysets 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
Package mock_managedclusters is a generated GoMock package.
|
Package mock_managedclusters is a generated GoMock package. |
natgateways/mock_natgateways
Package mock_natgateways is a generated GoMock package.
|
Package mock_natgateways is a generated GoMock package. |
networkinterfaces/mock_networkinterfaces
Package mock_networkinterfaces is a generated GoMock package.
|
Package mock_networkinterfaces is a generated GoMock package. |
privatedns/mock_privatedns
Package mock_privatedns is a generated GoMock package.
|
Package mock_privatedns 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. |
scalesetvms/mock_scalesetvms
Package mock_scalesetvms is a generated GoMock package.
|
Package mock_scalesetvms 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. |
vmextensions/mock_vmextensions
Package mock_vmextensions is a generated GoMock package.
|
Package mock_vmextensions is a generated GoMock package. |
vmssextensions/mock_vmssextensions
Package mock_vmssextensions is a generated GoMock package.
|
Package mock_vmssextensions is a generated GoMock package. |
vnetpeerings/mock_vnetpeerings
Package mock_vnetpeerings is a generated GoMock package.
|
Package mock_vnetpeerings is a generated GoMock package. |