schematic

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MPL-2.0 Imports: 5 Imported by: 4

Documentation

Overview

Package schematic provides a data model for requested image schematic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Customization

type Customization struct {
	// Extra kernel arguments to be passed to the kernel.
	ExtraKernelArgs []string `yaml:"extraKernelArgs,omitempty"`
	// Meta provides initial META contents for the image.
	Meta []MetaValue `yaml:"meta,omitempty"`
	// SystemExtensions represents the Talos system extensions to be installed.
	SystemExtensions SystemExtensions `yaml:"systemExtensions,omitempty"`
}

Customization represents the Talos image customization.

type InvalidErrorTag

type InvalidErrorTag struct{}

InvalidErrorTag is a tag for invalid schematic errors.

type MetaValue

type MetaValue struct {
	// Key is the META key.
	Key uint8 `yaml:"key"`
	// Value is the META value.
	Value string `yaml:"value"`
}

MetaValue provides initial META contents for the image.

type Overlay added in v0.3.0

type Overlay struct {
	Image   string         `yaml:"image"`
	Name    string         `yaml:"name"`
	Options map[string]any `yaml:"options,omitempty"`
}

Overlay represents the overlay options for image generation.

type Schematic

type Schematic struct {
	// Overlay represents the overlay options for image generation.
	Overlay Overlay `yaml:"overlay,omitempty"`
	// Customization represents the Talos image customization.
	Customization Customization `yaml:"customization"`
}

Schematic represents the requested image customization.

func Unmarshal

func Unmarshal(data []byte) (*Schematic, error)

Unmarshal the schematic from text representation.

func (*Schematic) ID

func (cfg *Schematic) ID() (string, error)

ID returns the identifier of the schematic.

ID is stable (does not change if the schematic is same). ID matches sha256 hash of the canonical representation of the schematic.

func (*Schematic) Marshal

func (cfg *Schematic) Marshal() ([]byte, error)

Marshal the schematic to text representation.

Marshal result should be stable if new schematic fields are added.

type SystemExtensions

type SystemExtensions struct {
	// OfficialExtensions represents the Talos official system extensions to be installed.
	//
	// The image factory will pick up automatically the version compatible with Talos version.
	OfficialExtensions []string `yaml:"officialExtensions,omitempty"`
}

SystemExtensions represents the Talos system extensions to be installed.

Jump to

Keyboard shortcuts

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