Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/kubernetes/test_range_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/testcluster/objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 12 additions & 0 deletions test/kubernetes/testcluster/testcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) {
Expand Down
Loading