feat(helm): dynamically set ateomImage based on substrate dependency version - #2493
feat(helm): dynamically set ateomImage based on substrate dependency version#2493entee28 wants to merge 8 commits into
Conversation
…version Signed-off-by: Thanh Nguyen <puffle.nnt@gmail.com>
…orkerPool Signed-off-by: Thanh Nguyen <puffle.nnt@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the kagent Helm chart to avoid requiring users to manually set substrateWorkerPool.ateomImage in the common case, by attempting to derive a default image tag from the chart’s substrate dependency version.
Changes:
- Add documentation in
values.yamlindicating that an emptysubstrateWorkerPool.ateomImageshould default based on the chart’s substrate dependency version. - Update
templates/substrate-workerpool.yamlto compute$ateomImagedynamically from thesubstratechart dependency version and use it in the renderedWorkerPool.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| helm/kagent/values.yaml | Documents that substrateWorkerPool.ateomImage may be left empty to default based on the substrate dependency version. |
| helm/kagent/templates/substrate-workerpool.yaml | Implements dynamic ateomImage derivation from the substrate chart dependency version, falling back to a fail when no default can be determined. |
Suppressed comments (1)
helm/kagent/templates/substrate-workerpool.yaml:17
- This defaulting relies on finding the
substratesubchart in.Chart.Dependencies, but the substrate dependency is conditioned onsubstrate.enabled(helm/kagent/Chart-template.yaml:14) andsubstrate.enableddefaults to false (values.yaml:669-671). In setups where substrate isn’t bundled as a subchart,$ateomImagemay remain empty and hit thisfail, which conflicts with the intent of closing #2491. Consider deriving the pinned substrate dependency version from chart metadata (or otherwise providing a default) even when the subchart isn’t enabled, while still allowing users to overridesubstrateWorkerPool.ateomImageexplicitly.
{{- fail "substrateWorkerPool.ateomImage is required when substrateWorkerPool.create=true and the \"substrate\" chart dependency isn't enabled (substrate.enabled=false) - set it explicitly to match your ate-system version" }}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…behavior Signed-off-by: Thanh Nguyen <puffle.nnt@gmail.com>
EItanya
left a comment
There was a problem hiding this comment.
What do you think about taking it from the go.mod version since they match? We can link it at buildtime with an ldflag
…d is true Signed-off-by: Thanh Nguyen <puffle.nnt@gmail.com>
Hi @EItanya , good catch — you're right it should come from go.mod. Couldn't figure out on how to use an ldflag here though, so I went with the build-time route this repo already has instead: Kept the fail for the |
This PR closes #2491