Documentation
¶
Index ¶
Constants ¶
const ( ProvisioningStateCreating = "Creating" ProvisioningStateUpdating = "Updating" ProvisioningStateDeleting = "Deleting" ProvisioningStateSucceeded = "Succeeded" ProvisioningStateFailed = "Failed" )
Provisioning state constants for AKS Machine API
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AKSMachineGetter ¶
type AKSMachineGetter interface {
Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, aksMachineName string, options *armcontainerservice.MachinesClientGetOptions) (armcontainerservice.MachinesClientGetResponse, error)
}
type CreatePoller ¶
type CreatePoller interface {
PollUntilDone(ctx context.Context) (provisioningError *armcontainerservice.ErrorDetail, pollerError error)
}
type Options ¶
type Options struct {
// PollInterval is the interval between GET requests to check operation state
PollInterval time.Duration
// InitialRetryDelay is the initial delay before retrying a failed GET request
InitialRetryDelay time.Duration
// MaxRetryDelay is the maximum delay between retries (exponential backoff cap)
MaxRetryDelay time.Duration
// MaxRetries is the maximum number of retry attempts for transient GET errors
MaxRetries int
}
Options contains configuration for polling long-running operations.
type Poller ¶
type Poller struct {
// contains filtered or unexported fields
}
Poller polls AKS machine instances until they reach a terminal state. This follows Azure SDK polling patterns with exponential backoff for transient errors.
func (*Poller) PollUntilDone ¶
func (p *Poller) PollUntilDone(ctx context.Context) (*armcontainerservice.ErrorDetail, error)
PollUntilDone polls the AKS machine instance with GET calls until provisioning state is stabilized. If the provisioning is a success, returns nil. If provisioning is a failure, returns provisioning error. The function itself will error (second return value) only if the function is not performing as expected. E.g., getting a proper provisioning error from AKS machine API is the expected behavior of this function, this won't be considered function error.
ASSUMPTION: the AKS machine creation has already begun, and is visible from the API (using GET).
type SDKPollerAdapter ¶
type SDKPollerAdapter struct {
// contains filtered or unexported fields
}
func NewSDKPollerAdapter ¶
func NewSDKPollerAdapter( poller *runtime.Poller[armcontainerservice.MachinesClientCreateOrUpdateResponse], client AKSMachineGetter, resourceGroupName string, clusterName string, agentPoolName string, aksMachineName string, ) *SDKPollerAdapter
func (*SDKPollerAdapter) PollUntilDone ¶
func (a *SDKPollerAdapter) PollUntilDone(ctx context.Context) (*armcontainerservice.ErrorDetail, error)