Serge Logvinov d8602025c8 chore: update containerd config version 2
* Rename key cri -> io.containerd.grpc.v1.cri
* Disable plugins aufs,zfs,devmapper,btrfs (less warning messages on
  boot time)

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2021-07-01 09:08:54 -07:00

54 lines
1.5 KiB
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package containerd
// Mirror represents a registry mirror.
type Mirror struct {
Endpoints []string `toml:"endpoint"`
}
// AuthConfig represents the registry auth options.
type AuthConfig struct {
Username string `toml:"username"`
Password string `toml:"password"`
Auth string `toml:"auth"`
IdentityToken string `toml:"identitytoken"`
}
// TLSConfig represents the registry TLS options.
type TLSConfig struct {
InsecureSkipVerify bool `toml:"insecure_skip_verify"`
CAFile string `toml:"ca_file"`
CertFile string `toml:"cert_file"`
KeyFile string `toml:"key_file"`
}
// RegistryConfig represents a registry.
type RegistryConfig struct {
Auth *AuthConfig `toml:"auth"`
TLS *TLSConfig `toml:"tls"`
}
// Registry represents the registry configuration.
type Registry struct {
Mirrors map[string]Mirror `toml:"mirrors"`
Configs map[string]RegistryConfig `toml:"configs"`
}
// CRIConfig represents the CRI config.
type CRIConfig struct {
Registry Registry `toml:"registry"`
}
// PluginsConfig represents the CRI plugins config.
type PluginsConfig struct {
CRI CRIConfig `toml:"io.containerd.grpc.v1.cri"`
}
// Config represnts the containerd config.
type Config struct {
Plugins PluginsConfig `toml:"plugins"`
}