From 274e70a0ce8d9ed66a197eb47bb0e6665d0235d4 Mon Sep 17 00:00:00 2001 From: Guilhem Charles Date: Fri, 1 Nov 2024 10:57:48 +0100 Subject: [PATCH 1/3] ci: remove deprecated KUBERNETES_SERVICE_ACCOUNT_OVERWRITE --- .gitlab-ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 51993fbc..3b96ac78 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,6 @@ test-and-build-arm64: variables: KUBERNETES_MEMORY_REQUEST: 6Gi KUBERNETES_MEMORY_LIMIT: 12Gi - KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: $CI_PROJECT_NAME DD_SITE: datadoghq.com tags: - arch:arm64 @@ -49,7 +48,6 @@ test-and-build-amd64: variables: KUBERNETES_MEMORY_REQUEST: 6Gi KUBERNETES_MEMORY_LIMIT: 12Gi - KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: $CI_PROJECT_NAME DD_SITE: datadoghq.com tags: - arch:amd64 @@ -64,7 +62,6 @@ trigger_internal_image: strategy: depend variables: DD_IMAGES_BRANCH: master - KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: images IMAGE_VERSION: current IMAGE_NAME: datadog-static-analyzer RELEASE_TAG: ${CI_COMMIT_SHORT_SHA} From 08167d9f4b688f38c87ee1446736f0a17c3afcd3 Mon Sep 17 00:00:00 2001 From: Guilhem Charles Date: Fri, 1 Nov 2024 10:58:09 +0100 Subject: [PATCH 2/3] ci: replace deprecated use of ECR with internal registry --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3b96ac78..75f2a6ef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ubuntu:22.04 +image: registry.ddbuild.io/ubuntu:22.04 stages: - test From 27fcfdbd9aa694b1ca0db53aacb67409f13f3b78 Mon Sep 17 00:00:00 2001 From: Guilhem Charles Date: Fri, 1 Nov 2024 10:59:29 +0100 Subject: [PATCH 3/3] ci: configure static CPUs for CI jobs --- .gitlab-ci.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 75f2a6ef..4cca5a00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,26 @@ stages: - test - release +.jobs-resource-allocation: + variables: + # Sized resources using https://app.datadoghq.com/dashboard/xff-wqx-4a2/ci-reliability-kubernetes-runner-sizing-and-diagnotic + KUBERNETES_CPU_REQUEST: "6" + KUBERNETES_CPU_LIMIT: "6" + KUBERNETES_MEMORY_REQUEST: "12Gi" + KUBERNETES_MEMORY_LIMIT: "12Gi" + # Using non-integer CPU requests/limits to avoid the static CPU policy to be set on the helper container. + # Static CPU policy reserves full CPU cores for containers with integer requests. It is used to isolate + # CI job containers from each other and prevent noisy ones to starve resources on a CI node. + # By using non-integer CPU request and limits for the helper container, responsible for cloning, + # we can leverage multi-cores to speed-up git clones while preserving isolation for the build container. + KUBERNETES_HELPER_CPU_REQUEST: "200m" + KUBERNETES_HELPER_CPU_LIMIT: "200m" + KUBERNETES_HELPER_MEMORY_REQUEST: "1Gi" + KUBERNETES_HELPER_MEMORY_LIMIT: "1Gi" + test-and-build-arm64: + extends: + - .jobs-resource-allocation stage: test script: - apt-get update @@ -22,13 +41,13 @@ test-and-build-arm64: - python3 misc/test-rules.py -c $PWD/target/release/datadog-static-analyzer -s $PWD/target/release/datadog-static-analyzer-server -l csharp - python3 misc/test-rules.py -c $PWD/target/release/datadog-static-analyzer -s $PWD/target/release/datadog-static-analyzer-server -l python variables: - KUBERNETES_MEMORY_REQUEST: 6Gi - KUBERNETES_MEMORY_LIMIT: 12Gi DD_SITE: datadoghq.com tags: - arch:arm64 test-and-build-amd64: + extends: + - .jobs-resource-allocation stage: test script: - apt-get update @@ -46,8 +65,6 @@ test-and-build-amd64: - python3 misc/test-rules.py -c $PWD/target/release/datadog-static-analyzer -s $PWD/target/release/datadog-static-analyzer-server -l csharp - python3 misc/test-rules.py -c $PWD/target/release/datadog-static-analyzer -s $PWD/target/release/datadog-static-analyzer-server -l python variables: - KUBERNETES_MEMORY_REQUEST: 6Gi - KUBERNETES_MEMORY_LIMIT: 12Gi DD_SITE: datadoghq.com tags: - arch:amd64