Repository navigation
fix(chart): the prober chart renders every resources block through a helper, and the authz-canary resources become values (#1361, #1362) - #1365
Merged
Conversation
…ober.resources; the authz-canary resources are values (#1361, #1362) #1361: charts/prober rendered the prober container's resources with plain toYaml, so `--set resources.limits.cpu=` rendered `cpu: ""`, which the apiserver rejects. The chart gets its own copy of the aether chart's resources helper (prober.resources), which drops an empty or null quantity. #1362: the two authz-canary containers had their resources written into the template. They are now `authzCanary.resources` (the curl client) and `authzCanary.echo.resources` (the echo target), defaulting to the former literals and rendered through the same helper. Tests: rules_helm's template_patterns only search the document helm prints last for a template, so they cannot see the two Deployments in authz-canary.yaml. bazel/helm gains helm_template_match_test, which matches multi-line patterns against the whole render. Chart prober 1.0.3 -> 1.0.4. No default value changes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
There was a problem hiding this comment.
🟡 Changes recommended
The new tests and documented check rely on non-portable GNU grep behavior.
2 open findings
What changed in this PR
Adds configurable, empty-safe resource rendering across all prober chart containers.
Changes:
- Adds shared resource rendering and authz-canary resource values.
- Expands Helm rendering tests with whole-output matching.
- Documents behavior and bumps the chart to 1.0.4.
| File | Description |
|---|---|
docs/configuration.md |
Documents resource configuration and validation. |
charts/prober/values.yaml |
Adds canary resource defaults. |
charts/prober/templates/daemonset.yaml |
Uses the resource helper. |
charts/prober/templates/authz-canary.yaml |
Makes canary resources configurable. |
charts/prober/templates/_helpers.tpl |
Adds empty-safe resource rendering. |
charts/prober/Chart.yaml |
Bumps chart version. |
charts/prober/BUILD.bazel |
Adds resource rendering tests. |
bazel/helm/defs.bzl |
Adds whole-render matching test rule. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…-P; the documented check uses [[:space:]] Review of #1365. `grep -P` is GNU-only (BSD grep on macOS has no -P), so the rule depended on the host's grep. Patterns are now POSIX extended regular expressions matched by bash's `[[ =~ ]]`, with `\n` and `\s` translated by the runner. The check command in docs/configuration.md used `\s` under `grep -E`, which BSD grep reads as a literal `s`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This was referenced Oct 7, 2026
Closed
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 #1361
Closes #1362
Written by an agent (Claude Code).
What changes
The prober chart renders three containers. All three now render their
resourcesthrough a newprober.resourceshelper (a copy ofaether.resources; charts do not share templates), which leaves out an empty or null quantity instead of renderingcpu: "".proberproberresourcestoYamlauthz-echoechoauthzCanary.echo.resources(new)authz-canarycurlauthzCanary.resources(new)New values keys, defaults equal to the former literals:
Documented in
charts/prober/values.yamland in a new "Resources" paragraph of the prober section ofdocs/configuration.md(the three keys, how to remove a default, and a command to check a release's values against the chart).Chart
prober1.0.3 -> 1.0.4. No Go change, no workflow change,charts/aetheruntouched.One file outside the chart:
bazel/helm/defs.bzlgains a test rule,helm_template_match_test. See "Tests" for why it was needed.No default changes, so no GOMAXPROCS decision
The prober is a Go binary, but this pull request changes no default: no container gains or loses a CPU limit, so there is no
GOMAXPROCSdecision to make. (The prober already ships without a CPU limit and without aGOMAXPROCSpin; that is unchanged here.)Unchanged values (measured)
Renders of
origin/main(90718a7) against this branch, Helm 3.18.4,helm template prober <chart> -n aether-test, build stamps replaced by fixed text on both sides.Default values: byte-identical apart from the chart version label. 104 lines. The only differing lines are the three
helm.sh/chart: prober-1.0.3-…->prober-1.0.4-…labels. With the label set back,cmpreports no difference (sha256cbc1e372…on both sides).authzCanary.enabled=true: the same objects, but NOT byte-identical. 346 lines. Apart from the eight version labels, two blocks have their two keys in the other order:(and the same for the
curlcontainer with32Mi/16Mi). The literals were writtenrequeststhenlimits; the helper ends intoYaml, which sorts keys, so it writeslimitsthenrequests, as the prober container and every container ofcharts/aetheralready do. Parsing both renders as YAML and comparing the seven objects gives equality (with the version label set back). So the two canary Deployments' pod templates are unchanged as objects.I chose the helper's order over keeping the text identical: the alternative is a second code path that emits the two keys by hand in the old order, for these two containers only. If the text must stay identical, say so and I will do that instead.
Emptied CPU limit, before and after (measured)
--set resources.limits.cpu=onorigin/main:On this branch:
With the canary on and the CPU limit emptied on all three keys, this branch renders 0 lines reading
cpu: ""(origin/main: 1, and it ignores the two canary keys).Tests, red first
16 targets in
charts/prober/BUILD.bazel(5 existed). Against the unchanged templates and values, 9 of the 11 new ones failed ("7 tests pass and 9 fail locally"); after the change all 16 pass.prober_empty_cpu_limit_testcpu: ""renderedprober_empty_cpu_request_testcpu: ""renderedprober_default_resources_test,prober_cpu_limit_override_testprober_authz_echo_resources_override_test,prober_authz_curl_resources_override_testprober_authz_echo_empty_cpu_request_test,prober_authz_curl_empty_cpu_request_testcpu: 10mcould not be removedprober_authz_echo_empty_cpu_limit_test,prober_authz_curl_empty_cpu_limit_test,prober_authz_canary_default_resources_testOne failing line, from
prober_empty_cpu_limit_test:The last row deserves a caveat. The literals had no CPU limit, so "emptying the CPU limit renders no
cpukey" was already true onmain; those three tests were red there only because the pattern expects the helper's key order. To show the two empty-limit tests can fail for the right reason, I temporarily rendered the canary blocks with plaintoYamlinstead of the helper: both empty-limit tests and both empty-request tests failed (4 red,cpu: ""in the render), and passed again with the helper restored.Each canary pattern is anchored on the line before its container's block (
seconds: 5forecho, the script'sdoneforcurl) and each test also asserts the other container's block, so a test cannot be satisfied by the wrong container.Why a new test rule
helm_template_test'stemplate_patternscannot test the canary containers. Its runner (rules_helmhelm/private/runner/runner.go,parseHelmOutput) splits the render on---and stores each document in a map keyed by its# Source:path, so for a template that renders several documents only the last one printed is searched.authz-canary.yamlrenders five; the last is theHTTPFilter. I first wrote the canary tests ashelm_template_testand they still failed after the fix, with the expected block visibly present in the output.helm_template_match_test(next to the repository's existinghelm_template_fail_testandhelm_template_absent_test) matches each pattern against the whole render. Patterns are POSIX extended regular expressions matched by bash itself, with\nand\stranslated by the runner, so the rule needs no particulargrep(a review comment pointed out thatgrep -Pis GNU-only). The prober container's tests stay onhelm_template_test: the DaemonSet is a single-document template.Verification
bazel test //charts/... //bazel/helm/...: 127 of 127 pass.bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...: succeeds.make format-check: succeeds.What an operator does on upgrade
Nothing. Values that rendered before render the same objects. As with every prober chart release, the DaemonSet rolls, because its pod template carries the
helm.sh/chartlabel. The two canary Deployments do not roll: their pod templates carry no version label and are unchanged as objects (inferred from the parsed comparison above; not applied to a cluster).To check a release's values against the new chart first (read the values back; never
--reuse-values):No output means no container carries an empty quantity. There is nothing to measure after a deploy: no request or limit changes, so no CFS or memory series should move.
Not verified
cpu: ""is taken from the issue, and that a reordered-but-equal pod template causes no rollout is inferred from the objects being equal.helm_template_match_testwas run on Linux only. It relies on bash and the C library's regular expressions; I could not run it on macOS.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr