containerd

package
v1.2.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 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 added in v1.0.0

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 added in v0.7.0

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 added in v0.7.0

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

CRIConfig represents the CRI config.

type Config added in v0.7.0

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

Config represnts the containerd config.

type HostToml added in v1.0.0

type HostToml struct {
	Capabilities []string    `toml:"capabilities,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 added in v1.0.0

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 added in v1.0.0

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

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

type HostsDirectory added in v1.0.0

type HostsDirectory struct {
	Files []*HostsFile
}

HostsDirectory describes a single directory for a specific registry.

type HostsFile added in v1.0.0

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 added in v1.0.0

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 added in v0.7.0

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

PluginsConfig represents the CRI plugins config.

type Registry added in v0.7.0

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

Registry represents the registry configuration.

type RegistryConfig added in v0.7.0

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