Lower Repo Radius ephemeral control-plane PostgreSQL CPU request - #12861
Lower Repo Radius ephemeral control-plane PostgreSQL CPU request#12861pujitha24 wants to merge 4 commits into
Conversation
Motivation: GitHub-hosted standard runners give private/internal repositories only 2 vCPU, versus 4 vCPU for public repositories on the same runner label. The chart's default database.resources.requests.cpu is "2" (2 full cores). Combined with the BuildKit sidecar's 200m request and k3s's built-in CoreDNS (100m) and metrics-server (100m) requests, the ephemeral k3d control-plane node used by the reusable "Repo Radius" workflow cannot schedule all control-plane pods on a 2-vCPU private-repo runner: PostgreSQL stays Pending, UCP (which depends on it) never becomes Available, and `rad install kubernetes` times out. Approach: override just the CPU request (not the limit) for this specific ephemeral, low-traffic control-plane install, in the setup-control-plane composite action shared by run-rad-commands-azure.yml, run-rad-commands-aws.yml, delete-azure.yml, and delete-aws.yml. The chart's default in deploy/Chart/values.yaml is untouched, so production installs are unaffected. The CPU limit stays at the chart default (2 cores), so PostgreSQL can still burst to full CPU once scheduled. Validation: `helm template radius deploy/Chart --set database.enabled=true --set database.resources.requests.cpu=250m -s templates/database/statefulset.yaml` confirms the override reaches the rendered StatefulSet: requests.cpu drops from the chart default "2" to "250m" while limits.cpu stays "2". `helm lint deploy/Chart` passed. `make test-helm` passed 131/131 existing chart unit tests (no chart templates/values were touched, confirming no regression). `make test-extension-action-shell-syntax` validated 18 run blocks across 10 composite action.yml files, including this one, with no syntax errors. Disclosure: no Docker/k3d is available in this environment, so a live 2-vCPU-constrained k3d reproduction (PostgreSQL Pending before, Running after) was not run. Post-fix CPU scheduling requests total 250m (database) + 200m (buildkit) + 100m (CoreDNS) + 100m (metrics-server) = 650m, well under a 2-vCPU (2000m) runner's capacity, versus 2000m+ from the database request alone before the fix -- matching the issue's own reported math. Report: radius-project#12857 Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com> Assisted-by: claude-sonnet-5 (via Claude Code)
There was a problem hiding this comment.
Pull request overview
This PR adjusts the reusable “Repo Radius” ephemeral control-plane install to reduce PostgreSQL’s CPU scheduling request so the control plane can successfully schedule on 2‑vCPU GitHub-hosted runners used by private/internal repositories, without changing production chart defaults.
Changes:
- Add a Helm override to set
database.resources.requests.cpu=250mduringrad install kubernetesin thesetup-control-planecomposite action. - Document the rationale inline, clarifying that only the request is lowered while the chart default limit remains unchanged.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Heads up: I don't want to guess at whether you'd rather close this in favor of a port to ai-extensions or handle it some other way, so I'll leave that call to you — happy to open the equivalent fix over there if that's the preferred path. |
|
Thanks for the contribution @pujitha24 ! I believe we moved these workflows here: https://github.com/radius-project/ai-extensions/ would you be able to re-create the PR in that repo? |
Summary
Lower the PostgreSQL scheduling CPU request for the ephemeral "Repo Radius"
control-plane install in
setup-control-planefrom the chart default (2cores) to
250m. The CPU limit is left untouched at the chart default (2cores), so PostgreSQL can still burst to full CPU once scheduled.
Reason for change
GitHub-hosted standard runners (
ubuntu-24.04) give private/internalrepositories 2 vCPU, versus 4 vCPU for public repositories on the same
runner label. The Radius chart's default
database.resources.requests.cpuis
"2"(2 full cores). Combined with the BuildKit sidecar's200mrequestand k3s's built-in CoreDNS (
100m) and metrics-server (100m) requests,the ephemeral k3d control-plane node cannot schedule all control-plane pods
on a 2-vCPU private-repo runner: PostgreSQL stays
Pending, UCP (whichdepends on it) never becomes
Available, andrad install kubernetestimes out waiting for the control plane.
This only changes the ephemeral, low-traffic control-plane install used by
the reusable "Repo Radius" workflow (
setup-control-planeis the sharedcomposite action invoked by
run-rad-commands-azure.yml,run-rad-commands-aws.yml,delete-azure.yml, anddelete-aws.yml). Itdoes not touch
deploy/Chart/values.yaml, so the chart's default forproduction installs is unaffected.
Fixes #
How to test
From the repo root:
All four passed.
helm templateshowed the database container'sresources.requests.cpudrop from the chart default"2"to"250m",while
resources.limits.cpustayed at"2".helm lintpassed with 0failures.
make test-helm(helm-unittest) passed 131/131 existing charttests, confirming no regression (this change does not touch chart
templates or values).
make test-extension-action-shell-syntaxvalidated18
run:blocks across 10 compositeaction.ymlfiles, including theedited one, with no syntax errors.
Disclosure: this sandbox has no Docker/k3d available, so a live 2-vCPU-
constrained k3d cluster reproduction (PostgreSQL
Pendingbefore,Runningafter) was not possible here. With the fix, the ephemeral node's CPU
scheduling requests total
250m(database) +200m(buildkit) +100m(CoreDNS) +
100m(metrics-server) =650m, well under a 2-vCPU (2000m)runner's capacity, versus
2050m+ before the fix, which already exceeds2000m before the other pods are even considered — matching the issue's own
reported math. Recommend confirming with one real run of the reusable
workflow on a private-repo 2-vCPU runner post-merge.
File change summary
.github/extension/actions/setup-control-plane/action.yml--set database.resources.requests.cpu=250mto therad install kubernetescall so the ephemeral control-plane's PostgreSQL requests less CPU than the chart default, fixing scheduling on 2-vCPU private-repo runners; limit is left at the chart default.Fixes #12857