Skip to content
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

Add resource to each namespace #738

Closed
mamachanko opened this issue Sep 7, 2022 · 2 comments
Closed

Add resource to each namespace #738

mamachanko opened this issue Sep 7, 2022 · 2 comments
Assignees
Labels
enhancement This issue is a feature request priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome.

Comments

@mamachanko
Copy link
Contributor

mamachanko commented Sep 7, 2022

Describe the problem/challenge you have
Specifically, I would like to add a resource to all namespace. For that I must be able to set the resources .metadata.name, but its not known.

What I have so far:

#@overlay/match by=overlay.subset({"kind": "Namespace"}), expects="0+"
#@overlay/insert after=True
---
kind: Thing
metadata:
  name: the-thing
  namespace: ?

To be more specific
given

#! stuffs.yaml
---
apiVersion: v1
kind: Namespace
metadata:
  name: one
---
apiVersion: v1
kind: Namespace
metadata:
  name: two

want

ytt -f stuffs.yaml -f magic.yaml
---
apiVersion: v1
kind: Namespace
metadata:
  name: one
---
kind: Thing
metadata:
  name: thing
  namespace: one
---
apiVersion: v1
kind: Namespace
metadata:
  name: two
---
kind: Thing
metadata:
  name: thing
  namespace: two

Describe the solution you'd like

Of course, there's a general pattern here, but I am expressing this as the specific use case mentioned ^.

Anything else you would like to add:
According to our Slack conversation, this is not easily done yet.


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.

@mamachanko mamachanko added carvel triage This issue has not yet been triaged for relevance enhancement This issue is a feature request labels Sep 7, 2022
@carvel-bot carvel-bot added this to Carvel Sep 7, 2022
@carvel-bot carvel-bot moved this to To Triage in Carvel Sep 7, 2022
@pivotaljohn
Copy link
Contributor

Note: the solution to this is likely to also resolve #718

@pivotaljohn
Copy link
Contributor

We've seen multiple situations where a user would love to accept an entire document as an input into a template that results in a new document. Since this is a mere extension of the existing semantics of overlays (i.e. implementing what it means to insert or append a document), this seems like a fine addition the the feature set.

@pivotaljohn pivotaljohn added priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome. and removed carvel triage This issue has not yet been triaged for relevance labels Sep 7, 2022
@pivotaljohn pivotaljohn moved this from To Triage to Unprioritized in Carvel Sep 7, 2022
@pivotaljohn pivotaljohn moved this from Unprioritized to In Progress in Carvel Sep 13, 2022
Repository owner moved this from In Progress to Closed in Carvel Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue is a feature request priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome.
Projects
None yet
Development

No branches or pull requests

2 participants