Skip to content

Commit 2fe358f

Browse files
committed
enable test handler for containerd runtime
1 parent b427cc0 commit 2fe358f

File tree

7 files changed

+14
-0
lines changed

7 files changed

+14
-0
lines changed

nodeup/pkg/model/containerd.go

+3
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,9 @@ func (b *ContainerdBuilder) buildContainerdConfig() (string, error) {
492492
if containerd.SeLinuxEnabled {
493493
config.SetPath([]string{"plugins", "io.containerd.grpc.v1.cri", "enable_selinux"}, true)
494494
}
495+
if containerd.TestHandlerEnabled {
496+
config.SetPath([]string{"plugins", "io.containerd.grpc.v1.cri", "containerd", "runtimes", "test-handler", "runtime_type"}, "io.containerd.runc.v2")
497+
}
495498
if b.NodeupConfig.KubeletConfig.PodInfraContainerImage != "" {
496499
config.SetPath([]string{"plugins", "io.containerd.grpc.v1.cri", "sandbox_image"}, b.NodeupConfig.KubeletConfig.PodInfraContainerImage)
497500
}

pkg/apis/kops/containerdconfig.go

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ type ContainerdConfig struct {
5151
SeLinuxEnabled bool `json:"selinuxEnabled,omitempty"`
5252
// NRI configures the Node Resource Interface.
5353
NRI *NRIConfig `json:"nri,omitempty"`
54+
// TestHandlerEnabled enables a runtime called test-handler, specific to k/k e2e tests
55+
TestHandlerEnabled bool `json:"testHandlerEnabled,omitempty"`
5456
}
5557

5658
type NRIConfig struct {

pkg/apis/kops/v1alpha2/containerdconfig.go

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ type ContainerdConfig struct {
4646
SeLinuxEnabled bool `json:"selinuxEnabled,omitempty"`
4747
// NRI configures the Node Resource Interface.
4848
NRI *NRIConfig `json:"nri,omitempty"`
49+
// TestHandlerEnabled enables a runtime called test-handler, specific to k/k e2e tests
50+
TestHandlerEnabled bool `json:"testHandlerEnabled,omitempty"`
4951
}
5052

5153
type NRIConfig struct {

pkg/apis/kops/v1alpha2/zz_generated.conversion.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha3/containerdconfig.go

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ type ContainerdConfig struct {
4646
SeLinuxEnabled bool `json:"selinuxEnabled,omitempty"`
4747
// NRI configures the Node Resource Interface.
4848
NRI *NRIConfig `json:"nri,omitempty"`
49+
// TestHandlerEnabled enables a runtime called test-handler, specific to k/k e2e tests
50+
TestHandlerEnabled bool `json:"testHandlerEnabled,omitempty"`
4951
}
5052

5153
type NRIConfig struct {

pkg/apis/kops/v1alpha3/zz_generated.conversion.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/e2e/kubetest2-kops/deployer/up.go

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ func (d *deployer) createCluster(zones []string, adminAccess string, yes bool) e
118118
"--kubernetes-version", d.KubernetesVersion,
119119
"--ssh-public-key", d.SSHPublicKeyPath,
120120
"--set", "cluster.spec.nodePortAccess=0.0.0.0/0",
121+
"--set", "spec.containerd.testHandlerEnabled=true",
121122
}
122123
if yes {
123124
args = append(args, "--yes")

0 commit comments

Comments
 (0)