Documentation ¶
Index ¶
- Constants
- func LoadConfig(path string, v *Config) error
- func V1DisabledFilter(list []string) plugin.DisableFilter
- func V2DisabledFilter(list []string) plugin.DisableFilter
- type BoltConfig
- type CgroupConfig
- type Config
- type Debug
- type GRPCConfig
- type MetricsConfig
- type ProxyPlugin
- type StreamProcessor
Constants ¶
const ( // SharingPolicyIsolated represents the "isolated" sharing policy SharingPolicyIsolated = "isolated" )SharingPolicyShared = "shared"
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
LoadConfig loads the containerd server config from the provided path
func V1DisabledFilter ¶ added in v1.3.0
func V1DisabledFilter(list []string) plugin.DisableFilter
V1DisabledFilter matches based on ID
func V2DisabledFilter ¶ added in v1.3.0
func V2DisabledFilter(list []string) plugin.DisableFilter
V2DisabledFilter matches based on URI
Types ¶
type BoltConfig ¶ added in v1.3.0
type BoltConfig struct { // ContentSharingPolicy sets the sharing policy for content between // namespaces. // // The default mode "shared" will make blobs available in all // namespaces once it is pulled into any namespace. The blob will be pulled // into the namespace if a writer is opened with the "Expected" digest that // is already present in the backend. // // The alternative mode, "isolated" requires that clients prove they have // access to the content by providing all of the content to the ingest // before the blob is added to the namespace. // // Both modes share backing data, while "shared" will reduce total // bandwidth across namespaces, at the cost of allowing access to any blob // just by knowing its digest. ContentSharingPolicy string `toml:"content_sharing_policy"` }
BoltConfig defines the configuration values for the bolt plugin, which is loaded here, rather than back registered in the metadata package.
func (*BoltConfig) Validate ¶ added in v1.3.0
func (bc *BoltConfig) Validate() error
Validate validates if BoltConfig is valid
type CgroupConfig ¶
type CgroupConfig struct {
Path string `toml:"path"`
}
CgroupConfig provides cgroup configuration
type Config ¶
type Config struct { // Version of the config file Version int `toml:"version"` // Root is the path to a directory where containerd will store persistent data Root string `toml:"root"` // State is the path to a directory where containerd will store transient data State string `toml:"state"` // PluginDir is the directory for dynamic plugins to be stored PluginDir string `toml:"plugin_dir"` // GRPC configuration settings GRPC GRPCConfig `toml:"grpc"` // Debug and profiling settings Debug Debug `toml:"debug"` // Metrics and monitoring settings Metrics MetricsConfig `toml:"metrics"` // DisabledPlugins are IDs of plugins to disable. Disabled plugins won't be // initialized and started. DisabledPlugins []string `toml:"disabled_plugins"` // RequiredPlugins are IDs of required plugins. Containerd exits if any // required plugin doesn't exist or fails to be initialized or started. RequiredPlugins []string `toml:"required_plugins"` // Plugins provides plugin specific configuration for the initialization of a plugin Plugins map[string]toml.Primitive `toml:"plugins"` // OOMScore adjust the containerd's oom score OOMScore int `toml:"oom_score"` // Cgroup specifies cgroup information for the containerd daemon process Cgroup CgroupConfig `toml:"cgroup"` // ProxyPlugins configures plugins which are communicated to over GRPC ProxyPlugins map[string]ProxyPlugin `toml:"proxy_plugins"` // Timeouts specified as a duration Timeouts map[string]string `toml:"timeouts"` StreamProcessors []StreamProcessor `toml:"stream_processors"` // contains filtered or unexported fields }
Config provides containerd configuration data for the server
func (*Config) Decode ¶
func (c *Config) Decode(p *plugin.Registration) (interface{}, error)
Decode unmarshals a plugin specific configuration by plugin id
func (*Config) GetVersion ¶ added in v1.3.0
GetVersion returns the config file's version
func (*Config) ValidateV2 ¶ added in v1.3.0
ValidateV2 validates the config for a v2 file
type Debug ¶
type Debug struct { Address string `toml:"address"` UID int `toml:"uid"` GID int `toml:"gid"` Level string `toml:"level"` }
Debug provides debug configuration
type GRPCConfig ¶
type GRPCConfig struct { Address string `toml:"address"` TCPAddress string `toml:"tcp_address"` TCPTLSCert string `toml:"tcp_tls_cert"` TCPTLSKey string `toml:"tcp_tls_key"` UID int `toml:"uid"` GID int `toml:"gid"` MaxRecvMsgSize int `toml:"max_recv_message_size"` MaxSendMsgSize int `toml:"max_send_message_size"` }
GRPCConfig provides GRPC configuration for the socket
type MetricsConfig ¶
type MetricsConfig struct { Address string `toml:"address"` GRPCHistogram bool `toml:"grpc_histogram"` }
MetricsConfig provides metrics configuration
type ProxyPlugin ¶
ProxyPlugin provides a proxy plugin configuration
type StreamProcessor ¶ added in v1.3.0
type StreamProcessor struct { // ID of the processor, also used to fetch the specific payload ID string `toml:"id"` // Accepts specific media-types Accepts []string `toml:"accepts"` // Returns the media-type Returns string `toml:"returns"` // Path or name of the binary Path string `toml:"path"` // Args to the binary Args []string `toml:"args"` }
StreamProcessor provides configuration for diff content processors