Documentation
¶
Index ¶
- func EnableDaemon(log *slog.Logger) phases.Task
- func PersistAppliedConfig(log *slog.Logger, machineName string, cfg *config.AgentConfig) phases.Task
- func RecordAgentUpgradeFailureSignal(message string) error
- func RemoveAgentArtifacts(log *slog.Logger) phases.Task
- func RemoveAppliedConfig(log *slog.Logger, machineName string) phases.Task
- func RemoveDaemonUnit(log *slog.Logger) phases.Task
- func ResetAgentResources(log *slog.Logger) phases.Task
- func Run(ctx context.Context, log *slog.Logger) error
- func StopDaemon(log *slog.Logger) phases.Task
- type ActiveMachine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableDaemon ¶ added in v0.1.1
EnableDaemon returns a task that installs, enables, and starts the unbounded-agent-daemon systemd unit on the host. The unit runs "unbounded-agent daemon" which watches the Machine CR for this node and reconciles the local state to match.
func PersistAppliedConfig ¶ added in v0.1.1
func PersistAppliedConfig(log *slog.Logger, machineName string, cfg *config.AgentConfig) phases.Task
PersistAppliedConfig returns a task that writes the agent config to the applied config file for the nspawn machine. The daemon reads this file on startup to detect configuration drift.
func RecordAgentUpgradeFailureSignal ¶ added in v0.1.4
RecordAgentUpgradeFailureSignal records that the daemon failed after an AgentUpgrade.
func RemoveAgentArtifacts ¶ added in v0.1.1
RemoveAgentArtifacts returns a task that removes the agent binary, install script, legacy uninstall script, config directory, and temp files.
func RemoveAppliedConfig ¶ added in v0.1.1
RemoveAppliedConfig returns a task that removes the applied agent config file and its checksum sidecar for the named machine. Errors are logged but do not fail the task.
func RemoveDaemonUnit ¶ added in v0.1.4
RemoveDaemonUnit returns a task that disables and removes the unbounded-agent-daemon systemd unit without stopping the running service.
func ResetAgentResources ¶ added in v0.1.4
ResetAgentResources returns a task that removes the unbounded-agent and all associated resources without stopping the daemon process.
Types ¶
type ActiveMachine ¶
type ActiveMachine struct {
Name string
Config *provision.AgentConfig
}
ActiveMachine holds the currently active nspawn machine name and its applied agent configuration.