mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-02-22 06:43:41 +00:00
kata-deploy: Add microk8s support with dynamic version detection
Add microk8s case to get_containerd_paths() method and remove microk8s from RUNTIMES_WITHOUT_CONTAINERD_DROP_IN_SUPPORT to enable dynamic containerd version checking. Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
This commit is contained in:
@@ -391,6 +391,14 @@ impl Config {
|
||||
drop_in_file: "/etc/containerd/containerd.d/kata-deploy.toml".to_string(),
|
||||
use_drop_in,
|
||||
},
|
||||
"microk8s" => ContainerdPaths {
|
||||
// microk8s uses containerd-template.toml instead of config.toml
|
||||
config_file: "/etc/containerd/containerd-template.toml".to_string(),
|
||||
backup_file: "/etc/containerd/containerd-template.toml.bak".to_string(),
|
||||
imports_file: Some("/etc/containerd/containerd-template.toml".to_string()),
|
||||
drop_in_file: self.containerd_drop_in_conf_file.clone(),
|
||||
use_drop_in,
|
||||
},
|
||||
"k3s" | "k3s-agent" | "rke2-agent" | "rke2-server" => ContainerdPaths {
|
||||
// k3s/rke2 generates config.toml from config.toml.tmpl on each restart
|
||||
// We must modify the template file so our changes persist
|
||||
|
||||
@@ -30,7 +30,6 @@ const RUNTIMES_WITHOUT_CONTAINERD_DROP_IN_SUPPORT: &[&str] = &[
|
||||
"crio",
|
||||
"k0s-worker",
|
||||
"k0s-controller",
|
||||
"microk8s",
|
||||
];
|
||||
|
||||
fn is_containerd_based(runtime: &str) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user