diff --git a/config/jobs/kubernetes/sig-node/dra-canary.yaml b/config/jobs/kubernetes/sig-node/dra-canary.yaml index 29301463cf36..6ff43fbef3eb 100644 --- a/config/jobs/kubernetes/sig-node/dra-canary.yaml +++ b/config/jobs/kubernetes/sig-node/dra-canary.yaml @@ -267,7 +267,7 @@ presubmits: preset-k8s-ssh: "true" annotations: testgrid-dashboards: sig-node-dynamic-resource-allocation, sig-node-presubmits, sig-node-containerd - description: Runs E2E node tests for Dynamic Resource Allocation beta features with containerd + description: Runs E2E node tests for Dynamic Resource Allocation beta features with containerd 1.7 testgrid-alert-email: eduard.bartosh@intel.com, patrick.ohly@intel.com decorate: true decoration_config: @@ -303,3 +303,52 @@ presubmits: requests: cpu: 2 memory: 6Gi + + - name: pull-kubernetes-node-e2e-containerd-2-0-dra-canary + cluster: k8s-infra-prow-build + skip_branches: + - release-\d+\.\d+ # per-release image + always_run: false + optional: true + skip_report: false + labels: + preset-service-account: "true" + preset-k8s-ssh: "true" + annotations: + testgrid-dashboards: sig-node-dynamic-resource-allocation, sig-node-presubmits, sig-node-containerd + description: Runs E2E node tests for Dynamic Resource Allocation beta features with containerd 2.0 + testgrid-alert-email: eduard.bartosh@intel.com, patrick.ohly@intel.com + decorate: true + decoration_config: + timeout: 90m + path_alias: k8s.io/kubernetes + extra_refs: + - org: kubernetes + repo: test-infra + base_ref: master + path_alias: k8s.io/test-infra + spec: + containers: + - image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250212-16f67660c2-master + command: + - runner.sh + args: + - kubetest2 + - noop + - --test=node + - -- + - --repo-root=. + - --gcp-zone=us-west1-b + - --parallelism=1 + - '--label-filter=Feature: containsAny DynamicResourceAllocation && Feature: isSubsetOf { Beta, DynamicResourceAllocation } && !Flaky && !Slow' + - --timeout=60m + - --skip-regex= # Override kubetest2 default in https://github.com/kubernetes-sigs/kubetest2/blob/9f385d26316f5256755bb8fe333970aa5759ec7f/pkg/testers/node/node.go#L92 + - '--test-args=--feature-gates="DynamicResourceAllocation=true" --service-feature-gates="DynamicResourceAllocation=true" --runtime-config=api/beta=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\"]}"' + - --image-config-file=/home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/containerd/containerd-release-2.0/image-config.yaml + resources: + limits: + cpu: 2 + memory: 6Gi + requests: + cpu: 2 + memory: 6Gi diff --git a/config/jobs/kubernetes/sig-node/dra-ci.yaml b/config/jobs/kubernetes/sig-node/dra-ci.yaml index 0bc35b930f96..e374f723927f 100644 --- a/config/jobs/kubernetes/sig-node/dra-ci.yaml +++ b/config/jobs/kubernetes/sig-node/dra-ci.yaml @@ -283,7 +283,7 @@ periodics: preset-k8s-ssh: "true" annotations: testgrid-dashboards: sig-node-dynamic-resource-allocation, sig-node-containerd, sig-release-master-informing - description: Runs E2E node tests for Dynamic Resource Allocation beta features with containerd + description: Runs E2E node tests for Dynamic Resource Allocation beta features with containerd 1.7 testgrid-alert-email: eduard.bartosh@intel.com, patrick.ohly@intel.com fork-per-release: "true" fork-per-release-periodic-interval: 24h diff --git a/config/jobs/kubernetes/sig-node/dra-presubmit.yaml b/config/jobs/kubernetes/sig-node/dra-presubmit.yaml index 00f9a08a02ca..1bb6a06978fc 100644 --- a/config/jobs/kubernetes/sig-node/dra-presubmit.yaml +++ b/config/jobs/kubernetes/sig-node/dra-presubmit.yaml @@ -274,7 +274,7 @@ presubmits: preset-k8s-ssh: "true" annotations: testgrid-dashboards: sig-node-dynamic-resource-allocation, sig-node-presubmits, sig-node-containerd - description: Runs E2E node tests for Dynamic Resource Allocation beta features with containerd + description: Runs E2E node tests for Dynamic Resource Allocation beta features with containerd 1.7 testgrid-alert-email: eduard.bartosh@intel.com, patrick.ohly@intel.com fork-per-release: "true" decorate: true diff --git a/config/jobs/kubernetes/sig-node/dra.generate.conf b/config/jobs/kubernetes/sig-node/dra.generate.conf index e48512dc24df..1b53222e1da0 100644 --- a/config/jobs/kubernetes/sig-node/dra.generate.conf +++ b/config/jobs/kubernetes/sig-node/dra.generate.conf @@ -59,5 +59,12 @@ inject_ssh_public_key = true # This job runs the same tests as ci-node-e2e-crio-dra with Containerd 1.7 runtime [node-e2e-containerd-1-7-dra] job_type = node -description = Runs E2E node tests for Dynamic Resource Allocation beta features with containerd +description = Runs E2E node tests for Dynamic Resource Allocation beta features with containerd 1.7 image_config_file = /home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/dra/image-config-containerd-1.7.yaml + +# This job runs the same tests as ci-node-e2e-crio-dra with Containerd 2.0 runtime +[node-e2e-containerd-2-0-dra] +generate = canary +job_type = node +description = Runs E2E node tests for Dynamic Resource Allocation beta features with containerd 2.0 +image_config_file = /home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/containerd/containerd-release-2.0/image-config.yaml diff --git a/hack/generate-jobs.py b/hack/generate-jobs.py index 231e81dfc707..cbad37b3897a 100755 --- a/hack/generate-jobs.py +++ b/hack/generate-jobs.py @@ -50,7 +50,7 @@ def generate_one(path: pathlib.Path, verify: bool) -> typing.List[str]: Generate job configuration files from one template. Return list of errors. """ - config = configparser.ConfigParser() + config = configparser.ConfigParser(inline_comment_prefixes=["#"]) config.read_file(path.open()) template_name = config.get("DEFAULT", "template") @@ -58,8 +58,10 @@ def generate_one(path: pathlib.Path, verify: bool) -> typing.List[str]: errors = [] with template_path.open() as inp: template = jinja2.Template(inp.read(), lstrip_blocks=True) - pairs = config.get("DEFAULT", "files").split(",") - for name, job in (pair.split(":") for pair in pairs): + jobs = dict( + item.split(":") for item in config.get("DEFAULT", "files").split(",") + ) + for name, job in jobs.items(): tmp = tempfile.NamedTemporaryFile( "w", prefix=f"{template_name}.", @@ -71,6 +73,22 @@ def generate_one(path: pathlib.Path, verify: bool) -> typing.List[str]: f"Instead, modify {template_name} and run `make generate-jobs`.\n" ) for section in config.sections(): + # generate job types if they're mentioned in + # the `generate` section key or if the key is not set + gen = config[section].get("generate") + if gen is not None: + gen_jobs = gen.split(",") + # validate job types mentioned in the `generate` section key + for gen_job in gen_jobs: + if gen_job and gen_job not in jobs: + errors.append( + f"Can't generate {name} job {section}: " + f"unknown job type: {gen_job}" + ) + # skip job types not mentioned in the `generate` section key + if name not in gen_jobs: + continue + tmp.write( template.render( config[section],