cc

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package cc implements cloud-config applier orchestration for k3os boot phases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Applier added in v1.6.0

type Applier struct {
	FS       iface.FileSystem
	Cmd      iface.CommandRunner
	Modules  iface.ModuleLoader
	Sysctl   iface.SysctlApplier
	Mounter  iface.Mounter
	Hostname iface.HostnameSetter
	// contains filtered or unexported fields
}

Applier holds the dependencies needed by cloud-config applier functions.

func NewDefaultApplier added in v1.6.0

func NewDefaultApplier() *Applier

NewDefaultApplier creates an Applier with production OS implementations.

func (*Applier) ApplyBootcmd added in v1.6.0

func (a *Applier) ApplyBootcmd(cfg *config.CloudConfig) error

ApplyBootcmd executes configured boot commands.

func (*Applier) ApplyDNS added in v1.6.0

func (a *Applier) ApplyDNS(cfg *config.CloudConfig) error

ApplyDNS writes connman DNS and NTP configuration.

func (*Applier) ApplyDataSource added in v1.6.0

func (a *Applier) ApplyDataSource(cfg *config.CloudConfig) error

ApplyDataSource writes configured cloud-config data source arguments.

func (*Applier) ApplyEnvironment added in v1.6.0

func (a *Applier) ApplyEnvironment(cfg *config.CloudConfig) error

ApplyEnvironment merges configured environment variables into /etc/environment.

func (*Applier) ApplyHostname added in v1.6.0

func (a *Applier) ApplyHostname(cfg *config.CloudConfig) error

ApplyHostname applies the configured hostname.

func (*Applier) ApplyInitcmd added in v1.6.0

func (a *Applier) ApplyInitcmd(cfg *config.CloudConfig) error

ApplyInitcmd executes configured init commands.

func (*Applier) ApplyInstall added in v1.6.0

func (a *Applier) ApplyInstall(_ *config.CloudConfig) error

ApplyInstall invokes k3os install mode when requested.

func (*Applier) ApplyK3S added in v1.6.0

func (a *Applier) ApplyK3S(cfg *config.CloudConfig, restart, install bool) error

ApplyK3S applies k3s installation and runtime arguments.

func (*Applier) ApplyK3SInstall added in v1.6.0

func (a *Applier) ApplyK3SInstall(cfg *config.CloudConfig) error

ApplyK3SInstall applies k3s installation configuration.

func (*Applier) ApplyK3SNoRestart added in v1.6.0

func (a *Applier) ApplyK3SNoRestart(cfg *config.CloudConfig) error

ApplyK3SNoRestart applies k3s configuration without starting the service.

func (*Applier) ApplyK3SWithRestart added in v1.6.0

func (a *Applier) ApplyK3SWithRestart(cfg *config.CloudConfig) error

ApplyK3SWithRestart applies k3s configuration and allows service restart.

func (*Applier) ApplyModules added in v1.6.0

func (a *Applier) ApplyModules(cfg *config.CloudConfig) error

ApplyModules loads configured kernel modules.

func (*Applier) ApplyPassword added in v1.6.0

func (a *Applier) ApplyPassword(cfg *config.CloudConfig) error

ApplyPassword applies the configured rancher user password.

func (*Applier) ApplyRuncmd added in v1.6.0

func (a *Applier) ApplyRuncmd(cfg *config.CloudConfig) error

ApplyRuncmd executes configured run commands.

func (*Applier) ApplySSHKeys added in v1.6.0

func (a *Applier) ApplySSHKeys(cfg *config.CloudConfig) error

ApplySSHKeys applies configured SSH authorized keys without network fetches.

func (*Applier) ApplySSHKeysWithNet added in v1.6.0

func (a *Applier) ApplySSHKeysWithNet(cfg *config.CloudConfig) error

ApplySSHKeysWithNet applies configured SSH authorized keys with network fetches enabled.

func (*Applier) ApplySysctls added in v1.6.0

func (a *Applier) ApplySysctls(cfg *config.CloudConfig) error

ApplySysctls applies configured sysctl values.

func (*Applier) ApplyWifi added in v1.6.0

func (a *Applier) ApplyWifi(cfg *config.CloudConfig) error

ApplyWifi writes connman Wi-Fi configuration.

func (*Applier) ApplyWriteFiles added in v1.6.0

func (a *Applier) ApplyWriteFiles(cfg *config.CloudConfig) error

ApplyWriteFiles writes configured files to disk.

func (*Applier) BootApply added in v1.6.0

func (a *Applier) BootApply(cfg *config.CloudConfig) error

BootApply runs the boot-phase cloud-config apply sequence.

func (*Applier) InitApply added in v1.6.0

func (a *Applier) InitApply(cfg *config.CloudConfig) error

InitApply runs the initrd-phase cloud-config apply sequence.

func (*Applier) InstallApply added in v1.6.0

func (a *Applier) InstallApply(cfg *config.CloudConfig) error

InstallApply runs the install-phase cloud-config apply sequence.

func (*Applier) RunApply added in v1.6.0

func (a *Applier) RunApply(cfg *config.CloudConfig) error

RunApply runs the normal cloud-config apply sequence.

Jump to

Keyboard shortcuts

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