-
Notifications
You must be signed in to change notification settings - Fork 238
Introduce collections support #632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Do we want to start with a design doc first ? |
Unknown CLA label state. Rechecking for CLA labels. Send feedback to sig-contributor-experience at kubernetes/community. /check-cla |
This is at the top of my wish list for kro - thank you for this work and anxiously awaiting its arrival! |
@brandonjbjelland we're excited as well! i did open a proposal describing the collection semantics and possible use cases, your feedback would be highly valuable! => #679 |
Instead of a "simple" case, can we have forEach be an array of collections as the only supported mechanic? I really like the idea of an array of collections to allow multiple iterators running over every combination of collections like discussed here: forEach:
- collection: ${spec.regions}
name: "region"
- collection: ${spec.zones}
name: "zone"
template:
kind: Pod
metadata:
name: ${'pod-' +region.entry+ '-' + zone.entry} |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This PR introduces collections support in RGDs through a new
forEach
field, enabling dynamic creation of multiple resources based on iterative expressions.forEach
field to RGDs spec allowing iteration over both arrays and mapseach
context variables (item
,index
,length
,key
,value
) for template accessExample usage: