daemon

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 64 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

Variables

This section is empty.

Functions

func ActivateHostAgent added in v0.1.7

func ActivateHostAgent(ctx context.Context, log *slog.Logger, candidatePath string) (agentbinary.ActivationResult, error)

ActivateHostAgent activates a directly staged Flex agent binary. It uses the same lock and binary layout as MachineOperation upgrades.

func NewFileStateStore

func NewFileStateStore() (stateStore, error)

func PreflightHostAgentActivation added in v0.1.7

func PreflightHostAgentActivation(ctx context.Context, log *slog.Logger, candidatePath string) (agentbinary.ActivationPlan, error)

PreflightHostAgentActivation plans activation without changing the installed layout or units.

func RecoverAgentUpgrade added in v0.1.7

func RecoverAgentUpgrade(ctx context.Context, log *slog.Logger, message string) error

RecoverAgentUpgrade selects the applied worker before deployment restores the last-good agent. Image deployments have no host worker mode to select.

func ResetWorker added in v0.4.0

func ResetWorker(log *slog.Logger, worker agentruntime.Runtime, hostHub phases.Task) phases.Task

ResetWorker discovers ownership at execution time, after CLI daemon shutdown.

func Run

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

Run starts the machine-driven daemon loop.

func SetupHost

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

func ValidateAgentDeployment added in v0.4.0

func ValidateAgentDeployment(mode isolation.Mode, containerized bool) error

ValidateAgentDeployment checks the worker and agent deployment combination.

func ValidateWorkerBootstrap added in v0.4.0

func ValidateWorkerBootstrap(cfg *config.Config, applied *State, containerized bool) error

ValidateWorkerBootstrap checks deployment compatibility and applied isolation.

Types

type State

type State struct {
	Isolation  isolation.Mode           `json:"isolation,omitempty"`
	NodeConfig *agentconfig.AgentConfig `json:"nodeConfig,omitempty"`

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

func BootstrapState(applied, seeded *State, cfg *config.Config) (*State, bool, error)

BootstrapState selects the installed worker for a none/OCI reapply. Nspawn retains its existing bootstrap behavior.

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