Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGRPCFlags ¶
AddGRPCFlags add flags for grpc connection.
func PrintDefaultTomlConfig ¶
func PrintDefaultTomlConfig()
PrintDefaultTomlConfig print default toml config of cri-containerd.
Types ¶
type CRIContainerdOptions ¶
type CRIContainerdOptions struct { // Config contains cri-containerd toml config Config // Path to the TOML config file. ConfigFilePath string `toml:"-"` }
CRIContainerdOptions contains cri-containerd command line and toml options.
func NewCRIContainerdOptions ¶
func NewCRIContainerdOptions() *CRIContainerdOptions
NewCRIContainerdOptions returns a reference to CRIContainerdOptions
func (*CRIContainerdOptions) AddFlags ¶
func (c *CRIContainerdOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds cri-containerd command line options to pflag.
func (*CRIContainerdOptions) InitFlags ¶
func (c *CRIContainerdOptions) InitFlags(fs *pflag.FlagSet) error
InitFlags load configurations from config file, and then overwrite with flags. This function must be called inside `Run`, at that time flags should have been parsed once. precedence: commandline > configfile > default
type CniConfig ¶
type CniConfig struct { // NetworkPluginBinDir is the directory in which the binaries for the plugin is kept. NetworkPluginBinDir string `toml:"bin_dir"` // NetworkPluginConfDir is the directory in which the admin places a CNI conf. NetworkPluginConfDir string `toml:"conf_dir"` }
CniConfig contains config related to cni
type Config ¶
type Config struct { // ContainerdConfig contains config related to containerd ContainerdConfig `toml:"containerd"` // CniConfig contains config related to cni CniConfig `toml:"cni"` // SocketPath is the path to the socket which cri-containerd serves on. SocketPath string `toml:"socket_path"` // RootDir is the root directory path for managing cri-containerd files // (metadata checkpoint etc.) RootDir string `toml:"root_dir"` // StreamServerAddress is the ip address streaming server is listening on. StreamServerAddress string `toml:"stream_server_address"` // StreamServerPort is the port streaming server is listening on. StreamServerPort string `toml:"stream_server_port"` // CgroupPath is the path for the cgroup that cri-containerd is placed in. CgroupPath string `toml:"cgroup_path"` // EnableSelinux indicates to enable the selinux support. EnableSelinux bool `toml:"enable_selinux"` // SandboxImage is the image used by sandbox container. SandboxImage string `toml:"sandbox_image"` // StatsCollectPeriod is the period (in seconds) of snapshots stats collection. StatsCollectPeriod int `toml:"stats_collect_period"` // SystemdCgroup enables systemd cgroup support. SystemdCgroup bool `toml:"systemd_cgroup"` // OOMScore adjust the cri-containerd's oom score OOMScore int `toml:"oom_score"` }
Config contains cri-containerd toml config
type ContainerdConfig ¶
type ContainerdConfig struct { // RootDir is the root directory path for containerd. RootDir string `toml:"root_dir"` // Snapshotter is the snapshotter used by containerd. Snapshotter string `toml:"snapshotter"` // Endpoint is the containerd endpoint path. Endpoint string `toml:"endpoint"` // Runtime is the runtime to use in containerd. We may support // other runtimes in the future. Runtime string `toml:"runtime"` // RuntimeEngine is the name of the runtime engine used by containerd. // Containerd default should be "runc" // We may support other runtime engines in the future. RuntimeEngine string `toml:"runtime_engine"` // RuntimeRoot is the directory used by containerd for runtime state. // Containerd default should be "/run/containerd/runc" RuntimeRoot string `toml:"runtime_root"` }
ContainerdConfig contains config related to containerd