2026-03-31 14:52:50 -03:00
|
|
|
package facts
|
|
|
|
|
|
2026-04-11 01:08:08 -03:00
|
|
|
// USBBindTarget captures a bind mount and whether it looked healthy.
|
|
|
|
|
type USBBindTarget struct {
|
|
|
|
|
Path string `json:"path,omitempty"`
|
|
|
|
|
Healthy bool `json:"healthy,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// USBScratch captures the desired scratch-disk configuration plus health.
|
|
|
|
|
type USBScratch struct {
|
|
|
|
|
Mountpoint string `json:"mountpoint,omitempty"`
|
|
|
|
|
UUID string `json:"uuid,omitempty"`
|
|
|
|
|
Label string `json:"label,omitempty"`
|
|
|
|
|
FS string `json:"fs,omitempty"`
|
|
|
|
|
MountHealthy bool `json:"mount_healthy,omitempty"`
|
|
|
|
|
UUIDHealthy bool `json:"uuid_healthy,omitempty"`
|
|
|
|
|
LabelHealthy bool `json:"label_healthy,omitempty"`
|
|
|
|
|
BindTargets []USBBindTarget `json:"bind_targets,omitempty"`
|
|
|
|
|
BindHealthy bool `json:"bind_healthy,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-31 14:52:50 -03:00
|
|
|
// ClassFacts captures driftable state collected by metis-sentinel.
|
|
|
|
|
type ClassFacts struct {
|
2026-04-11 01:08:08 -03:00
|
|
|
ClassName string `json:"class_name"`
|
|
|
|
|
Kernel string `json:"kernel,omitempty"`
|
|
|
|
|
K3sVersion string `json:"k3s_version,omitempty"`
|
|
|
|
|
Containerd string `json:"containerd,omitempty"`
|
|
|
|
|
Packages map[string]string `json:"packages,omitempty"` // name -> version
|
|
|
|
|
DropIns map[string]string `json:"dropins,omitempty"` // path -> content
|
|
|
|
|
Sysctl map[string]string `json:"sysctl,omitempty"` // key -> value
|
|
|
|
|
CGroupConfig map[string]string `json:"cgroup_config,omitempty"` // key -> value
|
|
|
|
|
USBMountHealth map[string]int `json:"usb_mount_health,omitempty"`
|
|
|
|
|
USBUUIDHealth map[string]int `json:"usb_uuid_health,omitempty"`
|
|
|
|
|
USBLabelHealth map[string]int `json:"usb_label_health,omitempty"`
|
|
|
|
|
USBBindHealth map[string]int `json:"usb_bind_health,omitempty"`
|
|
|
|
|
Notes string `json:"notes,omitempty"`
|
2026-03-31 14:52:50 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NodeFacts captures per-node data (e.g., disk UUIDs) to verify drift.
|
|
|
|
|
type NodeFacts struct {
|
2026-04-11 01:08:08 -03:00
|
|
|
Hostname string `json:"hostname"`
|
|
|
|
|
Disks map[string]string `json:"disks,omitempty"` // mount -> UUID
|
|
|
|
|
USBScratch *USBScratch `json:"usb_scratch,omitempty"`
|
|
|
|
|
Notes string `json:"notes,omitempty"`
|
2026-03-31 14:52:50 -03:00
|
|
|
}
|