Skip to content

[codex] Use pod-level CI resource variables#924

Merged
henryvo117 merged 2 commits into
mainfrom
luu.vo/use-pod-level-ci-resources
Jun 18, 2026
Merged

[codex] Use pod-level CI resource variables#924
henryvo117 merged 2 commits into
mainfrom
luu.vo/use-pod-level-ci-resources

Conversation

@henryvo117

@henryvo117 henryvo117 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Move the GitLab CI jobs to a single pod-level CPU and memory budget instead of defining separate build/helper container resources.

This reduces the total requested footprint of each CI pod. The helper container runs before the build container as part of the runner setup flow, so reserving a full helper budget in addition to the build budget overstates the resources that need to be available concurrently. With pod-level resources, the pod carries one shared budget while the build, helper, and init-permissions containers no longer define their own runner resource requests.

Validation

  • Triggered GitLab CI pipelines on this branch and inspected the generated runner pod specs with kubectl.
  • Confirmed the runner pods carry spec.resources with cpu: 6 and memory: 12Gi requests/limits.
  • Confirmed the build, helper, and init-permissions containers have empty container-level resource specs.
  • Checked Datadog CPU usage widgets for the generated runner pods while testing pod-level behavior.

@datadog-datadog-prod-us1

This comment has been minimized.

@henryvo117
henryvo117 force-pushed the luu.vo/use-pod-level-ci-resources branch 4 times, most recently from 9019784 to fcefd69 Compare June 18, 2026 15:53
@henryvo117
henryvo117 force-pushed the luu.vo/use-pod-level-ci-resources branch from fcefd69 to 79dce4c Compare June 18, 2026 16:10
@henryvo117
henryvo117 marked this pull request as ready for review June 18, 2026 19:47
@henryvo117
henryvo117 requested a review from a team as a code owner June 18, 2026 19:47
Copilot AI review requested due to automatic review settings June 18, 2026 19:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates GitLab CI Kubernetes runner resource configuration to use pod-level CPU/memory budgets, avoiding double-counting resources across helper/build containers within the same CI pod.

Changes:

  • Replaced container-level Kubernetes resource variables with pod-level equivalents (KUBERNETES_POD_*).
  • Removed helper-container-specific resource variables and related commentary to reflect the new pod-level allocation model.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .gitlab-ci.yml
@@ -7,19 +7,10 @@ stages:
.jobs-resource-allocation:
variables:
# Sized resources using https://app.datadoghq.com/dashboard/xff-wqx-4a2/ci-reliability-kubernetes-runner-sizing-and-diagnotic

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 296753a797

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .gitlab-ci.yml
Comment on lines +10 to +11
KUBERNETES_POD_CPU_REQUEST: "6"
KUBERNETES_POD_CPU_LIMIT: "6"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve build-container CPU requests for pinning

On the CI nodes that use the static CPU policy described by the removed comment, moving the integer CPU request/limit entirely to spec.resources removes the build container's own CPU request. Kubernetes CPU Manager's static policy assigns exclusive CPUs only to containers with integer CPU requests (unless the alpha PodLevelResourceManagers path is enabled), so the build container now stays in the shared pool even though the pod schedules with a 6-CPU budget. That regresses the isolation these jobs had from noisy neighboring CI pods; keep the build container CPU request/limit while using the pod-level budget.

Useful? React with 👍 / 👎.

@henryvo117 henryvo117 Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Job still runs ok and non-static CPU workload has been running extensively on prod according to compute.

@henryvo117
henryvo117 merged commit d8a6cc7 into main Jun 18, 2026
92 of 93 checks passed
@henryvo117
henryvo117 deleted the luu.vo/use-pod-level-ci-resources branch June 18, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants