carvel-dev / carvel-dev/ytt

reference values from overlay subsets

Open
#933 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
1.9k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

**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.

```yaml
#@ load("@ytt:overlay", "overlay")

#@overlay/match expects="0+", by=overlay.subset({"kind": "Deployment"})
---
metadata:
#@overlay/match missing_ok=True
labels:
#@overlay/match missing_ok=True
foo: -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.

Contributor guide

Open the contributing guide

Research direction

Start by tracing overlay.subset and overlay/match behavior in ytt's implementation and existing tests. Determine how a matched Deployment can reference its own metadata.name, then add focused coverage showing the expected label value for multiple matched resources. Done means the requested per-resource reference works without breaking existing overlay matching behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.