extensions

package
v1.5.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package extensions provides function to manage system extensions.

Package extensions provides function to manage system extensions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extension

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

Extension represents unpacked extension in the filesystem.

func GenerateKernelModuleDependencyTreeExtension added in v1.4.0

func GenerateKernelModuleDependencyTreeExtension(extensionsPathWithKernelModules []string, arch string) (*Extension, error)

GenerateKernelModuleDependencyTreeExtension generates a kernel module dependency tree extension. nolint:gocyclo

func List

func List(rootPath string) ([]*Extension, error)

List prepared unpacked extensions under rootPath.

func Load

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

Load extension from the filesystem.

This performs initial validation of the extension file structure.

func (*Extension) Compress

func (ext *Extension) Compress(squashPath, initramfsPath string) (string, error)

Compress builds the squashfs image in the specified destination folder.

Components which should be placed to the initramfs are moved to the initramfsPath.

func (*Extension) KernelModuleDirectory added in v1.4.0

func (ext *Extension) KernelModuleDirectory() string

KernelModuleDirectory returns the path to the kernel modules directory.

func (*Extension) ProvidesKernelModules added in v1.4.0

func (ext *Extension) ProvidesKernelModules() bool

ProvidesKernelModules returns true if the extension provides kernel modules.

func (*Extension) Validate

func (ext *Extension) Validate() error

Validate the extension: compatibility, contents, etc.

type Puller

type Puller struct {
	// contains filtered or unexported fields
}

Puller pulls, unpacks and mounts extensions images.

func NewPuller

func NewPuller(client *containerd.Client) (*Puller, error)

NewPuller creates a new instance of system extensions puller helper.

func (*Puller) Cleanup

func (puller *Puller) Cleanup(ctx context.Context) error

Cleanup the temporary stuff created by the puller process.

func (*Puller) PullAndMount

func (puller *Puller) PullAndMount(ctx context.Context, registryConfig config.Registries, extensions []config.Extension) error

PullAndMount pulls the system extension images, unpacks them and mounts under well known path (constants.SystemExtensionsPath).

Jump to

Keyboard shortcuts

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