daemon

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 52 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeletionTaintKey    = "kubernetes.azure.com/flex-node-deleting"
	DeletionTaintValue  = "true"
	DeletionTaintEffect = corev1.TaintEffectNoSchedule
)
View Source
const DefaultMachineReconcileInterval = 10 * time.Minute
View Source
const (
	ServiceUnitName = "aks-flex-node-agent.service"
)

Variables

This section is empty.

Functions

func InstallBinary

func InstallBinary(machineDir string) phases.Task

InstallBinary returns a task that copies the current process binary into the nspawn rootfs at /usr/local/bin/aks-flex-node.

func InstallService

func InstallService(log *slog.Logger) phases.Task

InstallService returns a task that installs, enables, and starts the systemd unit.

func NewFileStateStore

func NewFileStateStore() (stateStore, error)

func ResetNode

func ResetNode(log *slog.Logger) phases.Task

func Run

func Run(ctx context.Context, cfg *config.Config, log *slog.Logger, machines aksmachine.MachineClient) error

Run starts the ARM-machine-driven daemon loop. The AKS machine client is injected so production ARM, remote test, and local file-backed clients can share the same daemon controller.

func SetupHost

func SetupHost(cfg *config.Config, log *slog.Logger) phases.Task

func StartNode

func StartNode(
	cfg *config.Config,
	log *slog.Logger,
	machineName string,
	gs *goalstates.MachineGoalState,
	store stateStore,
	state *State,
) phases.Task

func UninstallService

func UninstallService(log *slog.Logger) phases.Task

UninstallService returns a task that stops, disables, removes, and reloads the systemd unit.

Types

type State

type State struct {
	AppliedSettingsVersion    string `json:"appliedSettingsVersion,omitempty"`
	AppliedKubernetesVersion  string `json:"appliedKubernetesVersion,omitempty"`
	PreviousSettingsVersion   string `json:"previousSettingsVersion,omitempty"`
	PreviousKubernetesVersion string `json:"previousKubernetesVersion,omitempty"`
	ActiveMachine             string `json:"activeMachine,omitempty"`
}

State records the last safely applied AKS machine goal and the previous known-good goal needed for rollback-oriented reconciliation.

func SeededState

func SeededState(goal aksmachine.GoalState) *State

Jump to

Keyboard shortcuts

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