Documentation ¶
Index ¶
- Constants
- Variables
- func AgentPoolToManagedClusterAgentPoolPreviewProfile(pool *asocontainerservicev1preview.ManagedClustersAgentPool) asocontainerservicev1preview.ManagedClusterAgentPoolProfile
- func AgentPoolToManagedClusterAgentPoolProfile(pool *asocontainerservicev1.ManagedClustersAgentPool) asocontainerservicev1.ManagedClusterAgentPoolProfile
- func ExtendedLocationToComputeSDK(src *infrav1.ExtendedLocationSpec) *armcompute.ExtendedLocation
- func ExtendedLocationToNetworkASO(src *infrav1.ExtendedLocationSpec) *asonetworkv1.ExtendedLocation
- func ExtendedLocationToNetworkSDK(src *infrav1.ExtendedLocationSpec) *armnetwork.ExtendedLocation
- func FutureToResumeToken(future infrav1.Future) (string, error)
- func GetDiagnosticsProfile(diagnostics *infrav1.Diagnostics) *armcompute.DiagnosticsProfile
- func GetOrchestrationMode(modeType infrav1.OrchestrationModeType) armcompute.OrchestrationMode
- func GetRecordType(ip string) armprivatedns.RecordType
- func GetSpotVMOptions(spotVMOptions *infrav1.SpotVMOptions, ...) (*armcompute.VirtualMachinePriorityTypes, ...)
- func GetSubnetAddresses(subnet asonetworkv1.VirtualNetworksSubnet) []string
- func IDImageRefToImage(id string) infrav1.Image
- func IPTagsToSDK(ipTags []infrav1.IPTag) []*armnetwork.IPTag
- func ImageToPlan(image *infrav1.Image) *armcompute.Plan
- func ImageToSDK(image *infrav1.Image) (*armcompute.ImageReference, error)
- func MapToTags(src map[string]*string) infrav1.Tags
- func PollerToFuture[T any](poller *runtime.Poller[T], futureType, service, resourceName, rgName string) (*infrav1.Future, error)
- func SDKAvailabilityStatusToCondition(availStatus armresourcehealth.AvailabilityStatus) *clusterv1.Condition
- func SDKImageToImage(sdkImageRef *armcompute.ImageReference, isThirdPartyImage bool) infrav1.Image
- func SDKToVMSS(sdkvmss armcompute.VirtualMachineScaleSet, ...) azure.VMSS
- func SDKToVMSSVM(sdkInstance armcompute.VirtualMachineScaleSetVM) *azure.VMSSVM
- func SDKVMToVMSSVM(sdkInstance armcompute.VirtualMachine, mode infrav1.OrchestrationModeType) *azure.VMSSVM
- func SKUtoSDK(src infrav1.SKU) armnetwork.LoadBalancerSKUName
- func SecurityRuleToSDK(rule infrav1.SecurityRule) *armnetwork.SecurityRule
- func TagsToMap(src infrav1.Tags) map[string]*string
- func UserAssignedIdentitiesToVMSDK(identities []infrav1.UserAssignedIdentity) (map[string]*armcompute.UserAssignedIdentitiesValue, error)
- func UserAssignedIdentitiesToVMSSSDK(identities []infrav1.UserAssignedIdentity) (map[string]*armcompute.UserAssignedIdentitiesValue, error)
- func VMIdentityToVMSDK(identity infrav1.VMIdentity, uami []infrav1.UserAssignedIdentity) (*armcompute.VirtualMachineIdentity, error)
- type VM
Constants ¶
const ( // RegExpStrCommunityGalleryID is a regexp string used for matching community gallery IDs and capturing specific values. RegExpStrCommunityGalleryID = `/CommunityGalleries/(?P<gallery>.*)/Images/(?P<name>.*)/Versions/(?P<version>.*)` // RegExpStrComputeGalleryID is a regexp string used for matching compute gallery IDs and capturing specific values. RegExpStrComputeGalleryID = `` /* 153-byte string literal not displayed */ )
Variables ¶
var ErrUserAssignedIdentitiesNotFound = errors.New("the user-assigned identity provider ids must not be null or empty for 'UserAssigned' identity type")
ErrUserAssignedIdentitiesNotFound is the error thrown when user assigned identities is not passed with the identity type being UserAssigned.
Functions ¶
func AgentPoolToManagedClusterAgentPoolPreviewProfile ¶ added in v1.14.0
func AgentPoolToManagedClusterAgentPoolPreviewProfile(pool *asocontainerservicev1preview.ManagedClustersAgentPool) asocontainerservicev1preview.ManagedClusterAgentPoolProfile
AgentPoolToManagedClusterAgentPoolPreviewProfile converts an AgentPoolSpec to an Azure SDK ManagedClusterAgentPoolPreviewProfile used in managedcluster reconcile.
func AgentPoolToManagedClusterAgentPoolProfile ¶ added in v1.3.0
func AgentPoolToManagedClusterAgentPoolProfile(pool *asocontainerservicev1.ManagedClustersAgentPool) asocontainerservicev1.ManagedClusterAgentPoolProfile
AgentPoolToManagedClusterAgentPoolProfile converts a AgentPoolSpec to an Azure SDK ManagedClusterAgentPoolProfile used in managedcluster reconcile.
func ExtendedLocationToComputeSDK ¶ added in v1.8.0
func ExtendedLocationToComputeSDK(src *infrav1.ExtendedLocationSpec) *armcompute.ExtendedLocation
ExtendedLocationToComputeSDK converts an infrav1.ExtendedLocationSpec to an armcompute.ExtendedLocation.
func ExtendedLocationToNetworkASO ¶ added in v1.13.0
func ExtendedLocationToNetworkASO(src *infrav1.ExtendedLocationSpec) *asonetworkv1.ExtendedLocation
ExtendedLocationToNetworkASO converts an infrav1.ExtendedLocationSpec to an asonetworkv1.ExtendedLocation.
func ExtendedLocationToNetworkSDK ¶ added in v1.8.0
func ExtendedLocationToNetworkSDK(src *infrav1.ExtendedLocationSpec) *armnetwork.ExtendedLocation
ExtendedLocationToNetworkSDK converts an infrav1.ExtendedLocationSpec to an armnetwork.ExtendedLocation.
func FutureToResumeToken ¶ added in v1.11.0
FutureToResumeToken converts an infrav1.Future to an Azure SDK resume token.
func GetDiagnosticsProfile ¶ added in v1.7.0
func GetDiagnosticsProfile(diagnostics *infrav1.Diagnostics) *armcompute.DiagnosticsProfile
GetDiagnosticsProfile converts a CAPZ Diagnostics option to a Azure SDK Diagnostics Profile.
func GetOrchestrationMode ¶ added in v1.7.0
func GetOrchestrationMode(modeType infrav1.OrchestrationModeType) armcompute.OrchestrationMode
GetOrchestrationMode returns the compute.OrchestrationMode for the given infrav1.OrchestrationModeType.
func GetRecordType ¶
func GetRecordType(ip string) armprivatedns.RecordType
GetRecordType returns the SDK record type to use based on the type of IP to map. Currently only allows type A (IPv4) and AAAA (IPv6) records.
func GetSpotVMOptions ¶
func GetSpotVMOptions(spotVMOptions *infrav1.SpotVMOptions, diffDiskSettings *infrav1.DiffDiskSettings) (*armcompute.VirtualMachinePriorityTypes, *armcompute.VirtualMachineEvictionPolicyTypes, *armcompute.BillingProfile, error)
GetSpotVMOptions takes the spot vm options and returns the individual vm priority, eviction policy and billing profile.
func GetSubnetAddresses ¶ added in v1.4.0
func GetSubnetAddresses(subnet asonetworkv1.VirtualNetworksSubnet) []string
GetSubnetAddresses returns the address prefixes contained in an ASO subnet.
func IDImageRefToImage ¶ added in v1.7.5
IDImageRefToImage converts an ID to a infrav1.Image with ComputerGallery set or ID, depending on the structure of the ID.
func IPTagsToSDK ¶ added in v1.4.0
IPTagsToSDK converts a CAPZ IP tag to an Azure SDK v2 IP tag.
func ImageToPlan ¶ added in v1.1.0
ImageToPlan converts a CAPZ Image to an Azure Compute Plan.
func ImageToSDK ¶
ImageToSDK converts a CAPZ Image (as RawExtension) to a Azure SDK Image Reference.
func PollerToFuture ¶ added in v1.11.0
func PollerToFuture[T any](poller *runtime.Poller[T], futureType, service, resourceName, rgName string) (*infrav1.Future, error)
PollerToFuture converts an SDK poller to an infrav1.Future.
func SDKAvailabilityStatusToCondition ¶ added in v1.7.0
func SDKAvailabilityStatusToCondition(availStatus armresourcehealth.AvailabilityStatus) *clusterv1.Condition
SDKAvailabilityStatusToCondition converts an Azure Resource Health availability status to a status condition.
func SDKImageToImage ¶
SDKImageToImage converts a SDK image reference to infrav1.Image.
func SDKToVMSS ¶
func SDKToVMSS(sdkvmss armcompute.VirtualMachineScaleSet, sdkinstances []armcompute.VirtualMachineScaleSetVM) azure.VMSS
SDKToVMSS converts an Azure SDK VirtualMachineScaleSet to the AzureMachinePool type.
func SDKToVMSSVM ¶
SDKToVMSSVM converts an Azure SDK VirtualMachineScaleSetVM into an infrav1exp.VMSSVM.
func SDKVMToVMSSVM ¶ added in v1.7.0
func SDKVMToVMSSVM(sdkInstance armcompute.VirtualMachine, mode infrav1.OrchestrationModeType) *azure.VMSSVM
SDKVMToVMSSVM converts an Azure SDK VM to a VMSS VM.
func SecurityRuleToSDK ¶
func SecurityRuleToSDK(rule infrav1.SecurityRule) *armnetwork.SecurityRule
SecurityRuleToSDK converts a CAPZ security rule to an Azure network security rule.
func UserAssignedIdentitiesToVMSDK ¶
func UserAssignedIdentitiesToVMSDK(identities []infrav1.UserAssignedIdentity) (map[string]*armcompute.UserAssignedIdentitiesValue, error)
UserAssignedIdentitiesToVMSDK converts CAPZ user assigned identities associated with the Virtual Machine to Azure SDK identities The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
func UserAssignedIdentitiesToVMSSSDK ¶
func UserAssignedIdentitiesToVMSSSDK(identities []infrav1.UserAssignedIdentity) (map[string]*armcompute.UserAssignedIdentitiesValue, error)
UserAssignedIdentitiesToVMSSSDK converts CAPZ user-assigned identities associated with the Virtual Machine Scale Set to Azure SDK identities Similar to UserAssignedIdentitiesToVMSDK.
func VMIdentityToVMSDK ¶ added in v1.1.0
func VMIdentityToVMSDK(identity infrav1.VMIdentity, uami []infrav1.UserAssignedIdentity) (*armcompute.VirtualMachineIdentity, error)
VMIdentityToVMSDK converts CAPZ VM identity to Azure SDK identity.
Types ¶
type VM ¶ added in v1.0.0
type VM struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` AvailabilityZone string `json:"availabilityZone,omitempty"` // Hardware profile VMSize string `json:"vmSize,omitempty"` // Storage profile Image infrav1.Image `json:"image,omitempty"` OSDisk infrav1.OSDisk `json:"osDisk,omitempty"` StartupScript string `json:"startupScript,omitempty"` // State - The provisioning state, which only appears in the response. State infrav1.ProvisioningState `json:"vmState,omitempty"` Identity infrav1.VMIdentity `json:"identity,omitempty"` Tags infrav1.Tags `json:"tags,omitempty"` // Addresses contains the addresses associated with the Azure VM. Addresses []corev1.NodeAddress `json:"addresses,omitempty"` UserAssignedIdentities []infrav1.UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` }
VM describes an Azure virtual machine.