Documentation ¶
Index ¶
- type AzureClient
- func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string, ...) (result interface{}, ...)
- func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string) (poller *runtime.Poller[armcompute.VirtualMachineScaleSetsClientDeleteResponse], ...)
- func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (interface{}, error)
- func (ac *AzureClient) List(ctx context.Context, resourceGroupName string) ([]armcompute.VirtualMachineScaleSet, error)
- func (ac *AzureClient) ListInstances(ctx context.Context, resourceGroupName string, resourceName string) ([]armcompute.VirtualMachineScaleSetVM, error)
- type Client
- type ScaleSetScope
- type ScaleSetSpec
- type Service
- type VMSSExtensionSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureClient ¶
type AzureClient struct {
// contains filtered or unexported fields
}
AzureClient contains the Azure go-sdk Client.
func NewClient ¶
func NewClient(auth azure.Authorizer) (*AzureClient, error)
NewClient creates a new VMSS client from an authorizer.
func (*AzureClient) CreateOrUpdateAsync ¶
func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string, parameters interface{}) (result interface{}, poller *runtime.Poller[armcompute.VirtualMachineScaleSetsClientCreateOrUpdateResponse], err error)
CreateOrUpdateAsync creates or updates a virtual machine scale set asynchronously. It sends a PUT request to Azure and if accepted without error, the func will return a poller which can be used to track the ongoing progress of the operation.
func (*AzureClient) DeleteAsync ¶
func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string) (poller *runtime.Poller[armcompute.VirtualMachineScaleSetsClientDeleteResponse], err error)
DeleteAsync is the operation to delete a virtual machine scale set asynchronously. DeleteAsync sends a DELETE request to Azure and if accepted without error, the func will return a poller which can be used to track the ongoing progress of the operation.
Parameters:
spec - The ResourceSpecGetter containing used for name and resource group of the virtual machine scale set.
func (*AzureClient) Get ¶
func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (interface{}, error)
Get retrieves information about the model view of a virtual machine scale set.
func (*AzureClient) List ¶
func (ac *AzureClient) List(ctx context.Context, resourceGroupName string) ([]armcompute.VirtualMachineScaleSet, error)
List returns all scale sets in a resource group.
func (*AzureClient) ListInstances ¶
func (ac *AzureClient) ListInstances(ctx context.Context, resourceGroupName string, resourceName string) ([]armcompute.VirtualMachineScaleSetVM, error)
ListInstances retrieves information about the model views of a virtual machine scale set.
type Client ¶
type Client interface { Get(context.Context, azure.ResourceSpecGetter) (interface{}, error) List(context.Context, string) ([]armcompute.VirtualMachineScaleSet, error) ListInstances(context.Context, string, string) ([]armcompute.VirtualMachineScaleSetVM, error) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string, parameters interface{}) (result interface{}, poller *runtime.Poller[armcompute.VirtualMachineScaleSetsClientCreateOrUpdateResponse], err error) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string) (poller *runtime.Poller[armcompute.VirtualMachineScaleSetsClientDeleteResponse], err error) }
Client wraps go-sdk.
type ScaleSetScope ¶
type ScaleSetScope interface { azure.ClusterDescriber azure.AsyncStatusUpdater ScaleSetSpec(context.Context) azure.ResourceSpecGetter VMSSExtensionSpecs() []azure.ResourceSpecGetter SetAnnotation(string, string) SetProviderID(string) SetVMSSState(*azure.VMSS) ReconcileReplicas(context.Context, *azure.VMSS) error }
ScaleSetScope defines the scope interface for a scale sets service.
type ScaleSetSpec ¶ added in v1.11.0
type ScaleSetSpec struct { Name string ResourceGroup 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 AdditionalCapabilities *infrav1.AdditionalCapabilities DiagnosticsProfile *infrav1.Diagnostics FailureDomains []string VMExtensions []infrav1.VMExtension NetworkInterfaces []infrav1.NetworkInterface IPv6Enabled bool OrchestrationMode infrav1.OrchestrationModeType Location string SubscriptionID string SKU resourceskus.SKU VMSSExtensionSpecs []azure.ResourceSpecGetter VMImage *infrav1.Image BootstrapData string VMSSInstances []armcompute.VirtualMachineScaleSetVM MaxSurge int ClusterName string ShouldPatchCustomData bool HasReplicasExternallyManaged bool AdditionalTags infrav1.Tags }
ScaleSetSpec defines the specification for a Scale Set.
func (*ScaleSetSpec) OwnerResourceName ¶ added in v1.11.0
func (s *ScaleSetSpec) OwnerResourceName() string
OwnerResourceName is a no-op for Scale Sets.
func (*ScaleSetSpec) Parameters ¶ added in v1.11.0
func (s *ScaleSetSpec) Parameters(ctx context.Context, existing interface{}) (parameters interface{}, err error)
Parameters returns the parameters for the Scale Set.
func (*ScaleSetSpec) ResourceGroupName ¶ added in v1.11.0
func (s *ScaleSetSpec) ResourceGroupName() string
ResourceGroupName returns the name of the resource group for this Scale Set.
func (*ScaleSetSpec) ResourceName ¶ added in v1.11.0
func (s *ScaleSetSpec) ResourceName() string
ResourceName returns the name of the Scale Set.
type Service ¶
type Service struct { Scope ScaleSetScope Client async.Reconciler // contains filtered or unexported fields }
Service provides operations on Azure resources.
func New ¶ added in v1.3.0
func New(scope ScaleSetScope, skuCache *resourceskus.Cache) (*Service, error)
New creates a new service.
func (*Service) Delete ¶
Delete deletes a scale set asynchronously. Delete sends a DELETE request to Azure and if accepted without error, the VMSS will be considered deleted. The actual delete in Azure may take longer, but should eventually complete.
func (*Service) IsManaged ¶ added in v1.3.0
IsManaged returns always returns true as CAPZ does not support BYO scale set.
type VMSSExtensionSpec ¶ added in v1.3.0
type VMSSExtensionSpec struct { azure.ExtensionSpec ResourceGroup string }
VMSSExtensionSpec defines the specification for a VM or VMScaleSet extension.
func (*VMSSExtensionSpec) OwnerResourceName ¶ added in v1.3.0
func (s *VMSSExtensionSpec) OwnerResourceName() string
OwnerResourceName returns the name of the VMSS that owns this VMSS extension.
func (*VMSSExtensionSpec) Parameters ¶ added in v1.3.0
func (s *VMSSExtensionSpec) Parameters(ctx context.Context, existing interface{}) (interface{}, error)
Parameters returns the parameters for the VMSS extension.
func (*VMSSExtensionSpec) ResourceGroupName ¶ added in v1.3.0
func (s *VMSSExtensionSpec) ResourceGroupName() string
ResourceGroupName returns the name of the resource group.
func (*VMSSExtensionSpec) ResourceName ¶ added in v1.3.0
func (s *VMSSExtensionSpec) ResourceName() string
ResourceName returns the name of the VMSS extension.