Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Files is a list of files to download.
Files []File `json:"files"`
// QemuExtraKernelParams is an additional set of kernel parameters to pass kernels started with QEMU.
QemuExtraKernelParams string `json:"QemuExtraKernelParams"`
// DebugRuntime enables the debug mode of the runtime.
// This only works if the igvm file has shell access enabled
// and has no effect on production images.
DebugRuntime bool `json:"debugRuntime"`
}
Config is the configuration for the node-installer.
type ContainerdConfig ¶
type ContainerdConfig 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,omitempty"`
// State is the path to a directory where containerd will store transient data
State string `toml:"state,omitempty"`
// TempDir is the path to a directory where to place containerd temporary files
TempDir string `toml:"temp,omitempty"`
// PluginDir is the directory for dynamic plugins to be stored
PluginDir string `toml:"plugin_dir,omitempty"`
// GRPC configuration settings
GRPC any `toml:"grpc,omitempty"`
// TTRPC configuration settings
TTRPC any `toml:"ttrpc,omitempty"`
// Debug and profiling settings
Debug Debug `toml:"debug,omitempty"`
// Metrics and monitoring settings
Metrics any `toml:"metrics,omitempty"`
// DisabledPlugins are IDs of plugins to disable. Disabled plugins won't be
// initialized and started.
DisabledPlugins []string `toml:"disabled_plugins,omitempty"`
// 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,omitempty"`
// Plugins provides plugin specific configuration for the initialization of a plugin
Plugins map[string]any `toml:"plugins,omitempty"`
// OOMScore adjust the containerd's oom score
OOMScore int `toml:"oom_score,omitempty"`
// Cgroup specifies cgroup information for the containerd daemon process
Cgroup any `toml:"cgroup,omitempty"`
// ProxyPlugins configures plugins which are communicated to over GRPC
ProxyPlugins map[string]ProxyPlugin `toml:"proxy_plugins,omitempty"`
// Timeouts specified as a duration
Timeouts map[string]string `toml:"timeouts,omitempty"`
// Imports are additional file path list to config files that can overwrite main config file fields
Imports []string `toml:"imports,omitempty"`
// StreamProcessors configuration
StreamProcessors map[string]any `toml:"stream_processors,omitempty"`
}
ContainerdConfig provides containerd configuration data. This is a simplified version of the actual struct. Source: https://github.com/containerd/containerd/blob/dcf2847247e18caba8dce86522029642f60fe96b/services/server/config/config.go#L35
type Debug ¶ added in v1.1.0
type Debug struct {
Address string `toml:"address,omitempty"`
UID int `toml:"uid,omitempty"`
GID int `toml:"gid,omitempty"`
Level string `toml:"level,omitempty"`
// Format represents the logging format. Supported values are 'text' and 'json'.
Format string `toml:"format,omitempty"`
}
Debug provides debug configuration.
type File ¶
type File struct {
// URL is the URL to fetch the file from.
URL string `json:"url"`
// Path is the absolute path (on the host) to save the file to.
Path string `json:"path"`
// Executable is true if the file should be executable.
Executable bool `json:"executable"`
// Integrity is the content subresource integrity (expected hash) of the file. Required if the file is downloaded.
// The format of a subresource integrity string is defined here:
// https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
Integrity string `json:"integrity"`
}
File is a file to download.
type Hypervisor ¶
Hypervisor is the configuration for the hypervisor.
type KataRuntime ¶
KataRuntime is the configuration for the Kata runtime.
type KataRuntimeConfig ¶
type KataRuntimeConfig struct {
Hypervisor map[string]Hypervisor
Agent map[string]Agent
Image Image
Factory Factory
Runtime KataRuntime
}
KataRuntimeConfig is the configuration for the Kata runtime. Source: https://github.com/kata-containers/kata-containers/blob/4029d154ba0c26fcf4a8f9371275f802e3ef522c/src/runtime/pkg/katautils/config.go This is a simplified version of the actual configuration.
type ProxyPlugin ¶
ProxyPlugin provides a proxy plugin configuration.
type Runtime ¶
type Runtime struct {
// Type is the runtime type to use in containerd e.g. io.containerd.runtime.v1.linux
Type string `toml:"runtime_type" json:"runtimeType"`
// Path is an optional field that can be used to overwrite path to a shim runtime binary.
// When specified, containerd will ignore runtime name field when resolving shim location.
// Path must be abs.
Path string `toml:"runtime_path,omitempty" json:"runtimePath,omitempty"`
// PodAnnotations is a list of pod annotations passed to both pod sandbox as well as
// container OCI annotations.
PodAnnotations []string `toml:"pod_annotations" json:"PodAnnotations"`
// ContainerAnnotations is a list of container annotations passed through to the OCI config of the containers.
// Container annotations in CRI are usually generated by other Kubernetes node components (i.e., not users).
// Currently, only device plugins populate the annotations.
ContainerAnnotations []string `toml:"container_annotations,omitempty" json:"ContainerAnnotations,omitempty"`
// Options are config options for the runtime.
Options map[string]interface{} `toml:"options,omitempty" json:"options,omitempty"`
// PrivilegedWithoutHostDevices overloads the default behaviour for adding host devices to the
// runtime spec when the container is privileged. Defaults to false.
PrivilegedWithoutHostDevices bool `toml:"privileged_without_host_devices,omitempty" json:"privileged_without_host_devices,omitempty"`
// PrivilegedWithoutHostDevicesAllDevicesAllowed overloads the default behaviour device allowlisting when
// to the runtime spec when the container when PrivilegedWithoutHostDevices is already enabled. Requires
// PrivilegedWithoutHostDevices to be enabled. Defaults to false.
PrivilegedWithoutHostDevicesAllDevicesAllowed bool `` /* 137-byte string literal not displayed */
// BaseRuntimeSpec is a json file with OCI spec to use as base spec that all container's will be created from.
BaseRuntimeSpec string `toml:"base_runtime_spec,omitempty" json:"baseRuntimeSpec,omitempty"`
// NetworkPluginConfDir is a directory containing the CNI network information for the runtime class.
NetworkPluginConfDir string `toml:"cni_conf_dir,omitempty" json:"cniConfDir,omitempty"`
// NetworkPluginMaxConfNum is the max number of plugin config files that will
// be loaded from the cni config directory by go-cni. Set the value to 0 to
// load all config files (no arbitrary limit). The legacy default value is 1.
NetworkPluginMaxConfNum int `toml:"cni_max_conf_num,omitempty" json:"cniMaxConfNum,omitempty"`
// Snapshotter setting snapshotter at runtime level instead of making it as a global configuration.
// An example use case is to use devmapper or other snapshotters in Kata containers for performance and security
// while using default snapshotters for operational simplicity.
// See https://github.com/containerd/containerd/issues/6657 for details.
Snapshotter string `toml:"snapshotter,omitempty" json:"snapshotter,omitempty"`
// Sandboxer defines which sandbox runtime to use when scheduling pods
// This features requires the new CRI server implementation (enabled by default in 2.0)
// shim - means use whatever Controller implementation provided by shim (e.g. use RemoteController).
// podsandbox - means use Controller implementation from sbserver podsandbox package.
Sandboxer string `toml:"sandboxer,omitempty" json:"sandboxer,omitempty"`
}
Runtime defines a containerd runtime.