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
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.