Allow hub side templating for image pre-caching. - #919
Conversation
Hub side templating in a form of:
pinnedImages: '{{hub fromConfigMap "" "pinned-imagesets" "controlplane-release-images" | toLiteral hub}}'
fails as kustomize fails to apply patches:
wrong node kind: expected MappingNode but got ScalarNode:
Root cause: the base CR has pinnedImages: {} (a mapping).
The hub template is a string (scalar).
Kustomize strategic-merge patches cannot change node kind
(MappingNode → ScalarNode), so the build fails even with the correct template syntax.
Signed-off-by: Yurii Prokulevych <yprokule@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yprokule The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe four precache reference configurations change ChangesPrecache pinned image configurations
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized configuration change is merge-ready after normal checks and review, with no actionable merge-blocking risk remaining. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/assign @imiller0 |
| # your target release(s). Use patches in the PolicyGenerator to override | ||
| # this list with environment-specific image digests. | ||
| pinnedImages: {} | ||
| pinnedImages: "" |
There was a problem hiding this comment.
I think the correct form here would be an empty list, eg []. The object/dict definitely isn't correct...
Hub side templating in a form of:
fails as kustomize fails to apply patches:
Root cause: the base CR has pinnedImages: {} (a mapping). The hub template is a string (scalar).
Kustomize strategic-merge patches cannot change node kind (MappingNode → ScalarNode), so the build fails even with the correct template syntax.
ConfigMap looks like: