Skip to content

Commit 29a8340

Browse files
committed
DRA canary: add integration test job
This is for upgrade/downgrade testing with kind. The goal is to define additional E2E tests in test/e2e/dra which depend on kind to bring up a cluster directly from the test.
1 parent 40369af commit 29a8340

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

config/jobs/kubernetes/sig-node/dra-canary.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,45 @@ presubmits:
387387
cpu: 2
388388
memory: 6Gi
389389

390+
- name: pull-kubernetes-dra-integration-canary
391+
cluster: eks-prow-build-cluster
392+
skip_branches:
393+
- release-\d+\.\d+ # per-release image
394+
always_run: false
395+
optional: true
396+
labels:
397+
preset-service-account: "true"
398+
preset-dind-enabled: "true"
399+
preset-kind-volume-mounts: "true"
400+
annotations:
401+
testgrid-dashboards: sig-node-dynamic-resource-allocation, sig-node-presubmits
402+
description: Runs integration tests for DRA which need some additional setup in the job.
403+
testgrid-alert-email: [email protected], [email protected]
404+
decorate: true
405+
decoration_config:
406+
timeout: 90m
407+
path_alias: k8s.io/kubernetes
408+
spec:
409+
containers:
410+
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250613-876fb90a97-master
411+
command:
412+
- runner.sh
413+
- /bin/bash
414+
- -xce
415+
- |
416+
# The latest kind is assumed to work also for older release branches, should this job get forked.
417+
curl --fail --silent --show-error --location https://kind.sigs.k8s.io/dl/latest/linux-amd64.tgz | tar xvfz - -C "${PATH%%:*}/" kind
418+
# "Normal" integration tests under test/integration/dra run in pull-kubernetes-integration.
419+
# The "more complex" ones with a dependency on kind are under test/e2e/dra, in a separate Ginkgo suite.
420+
make test WHAT="test/e2e/dra" KIND_COMMAND=kind KUBE_TIMEOUT=-timeout=30m KUBE_TEST_ARGS="-args -ginkgo.junit-report=${ARTIFACTS}/junit.xml"
421+
resources:
422+
limits:
423+
cpu: 2
424+
memory: 6Gi
425+
requests:
426+
cpu: 2
427+
memory: 6Gi
428+
390429
- name: pull-kubernetes-node-e2e-crio-cgrpv1-dra-canary
391430
cluster: k8s-infra-prow-build
392431
skip_branches:

config/jobs/kubernetes/sig-node/dra.generate.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ kubelet_skew = 0
2626
# on a kind cluster with containerd updated to a version with CDI support.
2727
[kind-dra]
2828
description = Runs E2E tests for Dynamic Resource Allocation beta features against a Kubernetes master cluster created with sigs.k8s.io/kind
29+
job_type = e2e
2930
use_dind = true
3031
cluster = eks-prow-build-cluster
3132
run_if_changed = /(dra|dynamicresources|resourceclaim|deviceclass|resourceslice|resourceclaimtemplate|dynamic-resource-allocation|pkg/apis/resource|api/resource)/.*.go
@@ -37,6 +38,7 @@ release_informing = true
3738
# Compared to ci-kind-dra, this one enables all DRA-related features.
3839
[kind-dra-all]
3940
description = Runs E2E tests for Dynamic Resource Allocation alpha and beta features against a Kubernetes master cluster created with sigs.k8s.io/kind
41+
job_type = e2e
4042
cluster = eks-prow-build-cluster
4143
all_features = true
4244
use_dind = true
@@ -47,6 +49,7 @@ run_if_changed = /(dra|dynamicresources|resourceclaim|deviceclass|resourceslice|
4749
# It enables and tests the same features as kind-dra.
4850
[kind-dra-n-1]
4951
description = Runs E2E tests for Dynamic Resource Allocation beta features against a Kubernetes master cluster created with sigs.k8s.io/kind with kubelet from the "current - 1" release.
52+
job_type = e2e
5053
use_dind = true
5154
cluster = eks-prow-build-cluster
5255
run_if_changed = /(dra|dynamicresources|resourceclaim|deviceclass|resourceslice|resourceclaimtemplate|dynamic-resource-allocation|pkg/apis/resource|api/resource)/.*.go
@@ -57,11 +60,23 @@ kubelet_skew = 1
5760
# It enables and tests the same features as kind-dra.
5861
[kind-dra-n-2]
5962
description = Runs E2E tests for Dynamic Resource Allocation beta features against a Kubernetes master cluster created with sigs.k8s.io/kind with kubelet from the "current - 2" release.
63+
job_type = e2e
6064
use_dind = true
6165
cluster = eks-prow-build-cluster
6266
run_if_changed = /(dra|dynamicresources|resourceclaim|deviceclass|resourceslice|resourceclaimtemplate|dynamic-resource-allocation|pkg/apis/resource|api/resource)/.*.go
6367
kubelet_skew = 2
6468

69+
# This executes long-running unit tests in test/e2e/dra.
70+
# They don't run in pull-kubernetes-unit or pull-kubernetes-integration
71+
# because they are too slow and depend on kind.
72+
[dra-integration]
73+
description = Runs integration tests for DRA which need some additional setup in the job.
74+
use_dind = true
75+
job_type = integration
76+
cluster = eks-prow-build-cluster
77+
run_if_changed = /(dra|dynamicresources|resourceclaim|deviceclass|resourceslice|resourceclaimtemplate|dynamic-resource-allocation|pkg/apis/resource|api/resource)/.*.go
78+
generate = canary
79+
6580
# This job runs e2e_node.test with a focus on tests for the Dynamic Resource Allocation feature (currently beta)
6681
[node-e2e-crio-cgrpv1-dra]
6782
job_type = node

config/jobs/kubernetes/sig-node/dra.jinja

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ presubmits:
8888
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250613-876fb90a97-master
8989
command:
9090
- runner.sh
91+
9192
{%- if job_type == "node" %}
9293
args:
9394
- kubetest2
@@ -111,7 +112,18 @@ presubmits:
111112
- name: KUBE_SSH_USER
112113
value: core
113114
{%- endif %}
114-
{%- else %}
115+
116+
{%- elif job_type == "integration" %}
117+
- /bin/bash
118+
- -xce
119+
- |
120+
# The latest kind is assumed to work also for older release branches, should this job get forked.
121+
curl --fail --silent --show-error --location https://kind.sigs.k8s.io/dl/latest/linux-amd64.tgz | tar xvfz - -C "${PATH%%:*}/" kind
122+
# "Normal" integration tests under test/integration/dra run in pull-kubernetes-integration.
123+
# The "more complex" ones with a dependency on kind are under test/e2e/dra, in a separate Ginkgo suite.
124+
make test WHAT="test/e2e/dra" KIND_COMMAND=kind KUBE_TIMEOUT=-timeout=30m KUBE_TEST_ARGS="-args -ginkgo.junit-report=${ARTIFACTS}/junit.xml"
125+
126+
{%- elif job_type == "e2e" %}
115127
args:
116128
- /bin/bash
117129
- -xce

0 commit comments

Comments
 (0)