Skip to content

[CIEXE-2016] Migrate GitLab CI generators to pod-level resource variables#4019

Draft
henryvo117 wants to merge 3 commits into
masterfrom
worktree-synthetic-wiggling-alpaca
Draft

[CIEXE-2016] Migrate GitLab CI generators to pod-level resource variables#4019
henryvo117 wants to merge 3 commits into
masterfrom
worktree-synthetic-wiggling-alpaca

Conversation

@henryvo117

Copy link
Copy Markdown

Replace per-container KUBERNETES_CPU_*/KUBERNETES_MEMORY_*/KUBERNETES_HELPER_* variables with pod-level KUBERNETES_POD_* equivalents across the four GitLab CI generator files (generate-appsec.php, generate-package.php, generate-profiler.php, generate-tracer.php). Pod memory/CPU budgets are increased to cover service sidecar costs (test-agent, request-replayer, httpbin, elasticsearch, kafka, etc.) since with the pod-level feature flag those resources count against the pod request.

Notable decisions

  • Service container resource costs (test-agent, request-replayer, per-integration sidecars) are folded into the pod-level budget; KUBERNETES_SERVICE_* dead-code was removed from generate-common.php since the pod-level feature flag supersedes per-container overrides for scheduling.
  • Tracer web/integration jobs use a PHP loop to compute incremental CPU/memory per active integration (elasticsearch7 +1 CPU/2Gi, kafka +1 CPU/1Gi, etc.) rather than a static ceiling, keeping resource requests proportional to actual load.

Impact

For internal, CI jobs in dd-trace-php run under the pod-level resource model (ci.gitlab-runner.enable-pod-level-resources) instead of the deprecated per-container variables that the runner is phasing out.

henryvo117 and others added 2 commits June 26, 2026 16:52
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
KUBERNETES_SERVICE_* vars no longer apply when pod-level resources are
enabled. Add each service container's resource footprint to the
KUBERNETES_POD_* values for every job that runs sidecars.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jun 26, 2026

Copy link
Copy Markdown

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 1226 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-php | PHP language tests: [7.4, amd64, nts]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | PHP language tests: [7.4, amd64, zts]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | PHP language tests: [8.1, amd64, nts]   View in Datadog   GitLab

View all 1226 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog auto-retried 15 jobs - 0 passed on retry View in Datadog

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 54.11% (-0.00%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: c7147f9 | Docs | Datadog PR Page | Give us feedback!

… constraints

With ci.gitlab-runner.enable-pod-level-resources on, Kubernetes validates:
  pod_request >= sum(container_requests) and pod_limit >= each container_limit

Runner global defaults per service (no explicit KUBERNETES_SERVICE_*):
  request=2Gi, limit=6Gi  |  dind sidecar: request=50Gi, limit=50Gi

Changes:
- appsec dind jobs: 24-30Gi → 52Gi (covers 50Gi dind sidecar + helper)
- ASAN / test_extension_ci / xDebug (3 services): 5-6Gi → 7-9Gi
- PHP Language Tests ≥7.4: 8Gi → 10Gi (OOMKill headroom for helper+test-agent)
- PHP Language Tests <7.4: 5Gi → 6Gi (pod_limit ≥ 6Gi service limit)
- .cli_integration_test (3-4 services): 6Gi → 9Gi; loop adds 2Gi for web (mysql)
- test_auto_instrumentation/composer/integration/distributed_tracing: 7Gi → 9Gi
- .verify_job: pod_limit 5Gi → 6Gi (request-replayer has 6Gi limit)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant