You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem/challenge you have
I'm trying to set a label on multiple resources but with a dynamic value that includes the resource name.
#@ load("@ytt:overlay", "overlay")#@overlay/match expects="0+", by=overlay.subset({"kind": "Deployment"})
---
metadata:
#@overlay/match missing_ok=Truelabels:
#@overlay/match missing_ok=Truefoo: <deployment.metadata.name>-bar #! <---------- dynamically set metadata.name of the same matching resource
Describe the solution you'd like
I want to be able to reference a value from overlay subsets.
Anything else you would like to add:
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
The text was updated successfully, but these errors were encountered:
@Nizar-opt If I have not misunderstood the scenario, you should be able to achieve the desired outcome with @overlays/replace. It does require you to do careful merging of resources, but it's possible. I created an example in the playground for you which updates deployments with a label referencing .metadata.name.
Thank you @mamachanko appreciate the example. It worked for my case. Not sure if this is considered an alternative solution? As the proposed feature may cover other cases? cc @cppforlife
renuy
added
carvel accepted
This issue should be considered for future work and that the triage process has been completed
and removed
carvel triage
This issue has not yet been triaged for relevance
labels
Dec 6, 2024
Describe the problem/challenge you have
I'm trying to set a label on multiple resources but with a dynamic value that includes the resource name.
Describe the solution you'd like
I want to be able to reference a value from overlay subsets.
Anything else you would like to add:
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
The text was updated successfully, but these errors were encountered: