extensions

package
v1.9.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package extensions contains Talos extensions specific API.

Index

Constants

This section is empty.

Variables

View Source
var AllowedPaths = []string{
	"/etc/cri/conf.d",
	"/lib/firmware",
	"/lib/modules",

	"/lib64/ld-linux-x86-64.so.2",

	"/sbin/ldconfig",
	"/usr/etc/udev/rules.d",
	"/usr/local",

	"/usr/share/glvnd",
	"/usr/share/egl",
	"/etc/vulkan",
}

AllowedPaths lists paths allowed in the extension images.

Functions

This section is empty.

Types

type Compatibility

type Compatibility struct {
	Talos Constraint `yaml:"talos" protobuf:"1"`
}

Compatibility describes extension compatibility.

type Config

type Config struct {
	Layers []*Layer `yaml:"layers"`
}

Config specifies Talos installer extensions configuration.

func (*Config) Read

func (cfg *Config) Read(path string) error

Read extensions config from a file.

func (*Config) Write

func (cfg *Config) Write(path string) error

Write extensions config to a file.

type Constraint

type Constraint struct {
	Version string `yaml:"version" protobuf:"1"`
}

Constraint describes compatibility constraint.

type Extension added in v1.8.0

type Extension struct {
	Manifest Manifest
	// contains filtered or unexported fields
}

Extension represents unpacked extension in the filesystem.

func Load added in v1.8.0

func Load(path string) (*Extension, error)

Load extension from the filesystem.

This performs initial validation of the extension file structure.

func New added in v1.8.0

func New(rootfsPath, directory string, manifest Manifest) *Extension

New creates a new extension from the rootfs path, directory name and manifest.

func (*Extension) Directory added in v1.8.0

func (ext *Extension) Directory() string

Directory returns the directory name of the extension.

func (*Extension) RootfsPath added in v1.8.0

func (ext *Extension) RootfsPath() string

RootfsPath returns the path to the rootfs directory.

func (*Extension) Validate added in v1.8.0

func (ext *Extension) Validate() error

Validate the extension: compatibility, contents, etc.

type Layer

type Layer struct {
	Image    string   `yaml:"image" protobuf:"1"`
	Metadata Metadata `yaml:"metadata" protobuf:"2"`
}

Layer defines overlay mount layer.

func (Layer) DeepCopy

func (o Layer) DeepCopy() Layer

DeepCopy generates a deep copy of Layer.

type Manifest

type Manifest struct {
	Version  string   `yaml:"version"`
	Metadata Metadata `yaml:"metadata"`
}

Manifest is the structure of the extension manifest.yaml file.

type Metadata

type Metadata struct {
	Name          string        `yaml:"name" protobuf:"1"`
	Version       string        `yaml:"version" protobuf:"2"`
	Author        string        `yaml:"author" protobuf:"3"`
	Description   string        `yaml:"description" protobuf:"4"`
	Compatibility Compatibility `yaml:"compatibility" protobuf:"5"`
	ExtraInfo     string        `yaml:"extraInfo,omitempty" protobuf:"6"`
}

Metadata describes base extension metadata.

Directories

Path Synopsis
Package services contains definitions for non-system services.
Package services contains definitions for non-system services.

Jump to

Keyboard shortcuts

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