diff --git a/test/kubernetes/test_range_config.proto b/test/kubernetes/test_range_config.proto index 6d13c1eae9..6fd39dd1d8 100644 --- a/test/kubernetes/test_range_config.proto +++ b/test/kubernetes/test_range_config.proto @@ -31,6 +31,10 @@ message TestRangeSpec { // user configuration. NodePool tertiary = 8; + // The default nodepool, not used for benchmarking at all but may be + // needed to be custom configured for cluster-wide compatibility reasons. + NodePool default_nodepool = 10; + // restore is an optional nodepool in the cluster, used as a restore target // for benchmarks involving pod snapshots. // If true, it will be configured in exactly the same way as the test_runtime diff --git a/test/kubernetes/testcluster/objects.go b/test/kubernetes/testcluster/objects.go index bef7569fda..19de4ffbbe 100644 --- a/test/kubernetes/testcluster/objects.go +++ b/test/kubernetes/testcluster/objects.go @@ -400,7 +400,7 @@ func (t RuntimeType) KataShimName() (string, error) { case RuntimeTypeNestedKataQEMU: return "kata-qemu", nil case RuntimeTypeNestedKataCloudHypervisor: - return "kata-cloud-hypervisor", nil + return "kata-clh", nil case RuntimeTypeNestedKataFirecracker: return "kata-fc", nil default: diff --git a/test/kubernetes/testcluster/testcluster.go b/test/kubernetes/testcluster/testcluster.go index a9baad122f..5806ecbe2c 100644 --- a/test/kubernetes/testcluster/testcluster.go +++ b/test/kubernetes/testcluster/testcluster.go @@ -69,6 +69,10 @@ type NodePoolType string // Nodepool names. const ( + // DefaultNodepoolName is the value that marks the default nodepool, which must exist + // in the cluster to house system components. + DefaultNodepoolName NodePoolType = "default-nodepool" + // TestRuntimeNodepoolName is the value that marks a "test-runtime-nodepool", or a nodepool where // w/ the runtime under test. TestRuntimeNodepoolName NodePoolType = "test-runtime-nodepool" @@ -293,6 +297,14 @@ func (t *TestCluster) OverrideTestNodepoolRuntime(testRuntime RuntimeType) { t.testNodepoolRuntimeOverride = testRuntime } +// Do executes a function with a Kubernetes client. +func (t *TestCluster) Do(ctx context.Context, fn func(ctx context.Context, client kubernetes.Interface) error) error { + _, err := request(ctx, t.client, func(ctx context.Context, client kubernetes.Interface) (bool, error) { + return true, fn(ctx, client) + }) + return err +} + // createNamespace creates a namespace. func (t *TestCluster) createNamespace(ctx context.Context, namespace *v13.Namespace) (*v13.Namespace, error) { return request(ctx, t.client, func(ctx context.Context, client kubernetes.Interface) (*v13.Namespace, error) {