daemon

package
v0.0.0-...-2e6cce1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultOstreePath    = "/proc/1/root/ostree/bootc"
	DefaultComposefsPath = "/proc/1/root/sysroot/state/deploy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BootcNodeReconciler

type BootcNodeReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	NodeName      string
	Executor      bootc.Executor
	StatusWatcher *StatusWatcher
	// contains filtered or unexported fields
}

BootcNodeReconciler reconciles the BootcNode for the node this daemon runs on. It reads bootc status from the watcher's cache, detects image mismatches, and drives updates via bootc stage.

func (*BootcNodeReconciler) Reconcile

func (r *BootcNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*BootcNodeReconciler) SetupWithManager

func (r *BootcNodeReconciler) SetupWithManager(mgr ctrl.Manager) error

type StatusWatcher

type StatusWatcher struct {
	PollInterval  time.Duration
	OstreePath    string
	ComposefsPath string
	Events        chan event.GenericEvent
	NodeName      string
	Executor      bootc.Executor
	Ready         chan struct{}
	// contains filtered or unexported fields
}

func (*StatusWatcher) GetStatus

func (w *StatusWatcher) GetStatus(ctx context.Context) (*bootc.Status, error)

GetStatus returns the cached bootc status when the watcher loop is running (fsnotify or polling keeps the cache fresh). If the watcher has not been started, it always reads fresh from the host.

func (*StatusWatcher) Start

func (w *StatusWatcher) Start(ctx context.Context) error

Start implements manager.Runnable.

Jump to

Keyboard shortcuts

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