From 292a50d47882b54c42467e8c787292dbbfb54f89 Mon Sep 17 00:00:00 2001 From: Dima Prediger Date: Tue, 30 Jun 2026 17:47:37 +0200 Subject: [PATCH 1/2] ci: use pod-level Kubernetes resource variables Replace per-container KUBERNETES_CPU_REQUEST / KUBERNETES_MEMORY_* with pod-level KUBERNETES_POD_* vars in both tier_m and tier_l anchors. Two native-image Gradle builds are updated to read the renamed env var for CPU parallelism sizing. Behavior changes: - Resources now budget the full pod (build + helper + init containers share a single quota) instead of only the build container, reducing the effective per-job cluster footprint. - KUBERNETES_POD_CPU_LIMIT added (no CPU limit existed before); jobs lose burst headroom in exchange for tighter scheduling isolation. Tier_m: 6 CPU / 16Gi. Tier_l: 10 CPU / 20Gi. Feature flag ci.gitlab-runner.enable-pod-level-resources (rule v3) must be enabled for this repo before merging to master. Draft PR opened for pod-spec validation on the flag-enabled branch first. Refs: CIEXE-2021, CIEXE-2150 --- .gitlab-ci.yml | 14 ++++++++------ .../quarkus-native/application/build.gradle | 2 +- .../application/build.gradle | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c089ef9fab2..f865839a19c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -175,18 +175,20 @@ default: GRADLE_WORKERS: 4 GRADLE_MEMORY_MIN: 1G GRADLE_MEMORY_MAX: 5G - KUBERNETES_CPU_REQUEST: 6 - KUBERNETES_MEMORY_REQUEST: 16Gi - KUBERNETES_MEMORY_LIMIT: 16Gi + KUBERNETES_POD_CPU_REQUEST: 6 + KUBERNETES_POD_CPU_LIMIT: 6 + KUBERNETES_POD_MEMORY_REQUEST: 16Gi + KUBERNETES_POD_MEMORY_LIMIT: 16Gi .tier_l: variables: &tier_l_variables GRADLE_WORKERS: 6 GRADLE_MEMORY_MIN: 1G GRADLE_MEMORY_MAX: 6G - KUBERNETES_CPU_REQUEST: 10 - KUBERNETES_MEMORY_REQUEST: 20Gi - KUBERNETES_MEMORY_LIMIT: 20Gi + KUBERNETES_POD_CPU_REQUEST: 10 + KUBERNETES_POD_CPU_LIMIT: 10 + KUBERNETES_POD_MEMORY_REQUEST: 20Gi + KUBERNETES_POD_MEMORY_LIMIT: 20Gi .gitlab_base_ref_params: &gitlab_base_ref_params - | diff --git a/dd-smoke-tests/quarkus-native/application/build.gradle b/dd-smoke-tests/quarkus-native/application/build.gradle index 65beb08e810..63373c9a51c 100644 --- a/dd-smoke-tests/quarkus-native/application/build.gradle +++ b/dd-smoke-tests/quarkus-native/application/build.gradle @@ -17,7 +17,7 @@ version = "" // Avoid unlimited CPU usage on CI. def isCI = providers.environmentVariable("CI").isPresent() -def ciBuildCpuCount = providers.environmentVariable("KUBERNETES_CPU_REQUEST").getOrElse("4") +def ciBuildCpuCount = providers.environmentVariable("KUBERNETES_POD_CPU_REQUEST").getOrElse("4") dependencies { implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") diff --git a/dd-smoke-tests/spring-boot-3.0-native/application/build.gradle b/dd-smoke-tests/spring-boot-3.0-native/application/build.gradle index 08545cf1e16..8500a245453 100644 --- a/dd-smoke-tests/spring-boot-3.0-native/application/build.gradle +++ b/dd-smoke-tests/spring-boot-3.0-native/application/build.gradle @@ -15,7 +15,7 @@ ext.withProfiler = hasProperty('profiler') // Avoid unlimited CPU usage on CI. def isCI = providers.environmentVariable("CI").isPresent() -def ciBuildCpuCount = providers.environmentVariable("KUBERNETES_CPU_REQUEST").getOrElse("4") +def ciBuildCpuCount = providers.environmentVariable("KUBERNETES_POD_CPU_REQUEST").getOrElse("4") if (hasProperty('appBuildDir')) { buildDir = property('appBuildDir') From dfb8bc9a0aefeff034c764598634bc1eda7ee12d Mon Sep 17 00:00:00 2001 From: Dima Prediger Date: Thu, 2 Jul 2026 11:31:17 +0200 Subject: [PATCH 2/2] ci: quote pod-level resource variable values Runner requires string type for KUBERNETES_POD_* vars. Match exact format used in reference PR924. --- .gitlab-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f865839a19c..a5f27e5940b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -175,20 +175,20 @@ default: GRADLE_WORKERS: 4 GRADLE_MEMORY_MIN: 1G GRADLE_MEMORY_MAX: 5G - KUBERNETES_POD_CPU_REQUEST: 6 - KUBERNETES_POD_CPU_LIMIT: 6 - KUBERNETES_POD_MEMORY_REQUEST: 16Gi - KUBERNETES_POD_MEMORY_LIMIT: 16Gi + KUBERNETES_POD_CPU_REQUEST: "6" + KUBERNETES_POD_CPU_LIMIT: "6" + KUBERNETES_POD_MEMORY_REQUEST: "16Gi" + KUBERNETES_POD_MEMORY_LIMIT: "16Gi" .tier_l: variables: &tier_l_variables GRADLE_WORKERS: 6 GRADLE_MEMORY_MIN: 1G GRADLE_MEMORY_MAX: 6G - KUBERNETES_POD_CPU_REQUEST: 10 - KUBERNETES_POD_CPU_LIMIT: 10 - KUBERNETES_POD_MEMORY_REQUEST: 20Gi - KUBERNETES_POD_MEMORY_LIMIT: 20Gi + KUBERNETES_POD_CPU_REQUEST: "10" + KUBERNETES_POD_CPU_LIMIT: "10" + KUBERNETES_POD_MEMORY_REQUEST: "20Gi" + KUBERNETES_POD_MEMORY_LIMIT: "20Gi" .gitlab_base_ref_params: &gitlab_base_ref_params - |