Skip to content

Commit 3c02076

Browse files
authored
Merge pull request #35425 from pohly/dra-node-tests
DRA node job update for 1.35
2 parents 216325f + d20e917 commit 3c02076

File tree

5 files changed

+607
-46
lines changed

5 files changed

+607
-46
lines changed

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

Lines changed: 193 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,135 @@ presubmits:
517517
cpu: 2
518518
memory: 6Gi
519519

520+
- name: pull-kubernetes-kind-dra-n-3-canary
521+
cluster: eks-prow-build-cluster
522+
skip_branches:
523+
- release-\d+\.\d+ # per-release image
524+
always_run: false
525+
optional: true
526+
labels:
527+
preset-service-account: "true"
528+
preset-dind-enabled: "true"
529+
preset-kind-volume-mounts: "true"
530+
annotations:
531+
testgrid-dashboards: sig-node-dynamic-resource-allocation, sig-node-presubmits
532+
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 - 3" release.
533+
testgrid-alert-email: [email protected], [email protected]
534+
decorate: true
535+
decoration_config:
536+
timeout: 90m
537+
path_alias: k8s.io/kubernetes
538+
spec:
539+
containers:
540+
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250815-171060767f-master
541+
command:
542+
- runner.sh
543+
args:
544+
- /bin/bash
545+
- -xce
546+
- |
547+
set -o pipefail
548+
# A presubmit job uses the checked out and merged source code.
549+
revision=$(git describe --tags)
550+
kind_yaml_cmd=(cat test/e2e/dra/kind.yaml)
551+
kind_node_source=.
552+
features=( )
553+
make WHAT="github.com/onsi/ginkgo/v2/ginkgo k8s.io/kubernetes/test/e2e/e2e.test"
554+
ginkgo=_output/bin/ginkgo
555+
e2e_test=_output/bin/e2e.test
556+
# The latest kind is assumed to work also for older release branches, should this job get forked.
557+
curl --fail --silent --show-error --location https://kind.sigs.k8s.io/dl/latest/linux-amd64.tgz | tar xvfz - -C "${PATH%%:*}/" kind
558+
kind build node-image --image=dra/node:latest "${kind_node_source}"
559+
GINKGO_E2E_PID=
560+
trap 'if [ "${GINKGO_E2E_PID}" ]; then kill -TERM "${GINKGO_E2E_PID}"; fi' TERM
561+
trap 'if [ "${GINKGO_E2E_PID}" ]; then kill -INT "${GINKGO_E2E_PID}"; fi' INT
562+
# The final kind.yaml the result of getting the original kind.yaml, manipulating it with sed,
563+
# and adding something at the end.
564+
(
565+
${kind_yaml_cmd[@]}
566+
567+
# Additional features are not in kind.yaml, but they can be added at the end.
568+
for feature in ${features[@]}; do echo " ${feature}: true"; done
569+
570+
# Append ClusterConfiguration which causes etcd to use /tmp
571+
# (https://github.com/kubernetes-sigs/kind/issues/845#issuecomment-1261248420).
572+
# There's no kubeadmConfigPatches in any kind.yaml, so we can append at the end.
573+
cat <<EOF
574+
kubeadmConfigPatches:
575+
- |
576+
kind: ClusterConfiguration
577+
etcd:
578+
local:
579+
dataDir: /tmp/etcd
580+
EOF
581+
) >/tmp/kind.yaml
582+
cat /tmp/kind.yaml
583+
kind create cluster --retain --config /tmp/kind.yaml --image dra/node:latest
584+
atexit () {
585+
kind export logs "${ARTIFACTS}/kind"
586+
kind delete cluster
587+
}
588+
trap atexit EXIT
589+
590+
# Replace the kubelet binary and restart it, as in https://gist.github.com/aojea/2c94034f8e86d08842e5916231eb3fe1
591+
# and https://github.com/kubernetes/test-infra/blob/9cccc25265537e8dfa556688cf10754622014424/experiment/compatibility-versions/emulated-version-upgrade.sh#L56-L66.
592+
major=$(echo "$revision" | sed -e 's/^v\([0-9]*\).*/\1/')
593+
minor=$(echo "$revision" | sed -e 's/^v[0-9]*\.\([0-9]*\).*/\1/')
594+
previous_minor=$((minor - 3))
595+
# Test with the stable release to avoid breaking presubmits because of unrelated issues in a release candidate.
596+
# Ask curl to append the HTTP status code after the response body (-w ' %{http_code}').
597+
# Then parse the output using Bash parameter expansion:
598+
# ${response% *} → everything before the last space (the body)
599+
# ${response##* } → everything after the last space (the HTTP code)
600+
response=$(curl --silent -w ' %{http_code}' -L "https://dl.k8s.io/release/stable-$major.$previous_minor.txt" )
601+
previous="${response% *}"
602+
status="${response##* }"
603+
if [ "$status" == 404 ] ; then
604+
# if stable doesn't exist - use latest
605+
response=$(curl --silent -w ' %{http_code}' -L "https://dl.k8s.io/release/latest-$major.$previous_minor.txt" )
606+
previous="${response% *}"
607+
status="${response##* }"
608+
fi
609+
if [ "$status" -ne 200 ] ; then
610+
echo "error: unable to get release $major.$previous_minor info, HTTP status: $status, response: $previous"
611+
exit 1
612+
fi
613+
curl --silent -L "https://dl.k8s.io/release/$previous/kubernetes-server-linux-amd64.tar.gz" | tar zxOf - kubernetes/server/bin/kubelet >/tmp/kubelet
614+
chmod a+rx /tmp/kubelet
615+
/tmp/kubelet --version
616+
worker_nodes=$(kind get nodes | grep worker)
617+
for n in $worker_nodes; do
618+
docker cp /tmp/kubelet $n:/usr/bin/kubelet
619+
docker exec $n systemctl restart kubelet
620+
done
621+
622+
# We need support for disabling tests which need a recent kubelet.
623+
# If a test is labeled with `KubeletMinVersion:1.34`, then it cannot run
624+
# when the deployed kubelet is 1.32. This is enforced by
625+
# generating `! KubeletMinVersion: containsAny { 1.33, 1.34 }`, i.e.
626+
# including all unsupportd kubelet versions in a deny list.
627+
kubelet_label_filter=" && ! KubeletMinVersion: containsAny { $( for v in $(seq $((previous_minor + 1)) $((minor - 1))); do echo "1.$v, "; done)1.$minor }"
628+
629+
# Running tests which only cover control plane behavior are not useful
630+
# in a kubelet version skew job. We can filter them out by including
631+
# only tests which have the DynamicResourceAllocation feature because
632+
# only those cover kubelet behavior.
633+
kubelet_label_filter+=" && Feature: containsAny DynamicResourceAllocation"
634+
635+
KUBECONFIG=${HOME}/.kube/config ${ginkgo} run --nodes=8 --timeout=24h --silence-skips --force-newlines --no-color --label-filter="DRA && Feature: isSubsetOf { OffByDefault, DynamicResourceAllocation } && !FeatureGate:ResourceHealthStatus$kubelet_label_filter && !Alpha && !Flaky && !Slow" ${e2e_test} -- -provider=local -report-dir="${ARTIFACTS}" -report-complete-ginkgo -report-complete-junit &
636+
GINKGO_E2E_PID=$!
637+
wait "${GINKGO_E2E_PID}"
638+
# docker-in-docker needs privileged mode
639+
securityContext:
640+
privileged: true
641+
resources:
642+
limits:
643+
cpu: 2
644+
memory: 6Gi
645+
requests:
646+
cpu: 2
647+
memory: 6Gi
648+
520649
- name: pull-kubernetes-dra-integration-canary
521650
cluster: eks-prow-build-cluster
522651
skip_branches:
@@ -575,7 +704,7 @@ presubmits:
575704
preset-k8s-ssh: "true"
576705
annotations:
577706
testgrid-dashboards: sig-node-dynamic-resource-allocation, sig-node-presubmits, sig-node-cri-o
578-
description: Runs E2E node tests for Dynamic Resource Allocation beta features with CRI-O using cgroup v1
707+
description: Runs E2E node tests for Dynamic Resource Allocation on-by-default features with CRI-O using cgroup v1
579708
testgrid-alert-email: [email protected], [email protected]
580709
decorate: true
581710
decoration_config:
@@ -599,10 +728,10 @@ presubmits:
599728
- --repo-root=.
600729
- --gcp-zone=us-central1-b
601730
- --parallelism=1
602-
- '--label-filter=DRA && Feature: isSubsetOf { OffByDefault, DynamicResourceAllocation } && !FeatureGate:ResourceHealthStatus && !Flaky && !Slow'
731+
- '--label-filter=DRA && Feature: isSubsetOf { DynamicResourceAllocation } && !Flaky && !Slow'
603732
- --timeout=60m
604733
- --skip-regex= # Override kubetest2 default in https://github.com/kubernetes-sigs/kubetest2/blob/9f385d26316f5256755bb8fe333970aa5759ec7f/pkg/testers/node/node.go#L92
605-
- '--test-args=--feature-gates="DynamicResourceAllocation=true" --service-feature-gates="DynamicResourceAllocation=true" --container-runtime-endpoint=unix:///var/run/crio/crio.sock --container-runtime-process-name=/usr/local/bin/crio --container-runtime-pid-file= --kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/crio.service --kubelet-cgroups=/system.slice/kubelet.service" --extra-log="{\"name\": \"crio.log\", \"journalctl\": [\"-u\", \"crio\"]}"'
734+
- '--test-args=--container-runtime-endpoint=unix:///var/run/crio/crio.sock --container-runtime-process-name=/usr/local/bin/crio --container-runtime-pid-file= --kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/crio.service --kubelet-cgroups=/system.slice/kubelet.service" --extra-log="{\"name\": \"crio.log\", \"journalctl\": [\"-u\", \"crio\"]}"'
606735
- --image-config-file=/home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/crio/latest/image-config-cgroupv1.yaml
607736
env:
608737
- name: IGNITION_INJECT_GCE_SSH_PUBLIC_KEY_FILE
@@ -631,7 +760,7 @@ presubmits:
631760
preset-k8s-ssh: "true"
632761
annotations:
633762
testgrid-dashboards: sig-node-dynamic-resource-allocation, sig-node-presubmits, sig-node-cri-o
634-
description: Runs E2E node tests for Dynamic Resource Allocation beta features with CRI-O using cgroup v2
763+
description: Runs E2E node tests for Dynamic Resource Allocation on-by-default features with CRI-O using cgroup v2
635764
testgrid-alert-email: [email protected], [email protected]
636765
decorate: true
637766
decoration_config:
@@ -655,10 +784,10 @@ presubmits:
655784
- --repo-root=.
656785
- --gcp-zone=us-central1-b
657786
- --parallelism=1
658-
- '--label-filter=DRA && Feature: isSubsetOf { OffByDefault, DynamicResourceAllocation } && !FeatureGate:ResourceHealthStatus && !Flaky && !Slow'
787+
- '--label-filter=DRA && Feature: isSubsetOf { DynamicResourceAllocation } && !Flaky && !Slow'
659788
- --timeout=60m
660789
- --skip-regex= # Override kubetest2 default in https://github.com/kubernetes-sigs/kubetest2/blob/9f385d26316f5256755bb8fe333970aa5759ec7f/pkg/testers/node/node.go#L92
661-
- '--test-args=--feature-gates="DynamicResourceAllocation=true" --service-feature-gates="DynamicResourceAllocation=true" --container-runtime-endpoint=unix:///var/run/crio/crio.sock --container-runtime-process-name=/usr/local/bin/crio --container-runtime-pid-file= --kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/crio.service --kubelet-cgroups=/system.slice/kubelet.service" --extra-log="{\"name\": \"crio.log\", \"journalctl\": [\"-u\", \"crio\"]}"'
790+
- '--test-args=--container-runtime-endpoint=unix:///var/run/crio/crio.sock --container-runtime-process-name=/usr/local/bin/crio --container-runtime-pid-file= --kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/crio.service --kubelet-cgroups=/system.slice/kubelet.service" --extra-log="{\"name\": \"crio.log\", \"journalctl\": [\"-u\", \"crio\"]}"'
662791
- --image-config-file=/home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/crio/latest/image-config-cgroupv2.yaml
663792
env:
664793
- name: IGNITION_INJECT_GCE_SSH_PUBLIC_KEY_FILE
@@ -687,7 +816,7 @@ presubmits:
687816
preset-k8s-ssh: "true"
688817
annotations:
689818
testgrid-dashboards: sig-node-dynamic-resource-allocation, sig-node-presubmits, sig-node-containerd
690-
description: Runs E2E node tests for Dynamic Resource Allocation beta features with containerd 1.7
819+
description: Runs E2E node tests for Dynamic Resource Allocation on-by-default features with containerd 1.7
691820
testgrid-alert-email: [email protected], [email protected]
692821
decorate: true
693822
decoration_config:
@@ -711,10 +840,10 @@ presubmits:
711840
- --repo-root=.
712841
- --gcp-zone=us-central1-b
713842
- --parallelism=1
714-
- '--label-filter=DRA && Feature: isSubsetOf { OffByDefault, DynamicResourceAllocation } && !FeatureGate:ResourceHealthStatus && !Flaky && !Slow'
843+
- '--label-filter=DRA && Feature: isSubsetOf { DynamicResourceAllocation } && !Flaky && !Slow'
715844
- --timeout=60m
716845
- --skip-regex= # Override kubetest2 default in https://github.com/kubernetes-sigs/kubetest2/blob/9f385d26316f5256755bb8fe333970aa5759ec7f/pkg/testers/node/node.go#L92
717-
- '--test-args=--feature-gates="DynamicResourceAllocation=true" --service-feature-gates="DynamicResourceAllocation=true" --container-runtime-endpoint=unix:///var/run/containerd/containerd.sock --container-runtime-process-name=/usr/local/bin/containerd --container-runtime-pid-file= --kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/containerd.service --kubelet-cgroups=/system.slice/kubelet.service" --extra-log="{\"name\": \"containerd.log\", \"journalctl\": [\"-u\", \"containerd\"]}"'
846+
- '--test-args=--container-runtime-endpoint=unix:///var/run/containerd/containerd.sock --container-runtime-process-name=/usr/local/bin/containerd --container-runtime-pid-file= --kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/containerd.service --kubelet-cgroups=/system.slice/kubelet.service" --extra-log="{\"name\": \"containerd.log\", \"journalctl\": [\"-u\", \"containerd\"]}"'
718847
- --image-config-file=/home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/dra/image-config-containerd-1.7.yaml
719848
resources:
720849
limits:
@@ -736,7 +865,59 @@ presubmits:
736865
preset-k8s-ssh: "true"
737866
annotations:
738867
testgrid-dashboards: sig-node-dynamic-resource-allocation, sig-node-presubmits, sig-node-containerd
739-
description: Runs E2E node tests for Dynamic Resource Allocation beta features with containerd 2.0
868+
description: Runs E2E node tests for Dynamic Resource Allocation on-by-default features with containerd 2.0
869+
testgrid-alert-email: [email protected], [email protected]
870+
decorate: true
871+
decoration_config:
872+
timeout: 90m
873+
path_alias: k8s.io/kubernetes
874+
extra_refs:
875+
- org: kubernetes
876+
repo: test-infra
877+
base_ref: master
878+
path_alias: k8s.io/test-infra
879+
- org: containerd
880+
repo: containerd
881+
base_ref: release/2.0
882+
spec:
883+
containers:
884+
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250815-171060767f-master
885+
command:
886+
- runner.sh
887+
args:
888+
- kubetest2
889+
- noop
890+
- --test=node
891+
- --
892+
- --repo-root=.
893+
- --gcp-zone=us-central1-b
894+
- --parallelism=1
895+
- '--label-filter=DRA && Feature: isSubsetOf { DynamicResourceAllocation } && !Flaky && !Slow'
896+
- --timeout=60m
897+
- --skip-regex= # Override kubetest2 default in https://github.com/kubernetes-sigs/kubetest2/blob/9f385d26316f5256755bb8fe333970aa5759ec7f/pkg/testers/node/node.go#L92
898+
- '--test-args=--container-runtime-endpoint=unix:///var/run/containerd/containerd.sock --container-runtime-process-name=/usr/local/bin/containerd --container-runtime-pid-file= --kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/containerd.service --kubelet-cgroups=/system.slice/kubelet.service" --extra-log="{\"name\": \"containerd.log\", \"journalctl\": [\"-u\", \"containerd\"]}"'
899+
- --image-config-file=/home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/containerd/containerd-release-2.0/image-config.yaml
900+
resources:
901+
limits:
902+
cpu: 2
903+
memory: 6Gi
904+
requests:
905+
cpu: 2
906+
memory: 6Gi
907+
908+
- name: pull-kubernetes-node-e2e-containerd-2-0-dra-alpha-beta-features-canary
909+
cluster: k8s-infra-prow-build
910+
skip_branches:
911+
- release-\d+\.\d+ # per-release image
912+
always_run: false
913+
optional: true
914+
skip_report: false
915+
labels:
916+
preset-service-account: "true"
917+
preset-k8s-ssh: "true"
918+
annotations:
919+
testgrid-dashboards: sig-node-dynamic-resource-allocation, sig-node-presubmits, sig-node-containerd
920+
description: Runs all E2E node tests for Dynamic Resource Allocation features with containerd 2.0 and with all feature gates enabled (including non-DRA feature gates)
740921
testgrid-alert-email: [email protected], [email protected]
741922
decorate: true
742923
decoration_config:
@@ -763,10 +944,10 @@ presubmits:
763944
- --repo-root=.
764945
- --gcp-zone=us-central1-b
765946
- --parallelism=1
766-
- '--label-filter=DRA && Feature: isSubsetOf { OffByDefault, DynamicResourceAllocation } && !FeatureGate:ResourceHealthStatus && !Flaky && !Slow'
947+
- '--label-filter=DRA && Feature: isSubsetOf { OffByDefault,DynamicResourceAllocation } && !Flaky && !Slow'
767948
- --timeout=60m
768949
- --skip-regex= # Override kubetest2 default in https://github.com/kubernetes-sigs/kubetest2/blob/9f385d26316f5256755bb8fe333970aa5759ec7f/pkg/testers/node/node.go#L92
769-
- '--test-args=--feature-gates="DynamicResourceAllocation=true" --service-feature-gates="DynamicResourceAllocation=true" --container-runtime-endpoint=unix:///var/run/containerd/containerd.sock --container-runtime-process-name=/usr/local/bin/containerd --container-runtime-pid-file= --kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/containerd.service --kubelet-cgroups=/system.slice/kubelet.service" --extra-log="{\"name\": \"containerd.log\", \"journalctl\": [\"-u\", \"containerd\"]}"'
950+
- '--test-args=--feature-gates="AllBeta=true,AllAlpha=true" --service-feature-gates="AllBeta=true,AllAlpha=true" --container-runtime-endpoint=unix:///var/run/containerd/containerd.sock --container-runtime-process-name=/usr/local/bin/containerd --container-runtime-pid-file= --kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/containerd.service --kubelet-cgroups=/system.slice/kubelet.service" --extra-log="{\"name\": \"containerd.log\", \"journalctl\": [\"-u\", \"containerd\"]}"'
770951
- --image-config-file=/home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/containerd/containerd-release-2.0/image-config.yaml
771952
resources:
772953
limits:

0 commit comments

Comments
 (0)