Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureMachine ¶
func EnsureMachine(machines MachineClient, goal GoalState, require bool, logger *slog.Logger) phases.Task
EnsureMachine returns a task that ensures this machine is registered in AKS.
Types ¶
type GoalState ¶
type GoalState struct {
KubernetesVersion string `json:"kubernetesVersion,omitempty"`
SettingsVersion string `json:"settingsVersion,omitempty"`
MaxPods int `json:"maxPods,omitempty"`
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
NodeTaints []string `json:"nodeTaints,omitempty"`
KubeletConfig KubeletConfig `json:"kubeletConfig"`
}
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 KubeletConfig ¶ added in v0.1.1
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 NewMachineClient ¶ added in v0.1.1
NewMachineClient creates a MachineClient instance from config.
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.