Security hardening: bind kubeconfig server to localhost, mount hardening (noexec/nosuid/nodev on tmpfs), sysctl network hardening, kernel module loading lock after boot, SHA256 checksum verification for downloads, kernel AppArmor + Audit support, complain-mode AppArmor profiles for containerd and kubelet, and security integration test. ARM64 Raspberry Pi support: piCore64 base extraction, RPi kernel build from raspberrypi/linux fork, RPi firmware fetch, SD card image with 4- partition GPT and tryboot A/B mechanism, BootEnv Go interface abstracting GRUB vs RPi boot environments, architecture-aware build scripts, QEMU aarch64 dev VM and boot test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
899 B
Go
24 lines
899 B
Go
package bootenv
|
|
|
|
import (
|
|
"github.com/portainer/kubesolo-os/update/pkg/grubenv"
|
|
)
|
|
|
|
// GRUBEnv implements BootEnv using GRUB environment variables.
|
|
type GRUBEnv struct {
|
|
env *grubenv.Env
|
|
}
|
|
|
|
// NewGRUB creates a new GRUB-based BootEnv.
|
|
func NewGRUB(path string) BootEnv {
|
|
return &GRUBEnv{env: grubenv.New(path)}
|
|
}
|
|
|
|
func (g *GRUBEnv) ActiveSlot() (string, error) { return g.env.ActiveSlot() }
|
|
func (g *GRUBEnv) PassiveSlot() (string, error) { return g.env.PassiveSlot() }
|
|
func (g *GRUBEnv) BootCounter() (int, error) { return g.env.BootCounter() }
|
|
func (g *GRUBEnv) BootSuccess() (bool, error) { return g.env.BootSuccess() }
|
|
func (g *GRUBEnv) MarkBootSuccess() error { return g.env.MarkBootSuccess() }
|
|
func (g *GRUBEnv) ActivateSlot(slot string) error { return g.env.ActivateSlot(slot) }
|
|
func (g *GRUBEnv) ForceRollback() error { return g.env.ForceRollback() }
|