Repository navigation
fix(chart): no CPU limit on the cni-install init container; pin the edge agent's GOMAXPROCS (#1335) - #1343
Merged
Conversation
…dge agent's GOMAXPROCS (#1335) cni-install runs ahead of the agent on every agent pod start with request = limit = 100m CPU. Its work is one short CPU burst (Go start-up and a byte compare of the plugin on the host against the image's), and a 100m quota is 10 ms per 100 ms CFS period: on talos-main all 40 agent starts of 2026-10-05..07 took 496-802 ms from the installer's first log line to its last (median 598 ms), always a multiple of ~100 ms, for at most 50-80 ms of CPU. Inferred from log timestamps: a sub-second init container never meets a 60 s cAdvisor scrape, so there is no container_cpu_cfs_* series to read. Keep the 100m request (the agent container's 200m is the pod's effective request), drop limits.cpu, and render the block through aether.resources so an empty limits.cpu means "no limit". The edge pod's `agent` container has no CPU limit and had no GOMAXPROCS, so its Go runtime sized itself to the node's cores. Pin it with edge.goMaxProcs (default 2, the node agent's value from #1116; the container averages 1.8m). Chart 2.4.11 -> 2.4.12. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
There was a problem hiding this comment.
🟢 Approval recommended
The chart behavior, documentation, and focused rendering tests consistently implement the requested resource changes.
0 open findings
What changed in this PR
Removes CNI installer CPU throttling and bounds edge-agent runtime parallelism.
Changes:
- Removes the default
cni-installCPU limit while retaining requests and memory limits. - Adds configurable edge-agent
GOMAXPROCS, defaulting to 2. - Adds Helm rendering tests, documentation, and chart version
2.4.12.
| File | Description |
|---|---|
docs/runbook.md |
Documents measurements and verification guidance. |
docs/configuration.md |
Updates CNI and edge configuration references. |
charts/aether/values.yaml |
Changes resource defaults and adds edge.goMaxProcs. |
charts/aether/templates/edge-deployment.yaml |
Renders edge-agent GOMAXPROCS. |
charts/aether/templates/agent-daemonset.yaml |
Uses empty-resource filtering for CNI installation. |
charts/aether/Chart.yaml |
Bumps the chart to 2.4.12. |
charts/aether/BUILD.bazel |
Tests defaults, overrides, and disabled settings. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1335
Measured first (talos-main, read-only)
cni-install CFS throttling: not readable from metrics. There is no
container_cpu_cfs_*and nocontainer_cpu_usage_seconds_totalseries forcontainer="cni-install"(norinstall-supervisor) in the 45 h cAdvisor has been scraped, eight agent rolls included — the cgroup lives for under a second and never meets a ~60 s scrape. kube-state-metrics exports onlykube_pod_init_container_status_restarts_total(no..._state_startedyet).kubectlgivesstartedAt/finishedAtat 1 s resolution (all five live pods: 0–1 s) and no CPU time.Wall time, from the installer's own log timestamps (VictoriaLogs, 48 h, 40 agent starts = 8 rolls × 5 nodes):
Every total is a multiple of ~100 ms and every gap is either nothing or a whole CFS period. That is the signature of a 100m quota (10 ms per 100 ms period) on a CPU burst: spend 10 ms, park until the next period. Five to eight periods bound the work at 50–80 ms of CPU (an inference, not a counter), so about half a second of every agent start was the quota. All 40 starts took #1123's "unchanged; not rewriting it" path; a start that rewrites the plugin was not in the sample.
What it does (
cni/internal/install): Go start-up, a byte-for-byte compare of the plugin on the host against the image's, a few small conflist reads. No writes on that path.Edge
agentcontainer (aether-ingress, 2 replicas, cAdvisor, 45 h): average 1.8m, busiest 5 minutes 4.4m. Live spec: no CPU limit,GOMEMLIMITset, noGOMAXPROCS— so the Go runtime follows the node's core count.Changed
cniInstall.resources: keep requests100m/32Miand the32Mimemory limit, droplimits.cpu. Rendered throughaether.resources(the fix(chart): uds-csi no CPU limit, GOMAXPROCS=2; keep controller/registrar limits (#1321) #1327 helper), so--set cniInstall.resources.limits.cpu=means "no limit" instead of an invalid quantity. The request costs the node nothing: the agent container's200mis the pod's effective request. The pod was already Burstable. No GOMAXPROCS pin on a single-threaded process that exits within the second.edge.goMaxProcs(default2): rendered asGOMAXPROCSon the edge pod'sagentcontainer, the same shape asagent.goMaxProcs(agent: the 200m CPU limit turns 5–25 ms snapshot builds into 100 ms CFS steps and parks goroutines holding the cache mutex — remove the limit (or ≥1000m) and pin GOMAXPROCS #1116).0/empty omits it.2.4.11→2.4.12.docs/configuration.mdrows (and the stalecniInstall.image.pullPolicy: Always→IfNotPresent);docs/runbook.md, new "cni-install CPU limit" section with the measurement, the LogsQL to repeat it, and what was found on the other init containers.Rendered, cni-install
resources:Rendered, edge
agentenv:GOMEMLIMIT=241591910before;GOMEMLIMIT=241591910,GOMAXPROCS="2"after.Other init containers (reported, not changed)
install-supervisor(proxy pod): renders noresourcesat all — no limit, so nothing throttles it, but no request either (minimum CFS weight, invisible to request accounting). ≤ 1 s wall on talos-main.authznative sidecar:10mrequest, no CPU limit (deliberate, commented in values).aether-identity-ready(webhook-injected):5mrequest,limits.cpu: ""— no CPU limit.envoycontainer takes no--concurrency, so its worker count follows the node's cores.Tests
New
helm_template_tests incharts/aether/BUILD.bazel. Run before the chart change:aether_cni_install_cpu_resources_test,aether_cni_install_empty_cpu_limit_test,aether_edge_gomaxprocs_test,aether_edge_gomaxprocs_override_testfailed;aether_cni_install_cpu_limit_override_testandaether_edge_gomaxprocs_off_testpassed (they assert what was already true). After: all pass.bazel test //charts/...— 89 passbazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...— cleanmake format-check— cleanNot verified: the post-change wall time on a cluster (nothing was applied; the runbook says so and gives the query).
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr