Skip to content

Commit

Permalink
feat: set runtime type to io.containerd.runc.v2
Browse files Browse the repository at this point in the history
Since our runtime is runc, we should set the runtime_type in the plugin
config to io.containerd.runc.v2 so the containerd feature detection
works properly. The shim binary can be set using the runtime_path
option.
  • Loading branch information
ctrox committed Jun 1, 2024
1 parent aa4fc58 commit cf14cda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/installer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ network-lock skip
`
runtimeConfig = `
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.zeropod]
runtime_type = "io.containerd.zeropod.v2"
runtime_type = "io.containerd.runc.v2"
runtime_path = "%s/bin/containerd-shim-zeropod-v2"
pod_annotations = [
"zeropod.ctrox.dev/ports-map",
"zeropod.ctrox.dev/container-names",
Expand Down Expand Up @@ -253,7 +254,7 @@ func configureContainerd(runtime containerRuntime, containerdConfig string) (res
return false, err
}

if _, err := cfg.WriteString(runtimeConfig); err != nil {
if _, err := cfg.WriteString(fmt.Sprintf(runtimeConfig, *hostOptPath)); err != nil {
return false, err
}

Expand Down

0 comments on commit cf14cda

Please sign in to comment.