profile

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package profile implements handling of Talos profiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(p *profile.Profile)

Clean removes non-deterministic fields from the profile.

This code is not in Talos, as the cleaning process is specific to the Image Factory.

func EnhanceFromSchematic

func EnhanceFromSchematic(
	ctx context.Context,
	prof profile.Profile,
	schematic *schematicpkg.Schematic,
	artifactProducer ArtifactProducer,
	secureBootService *secureboot.Service,
	versionTag string,
) (profile.Profile, error)

EnhanceFromSchematic enhances the profile with the schematic.

func Hash

func Hash(p profile.Profile) (string, error)

Hash generates a hash describing Talos imager Profile.

Hash is used to determine if the profile has changed and the asset needs to be rebuilt.

Hashing is performed by checksumming YAML representation of the profile, but with some fields specifically trimmed/ignored to remove changes e.g. to the temporary directory.

func InstallerProfile

func InstallerProfile(secureboot bool, arch artifacts.Arch) profile.Profile

InstallerProfile returns a profile to be used for installer image.

func ParseFromPath

func ParseFromPath(path, version string) (profile.Profile, error)

ParseFromPath parses imager profile from the file path.

Types

type ArtifactProducer

type ArtifactProducer interface {
	GetSchematicExtension(context.Context, string, *schematicpkg.Schematic) (string, error)
	GetOfficialExtensions(context.Context, string) ([]artifacts.ExtensionRef, error)
	GetOfficialOverlays(context.Context, string) ([]artifacts.OverlayRef, error)
	GetExtensionImage(context.Context, artifacts.Arch, artifacts.ExtensionRef) (string, error)
	GetOverlayImage(context.Context, artifacts.Arch, artifacts.OverlayRef) (string, error)
	GetInstallerImage(context.Context, artifacts.Arch, string) (string, error)
}

ArtifactProducer is a type which produces a set of extensions/meta information, installer images, etc..

type InvalidErrorTag

type InvalidErrorTag struct{}

InvalidErrorTag tags errors related to invalid profiles.

Jump to

Keyboard shortcuts

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