aksmachine

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureMachine

func EnsureMachine(cfg *config.Config, logger *slog.Logger) phases.Task

EnsureMachine returns a task that ensures the AKS "aksflexnodes" agent pool (mode=Machines) exists and this machine is registered in it.

Types

type GoalState

type GoalState struct {
	KubernetesVersion string `json:"kubernetesVersion,omitempty"`
	SettingsVersion   string `json:"settingsVersion,omitempty"`
}

GoalState is the local agent representation of ARM machine desired settings. Keep this type independent from the public Azure SDK shape; adapt the SDK payload to this model when the ARM contract is finalized.

type Machine

type Machine struct {
	ID     string    `json:"id,omitempty"`
	Name   string    `json:"name,omitempty"`
	Goal   GoalState `json:"goal"`
	Status Status    `json:"status"`
}

Machine is the local agent representation of the AKS RP machine resource.

type MachineClient

type MachineClient interface {
	Create(ctx context.Context, desired GoalState) (*Machine, error)
	Get(ctx context.Context) (*Machine, error)
	PatchStatus(ctx context.Context, status Status) error
}

MachineClient provides access to the AKS-side machine representation. Production should use the official Azure SDK implementation once the public SDK contains the finalized resource shape; e2e tests can provide a local or remote implementation of this interface.

func NewNoopClient

func NewNoopClient(cfg *config.Config) MachineClient

NewNoopClient returns a temporary no-op machine client used until the AKS RP machine implementation is available.

type NotFoundError

type NotFoundError struct {
	Resource string
}

NotFoundError is returned when the ARM machine resource does not exist.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStatePending     ProvisioningState = "Pending"
	ProvisioningStateReconciling ProvisioningState = "Reconciling"
	ProvisioningStateSucceeded   ProvisioningState = "Succeeded"
	ProvisioningStateFailed      ProvisioningState = "Failed"
	ProvisioningStateDeleting    ProvisioningState = "Deleting"
)

type Status

type Status struct {
	ProvisioningState       ProvisioningState `json:"provisioningState,omitempty"`
	ObservedSettingsVersion string            `json:"observedSettingsVersion,omitempty"`
	Message                 string            `json:"message,omitempty"`
}

Status is the local agent representation of ARM machine status.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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