Documentation ¶
Index ¶
- type AzureClient
- func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, resourceGroupName, vmssName string, ...) (*infrav1.Future, error)
- func (ac *AzureClient) DeleteAsync(ctx context.Context, resourceGroupName, vmssName string) (*infrav1.Future, error)
- func (ac *AzureClient) Get(ctx context.Context, resourceGroupName, vmssName string) (compute.VirtualMachineScaleSet, error)
- func (ac *AzureClient) GetResultIfDone(ctx context.Context, future *infrav1.Future) (compute.VirtualMachineScaleSet, error)
- func (ac *AzureClient) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, error)
- func (ac *AzureClient) ListInstances(ctx context.Context, resourceGroupName, vmssName string) ([]compute.VirtualMachineScaleSetVM, error)
- func (ac *AzureClient) UpdateAsync(ctx context.Context, resourceGroupName, vmssName string, ...) (*infrav1.Future, error)
- func (ac *AzureClient) UpdateInstances(ctx context.Context, resourceGroupName, vmssName string, instanceIDs []string) error
- type Client
- type ScaleSetScope
- 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
NewClient creates a new VMSS client from subscription ID.
func (*AzureClient) CreateOrUpdateAsync ¶
func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, resourceGroupName, vmssName string, vmss compute.VirtualMachineScaleSet) (*infrav1.Future, error)
CreateOrUpdateAsync the operation to create or update a virtual machine scale set without waiting for the operation to complete.
func (*AzureClient) DeleteAsync ¶
func (ac *AzureClient) DeleteAsync(ctx context.Context, resourceGroupName, vmssName string) (*infrav1.Future, 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 Future which can be used to track the ongoing progress of the operation.
Parameters:
resourceGroupName - the name of the resource group. vmssName - the name of the VM scale set to create or update. parameters - the scale set object.
func (*AzureClient) Get ¶
func (ac *AzureClient) Get(ctx context.Context, resourceGroupName, vmssName string) (compute.VirtualMachineScaleSet, error)
Get retrieves information about the model view of a virtual machine scale set.
func (*AzureClient) GetResultIfDone ¶
func (ac *AzureClient) GetResultIfDone(ctx context.Context, future *infrav1.Future) (compute.VirtualMachineScaleSet, error)
GetResultIfDone fetches the result of a long-running operation future if it is done.
func (*AzureClient) List ¶
func (ac *AzureClient) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, error)
List returns all scale sets in a resource group.
func (*AzureClient) ListInstances ¶
func (ac *AzureClient) ListInstances(ctx context.Context, resourceGroupName, vmssName string) ([]compute.VirtualMachineScaleSetVM, error)
ListInstances retrieves information about the model views of a virtual machine scale set.
func (*AzureClient) UpdateAsync ¶
func (ac *AzureClient) UpdateAsync(ctx context.Context, resourceGroupName, vmssName string, parameters compute.VirtualMachineScaleSetUpdate) (*infrav1.Future, error)
UpdateAsync update a VM scale set without waiting for the result of the operation. UpdateAsync sends a PATCH request to Azure and if accepted without error, the func will return a Future which can be used to track the ongoing progress of the operation.
Parameters:
resourceGroupName - the name of the resource group. vmssName - the name of the VM scale set to create or update. parameters - the scale set object.
func (*AzureClient) UpdateInstances ¶
func (ac *AzureClient) UpdateInstances(ctx context.Context, resourceGroupName, vmssName string, instanceIDs []string) error
UpdateInstances update instances of a VM scale set.
type Client ¶
type Client interface { List(context.Context, string) ([]compute.VirtualMachineScaleSet, error) ListInstances(context.Context, string, string) ([]compute.VirtualMachineScaleSetVM, error) Get(context.Context, string, string) (compute.VirtualMachineScaleSet, error) CreateOrUpdateAsync(context.Context, string, string, compute.VirtualMachineScaleSet) (*infrav1.Future, error) UpdateAsync(context.Context, string, string, compute.VirtualMachineScaleSetUpdate) (*infrav1.Future, error) GetResultIfDone(ctx context.Context, future *infrav1.Future) (compute.VirtualMachineScaleSet, error) UpdateInstances(context.Context, string, string, []string) error DeleteAsync(context.Context, string, string) (*infrav1.Future, error) }
Client wraps go-sdk.
type ScaleSetScope ¶
type ScaleSetScope interface { azure.ClusterDescriber azure.AsyncStatusUpdater GetBootstrapData(context.Context) (string, error) GetVMImage(context.Context) (*infrav1.Image, error) SaveVMImageToStatus(*infrav1.Image) MaxSurge() (int, error) ScaleSetSpec() azure.ScaleSetSpec VMSSExtensionSpecs() []azure.ResourceSpecGetter SetAnnotation(string, string) SetProviderID(string) SetVMSSState(*azure.VMSS) ReconcileReplicas(context.Context, *azure.VMSS) error HasReplicasExternallyManaged(context.Context) bool HasBootstrapDataChanges(context.Context) (bool, error) }
ScaleSetScope defines the scope interface for a scale sets service.
type Service ¶
type Service struct { Scope ScaleSetScope Client // 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
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.
Directories ¶
Path | Synopsis |
---|---|
Package mock_scalesets is a generated GoMock package.
|
Package mock_scalesets is a generated GoMock package. |