Skip to content

Commit

Permalink
node-installer: add required containerd plugin configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Aug 9, 2024
1 parent 58c3fa9 commit 03a81b3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nodeinstaller/node-installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ func patchContainerdConfig(runtimeHandler, basePath, configPath string, platform
case platforms.K3sQEMUTDX, platforms.K3sQEMUSNP, platforms.RKE2QEMUTDX:
snapshotterName = fmt.Sprintf("nydus-%s", runtimeHandler)
socketName = fmt.Sprintf("/run/containerd/containerd-nydus-grpc-%s.sock", runtimeHandler)

// Configure the containerd plugin
containerdPlugin := ensureMapPath(&existing.Plugins, constants.CRIFQDN, "containerd")
containerdPlugin["discard_unpacked_layers"] = false
containerdPlugin["disable_snapshot_annotations"] = false
}

// Add the snapshotter proxy plugin.
Expand Down
1 change: 1 addition & 0 deletions nodeinstaller/testdata/expected-bare-metal-qemu-snp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ conf_template = '/etc/containerd/kubenet_template.conf'
[plugins.'io.containerd.grpc.v1.cri'.containerd]
default_runtime_name = 'runc'
disable_snapshot_annotations = false
discard_unpacked_layers = false

[plugins.'io.containerd.grpc.v1.cri'.containerd.runtimes]
[plugins.'io.containerd.grpc.v1.cri'.containerd.runtimes.kata]
Expand Down
1 change: 1 addition & 0 deletions nodeinstaller/testdata/expected-bare-metal-qemu-tdx.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ conf_template = '/etc/containerd/kubenet_template.conf'
[plugins.'io.containerd.grpc.v1.cri'.containerd]
default_runtime_name = 'runc'
disable_snapshot_annotations = false
discard_unpacked_layers = false

[plugins.'io.containerd.grpc.v1.cri'.containerd.runtimes]
[plugins.'io.containerd.grpc.v1.cri'.containerd.runtimes.kata]
Expand Down

0 comments on commit 03a81b3

Please sign in to comment.