scalesets

package
v0.4.14 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PatchFuture is a future that was derived from a PATCH request to VMSS
	PatchFuture string = "PATCH"
	// PutFuture is a future that was derived from a PUT request to VMSS
	PutFuture string = "PUT"
	// DeleteFuture is a future that was derived from a DELETE request to VMSS
	DeleteFuture string = "DELETE"
)

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) CreateOrUpdate

func (ac *AzureClient) CreateOrUpdate(ctx context.Context, resourceGroupName, vmssName string, vmss compute.VirtualMachineScaleSet) error

CreateOrUpdate the operation to create or update a virtual machine scale set.

func (*AzureClient) CreateOrUpdateAsync added in v0.4.11

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) Delete

func (ac *AzureClient) Delete(ctx context.Context, resourceGroupName, vmssName string) error

Delete the operation to delete a virtual machine scale set.

func (*AzureClient) DeleteAsync added in v0.4.11

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) GetPublicIPAddress

func (ac *AzureClient) GetPublicIPAddress(ctx context.Context, resourceGroupName, publicIPName string) (network.PublicIPAddress, error)

GetPublicIPAddress gets the public IP address for the given public IP name.

func (*AzureClient) GetResultIfDone added in v0.4.11

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 added in v0.4.4

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) Update added in v0.4.5

func (ac *AzureClient) Update(ctx context.Context, resourceGroupName, vmssName string, parameters compute.VirtualMachineScaleSetUpdate) (compute.VirtualMachineScaleSet, error)

Update update a VM scale set. Parameters: resourceGroupName - the name of the resource group. VMScaleSetName - the name of the VM scale set to create or update. parameters - the scale set object.

func (*AzureClient) UpdateAsync added in v0.4.11

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 added in v0.4.10

func (ac *AzureClient) UpdateInstances(ctx context.Context, resourceGroupName, vmssName string, instanceIDs []string) error

UpdateInstances update instances of a VM scale set.

type ScaleSetScope added in v0.4.8

type ScaleSetScope interface {
	logr.Logger
	azure.ClusterDescriber
	ScaleSetSpec() azure.ScaleSetSpec
	VMSSExtensionSpecs() []azure.VMSSExtensionSpec
	GetBootstrapData(ctx context.Context) (string, error)
	GetVMImage() (*infrav1.Image, error)
	SetAnnotation(string, string)
	SetProviderID(string)
	UpdateInstanceStatuses(context.Context, []infrav1exp.VMSSVM) error
	NeedsK8sVersionUpdate() bool
	SaveK8sVersion()
	SetProvisioningState(infrav1.VMState)
	SetLongRunningOperationState(*infrav1.Future)
	GetLongRunningOperationState() *infrav1.Future
}

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 NewService

func NewService(scope ScaleSetScope, skuCache *resourceskus.Cache) *Service

NewService creates a new service.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context) error

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) Reconcile

func (s *Service) Reconcile(ctx context.Context) error

Reconcile idempotently gets, creates, and updates a scale set.

Directories

Path Synopsis
Package mock_scalesets is a generated GoMock package.
Package mock_scalesets is a generated GoMock package.

Jump to

Keyboard shortcuts

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