Repository navigation
fix(chart): every container's resources render through aether.resources; document how to remove a default request or limit (#1355, #1357) - #1360
Merged
Conversation
…es; document how to remove a default request or limit (#1355, #1357) Seven containers still rendered `resources` with plain `toYaml`: the node agent, the proxy, the authz sidecar, the controller, the registrar and both edge containers. On those, `--set <x>.resources.limits.cpu=` rendered `cpu: ""`, which the apiserver rejects as a quantity. They now go through `aether.resources`, like cni-install, install-supervisor, mesh-dns and uds-csi already did. With unchanged values the render is byte-identical to main's (default, and with edge, the authz sidecar, OTel and uds-csi enabled), apart from the `helm.sh/chart` label that carries the chart version. docs/configuration.md gains one paragraph on removing a default request or limit: Helm merges maps, so an empty map removes nothing; the quantity has to be nulled or emptied. No default changes, so no GOMAXPROCS decision is made here. Chart 2.4.14. 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
Resource rendering is consistently updated, documented, versioned, and covered by targeted Helm tests.
0 open findings
What changed in this PR
Standardizes resource rendering so empty or null quantities are safely omitted.
Changes:
- Routes seven remaining resource blocks through
aether.resources. - Adds Helm regression tests for empty, null, default, and overridden quantities.
- Documents resource removal and bumps chart version to 2.4.14.
| File | Description |
|---|---|
docs/configuration.md |
Documents removing resource defaults. |
charts/aether/templates/registrar-deployment.yaml |
Uses resource helper for registrar. |
charts/aether/templates/edge-deployment.yaml |
Uses helper for both edge containers. |
charts/aether/templates/controller-deployment.yaml |
Uses resource helper for controller. |
charts/aether/templates/agent-proxy-daemonset.yaml |
Uses helper for proxy and authz sidecar. |
charts/aether/templates/agent-daemonset.yaml |
Uses resource helper for agent. |
charts/aether/templates/_helpers.tpl |
Records chart-wide helper requirement. |
charts/aether/Chart.yaml |
Bumps chart to 2.4.14. |
charts/aether/BUILD.bazel |
Adds resource-rendering regression tests. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Oct 7, 2026
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 #1355
Closes #1357
Written by an agent (Claude Code).
What changes
Seven containers in
charts/aetherrendered theirresourceswith plaintoYaml. On those, emptying a quantity (--set <x>.resources.limits.cpu=) renderedcpu: "", which the apiserver rejects. They now render through theaether.resourceshelper, which drops an empty or null quantity.I did not rely on the list in the issue. I rendered the chart with everything optional enabled (edge with TLS, admin, GeoIP and HTTP/3; the authz sidecar as the OPA preset and as a bring-your-own image; OTel; uds-csi; mesh-dns) and listed every container and init container. There are 11:
aether-agentagentagent.resourcestoYamlaether-agentcni-install(init)cniInstall.resourcesaether-proxyproxyproxy.resourcestoYamlaether-proxyauthz(native sidecar)proxy.authzSidecar.resourcestoYamlaether-proxyinstall-supervisor(init)proxy.supervisor.resourcesaether-mesh-dnsmesh-dnsagent.meshDnsDaemon.resourcesaether-uds-csiuds-csiudsCsi.resourcesaether-controllercontrollercontroller.resourcestoYamlaether-registrarregistrarregistrar.resourcestoYamlaether-edgeagentedge.resourcestoYamlaether-edgeenvoyedge.resourcestoYamlThe identity gate's init container is not in the chart's output: the controller's webhook builds it from four
--identity-gate-*flags, which already pass an empty value through as "unset". Not touched.docs/configuration.mdgains one paragraph (a new "Resources" subsection at the top of the chart values) on how to remove a default request or limit.charts/README.mddoes not document resources, so it is unchanged.Chart
aether2.4.13 -> 2.4.14. No Go change, no workflow change.No default changes, so no GOMAXPROCS decision
This pull request changes no default value, so no container loses a CPU limit here and there is no
GOMAXPROCSdecision to make. One consequence for an operator is worth stating, and the new docs paragraph states it: emptyinglimits.cpuon thecontrolleror theregistrarused to produce a manifest the apiserver refused; it now produces a valid one, and those two containers takeGOMAXPROCSfromresourceFieldRef: limits.cpu, which follows the node's core count when there is no limit. Their defaults keep the limit for that reason.Unchanged values render the same (measured)
Renders of
origin/main(097f6ae) against this branch with the chart version set back to 2.4.13, Helm 3.18.4:A caveat on "byte-identical": the chart generates a self-signed webhook CA and serving certificate on every render, so two renders of the same chart already differ in 6 lines (
caBundle,tls.crt,tls.key,ca.crt). I compared two ways. With those four values masked, each scenario is identical. Withcontroller.webhook.spire=true, which generates nothing, the raw files are identical undercmp(sha256 of the default render924fc4b6…on both sides, all-enabled47a3dfbc…, bring-your-own9fdd7fbb…).With the version bumped, the only differing lines are the
helm.sh/chart: aether-2.4.13->aether-2.4.14label (36 lines in the default render, 49 with everything enabled).Whether pods roll. The template change itself changes no pod spec. But the chart puts the
helm.sh/chartlabel on every pod template (6 workloads by default, 7 with the edge), so an upgrade to any new chart version, this one included, rolls every workload. That is how the chart behaves today for every release and is not something this pull request introduces; it is listed under "Noticed" below.Emptied CPU limit, before and after (measured)
--set <key>.resources.limits.cpu=on all ten values keys at once, everything enabled:origin/maincpu: ""Before, for example the controller:
After:
The same run with
requests.cpu=gives 7 -> 0, and withlimits.cpu=null5 -> 0 (onmaina null for a quantity that has no default renderedcpu: nullon the five containers without a default CPU limit).Tests, red first
15 new
helm_template_testtargets incharts/aether/BUILD.bazel. Each pattern ends on the line that follows that container's block, so another container of the same pod cannot satisfy it.Against the unchanged chart, 10 of them failed (
bazel test //charts/aether:all: "96 tests pass and 10 fail locally"):aether_agent_empty_cpu_limit_test,aether_proxy_empty_cpu_limit_test,aether_authz_sidecar_empty_cpu_limit_test,aether_controller_empty_cpu_limit_test,aether_registrar_empty_cpu_limit_test,aether_edge_agent_empty_cpu_limit_test,aether_edge_envoy_empty_cpu_limit_testaether_proxy_null_cpu_limit_test(a nulled quantity),aether_proxy_no_limits_test(the only limit emptied: nolimits:key),aether_proxy_empty_cpu_request_test(an emptied request)One failing line, from
aether_agent_empty_cpu_limit_test:The other 5 are guards that passed before and after: the controller and registrar still render their default
100mlimit, and a CPU limit set by the operator still renders on the proxy, the authz sidecar and both edge containers.After the change:
bazel test //charts/...115 of 115 pass;bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...succeeds;make format-checksucceeds.#1357: the spellings, and which were rendered
All rendered with
helm templateagainst this branch, oncontroller.resources(which has all four quantities by default):Do not remove anything (the defaults render unchanged):
--set-json 'controller.resources={}'--set-json 'controller.resources.limits={}'resources: {}limits: {}Remove one limit:
--set controller.resources.limits.cpu=null--set controller.resources.limits.cpu=(also--set-string, and--set-json 'controller.resources.limits.cpu=""')--set-json 'controller.resources.limits={"cpu":null}',--set-json 'controller.resources.limits.cpu=null'limits: {cpu: null},limits: {cpu: ""},limits: {cpu: ~}Remove one request:
--set controller.resources.requests.cpu=null--set controller.resources.requests.cpu=requests: {memory: null},requests: {memory: ""}Remove a whole map:
--set controller.resources.limits=null,--set controller.resources.requests=null, values filerequests: ~. Removinglimitsalso removesGOMEMLIMIT.--set controller.resources=nullrendersresources: {}.The empty-string and null spellings for
limits.cpuandrequests.cpuwere also rendered on all ten values keys at once (table above).What an operator does on upgrade
Nothing. Values that rendered before render the same. To check a release's values against the new chart before upgrading (read the values back; never
--reuse-values):No output means no container carries an empty quantity.
Not verified
cpu: ""is taken from the issue and from the helper's existing comment, not re-measured here; likewise that it acceptsresources: {}.GOMAXPROCSfollows the node's cores whenlimits.cpuis removed from the controller or registrar is the documented behaviour ofresourceFieldRefand whatvalues.yamlalready says; I did not run a pod to observe it.limits.cpuandrequests.memory, not for every quantity of every key.Noticed, not changed
charts/proberhas the same pattern (toYaml .Values.resourcesintemplates/daemonset.yaml), but that chart has noresourceshelper, so the fix there is a new helper plus tests and a version bump, not this one-line change. Itsauthz-canarycontainers hard-code their resources.charts/udsechorenders no resources from values.helm.sh/chart: aether-<version>, so every chart release rolls every pod even when nothing else in the pod spec changed.aether.resourcesrenders{}when every quantity is removed, so the two blocks guarded bywith(proxy, authz sidecar) then renderresources: {}rather than no key. Valid, and the same as the other nine containers.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr