containerd

package
v1.4.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package containerd provides support for containerd CRI plugin

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCRIConfig

func GenerateCRIConfig(r config.Registries) ([]byte, error)

GenerateCRIConfig returns a part of CRI config for registry auth.

Once containerd supports different way of supplying auth info, this should be updated.

Types

type AuthConfig

type AuthConfig struct {
	Username      string `toml:"username"`
	Password      string `toml:"password"`
	Auth          string `toml:"auth"`
	IdentityToken string `toml:"identitytoken"`
}

AuthConfig represents the registry auth options.

type CRIConfig

type CRIConfig struct {
	Registry Registry `toml:"registry"`
}

CRIConfig represents the CRI config.

type Config

type Config struct {
	Plugins PluginsConfig `toml:"plugins"`
}

Config represnts the containerd config.

type HostToml

type HostToml struct {
	Capabilities []string    `toml:"capabilities,omitempty"`
	OverridePath bool        `toml:"override_path,omitempty"`
	CACert       string      `toml:"ca,omitempty"`
	Client       [][2]string `toml:"client,omitempty"`
	SkipVerify   bool        `toml:"skip_verify,omitempty"`
}

HostToml is a single entry in `hosts.toml`.

type HostsConfig

type HostsConfig struct {
	Directories map[string]*HostsDirectory
}

HostsConfig describes layout of registry configuration in "hosts" format.

See: https://github.com/containerd/containerd/blob/main/docs/hosts.md

func GenerateHosts

func GenerateHosts(cfg config.Registries, basePath string) (*HostsConfig, error)

GenerateHosts generates a structure describing contents of the containerd hosts configuration.

type HostsDirectory

type HostsDirectory struct {
	Files []*HostsFile
}

HostsDirectory describes a single directory for a specific registry.

type HostsFile

type HostsFile struct {
	Name     string
	Contents []byte
	Mode     os.FileMode
}

HostsFile describes a single file configuring registry.

This might be `hosts.toml` or a specific certificate.

type HostsToml

type HostsToml struct {
	Server      string               `toml:"server,omitempty"`
	HostConfigs map[string]*HostToml `toml:"host"`
}

HostsToml describes the contents of the `hosts.toml` file.

type PluginsConfig

type PluginsConfig struct {
	CRI CRIConfig `toml:"io.containerd.grpc.v1.cri"`
}

PluginsConfig represents the CRI plugins config.

type Registry

type Registry struct {
	ConfigPath string                    `toml:"config_path"`
	Configs    map[string]RegistryConfig `toml:"configs"`
}

Registry represents the registry configuration.

type RegistryConfig

type RegistryConfig struct {
	Auth *AuthConfig `toml:"auth"`
}

RegistryConfig represents a registry.

Jump to

Keyboard shortcuts

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