install: route kind component deploys through the overlays - #703
install: route kind component deploys through the overlays#703NekoPunch (orangeCatDeveloper) wants to merge 1 commit into
Conversation
--deploy-atenet and --deploy-ate-apiserver applied base manifests directly, skipping the kind overlay's OTel env patches — components silently exported telemetry to the GKE-only collector address. All per-component deploys now share component_manifests(), the root kind overlay composes the component overlays so each patch exists exactly once, and hack/verify/kind-overlays.sh guards the routing, the render equivalence, and the per-container env values. Fixes agent-substrate#702.
416089e to
beacdeb
Compare
Max Smythe (maxsmythe)
left a comment
There was a problem hiding this comment.
Thanks for the fixes! Had a few comments
| # each container must carry its OTel env — value-checked per container because a | ||
| # renamed container turns a strategic-merge patch into a silent ghost sibling. | ||
|
|
||
| set -o errexit -o nounset -o pipefail |
There was a problem hiding this comment.
I'm not sure we want to use hack/verify as a unit test for the deploy script.
Benjamin Elder (@BenTheElder) any opinions?
| INTERVAL = ("OTEL_METRIC_EXPORT_INTERVAL", "10000") | ||
| TIMEOUT = ("OTEL_METRIC_EXPORT_TIMEOUT", "10000") | ||
|
|
||
| def docs(path): |
There was a problem hiding this comment.
This looks like it is parsing the overlays and making sure all resources of a specific kind have the expected overlays, is that correct?
I like the idea of it, but why not parse the YAML directly? Maybe include this as a standalone Python script and avoid the bash validation?
Maintaining overlays seems like a more durable validation problem.
| && run_kubectl wait --for=jsonpath='{.status.phase}'=Active namespace/ate-system --timeout=60s | ||
|
|
||
| local router_manifest="" | ||
| router_manifest="$(render_atenet_router_manifest)" |
There was a problem hiding this comment.
should render_atenet_router_manifest be made to understand the kind switch? It looks like other similar functions do:
Lines 161 to 198 in 55f16fa
Fixes #702
Summary
--deploy-atenetand--deploy-ate-apiserverapplied base manifests directly, skipping the kind overlay's OTel env patches, so components deployed through those flags silently exported telemetry to the GKE-only collector address. They now route through per-component kind overlays the way--deploy-ateletalready does, with the root kind overlay composing the three so each patch exists in exactly one place.hack/verify/kind-overlays.sh(picked up byverify-all.sh) guards the routing, the render equivalence, and the per-container env values.Test plan
Pre/post-refactor full kind renders are byte-identical across all 57 resources.
Six negative injections each fail the verifier (helper bypassed, container renamed, env values changed or deleted, duplicate patch re-added at root).
Real kind cluster:
--deploy-atenetlands the otel-system endpoint without manual intervention; the metrics e2e suite went from a 120s timeout to a sub-second pass.bash -n,hack/verify/shellcheck.sh, andhack/verify/boilerplate.shpass.Tests pass
Appropriate changes to documentation are included in the PR (none needed)