Documentation
¶
Overview ¶
Package install provides functionality to run the installer container for Talos.
Index ¶
- func PullAndValidateInstallerImage(ctx context.Context, resources state.State, ...) error
- func ReloadMeta(ctx context.Context, st state.State, meta runtime.Meta) error
- func RunInstallerContainer(disk, platform, ref string, cfg configcore.Config, ...) error
- func SyncMeta(ctx context.Context, st state.State, meta runtime.Meta) error
- type Option
- func OptionsFromUpgradeRequest(r runtime.Runtime, in *machineapi.UpgradeRequest) []Option
- func WithExtraKernelArgs(s []string) Option
- func WithForce(b bool) Option
- func WithGrubUseUKICmdline(enabled bool) Option
- func WithOptions(opts Options) Option
- func WithPull(b bool) Optiondeprecated
- func WithUpgrade(b bool) Option
- func WithZero(b bool) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PullAndValidateInstallerImage ¶
func PullAndValidateInstallerImage(ctx context.Context, resources state.State, registryBuilder image.RegistriesBuilder, ref string) error
PullAndValidateInstallerImage pulls down the installer and validates that it can run.
func ReloadMeta ¶ added in v1.13.10
ReloadMeta reloads the in-memory META from the META partition created by the installer, merging the in-memory values on top of the on-disk ones.
func RunInstallerContainer ¶
func RunInstallerContainer( disk, platform, ref string, cfg configcore.Config, cfgContainer configcore.Container, resources state.State, registryBuilder image.RegistriesBuilder, opts ...Option, ) error
RunInstallerContainer performs an installation via the installer container.
func SyncMeta ¶ added in v1.13.10
SyncMeta writes the in-memory META to the META partition created by the installer.
The installer creates the META partition from scratch, so in-memory META values are lost unless they are explicitly flushed: e.g. the values seeded from `talos.environment=INSTALLER_META_BASE64=...` while the machine was running in maintenance mode, or any tag set at runtime via the META API.
Call ReloadMeta first to merge in the values the installer itself has written, otherwise they are overwritten by the in-memory contents.
Types ¶
type Option ¶
Option is a functional option.
func OptionsFromUpgradeRequest ¶
func OptionsFromUpgradeRequest(r runtime.Runtime, in *machineapi.UpgradeRequest) []Option
OptionsFromUpgradeRequest builds installer options from upgrade request.
func WithExtraKernelArgs ¶
WithExtraKernelArgs sets the extra args.
func WithGrubUseUKICmdline ¶ added in v1.14.0
WithGrubUseUKICmdline configures GRUB to use the kernel command line embedded in the UKI.
type Options ¶
type Options struct {
// Deprecated: Pull is not used in new Lifecycle API.
Pull bool
Force bool
Upgrade bool
Zero bool
GrubUseUKICmdline bool
ExtraKernelArgs []string
}
Options describes the install options.
func DefaultInstallOptions ¶
func DefaultInstallOptions() Options
DefaultInstallOptions returns default options.
func (*Options) Environment ¶ added in v1.14.0
Environment returns the installer environment derived from the options.