-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Write individual files to output path if it is a directory #960
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zeeZ If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This follows the suggestion in #897, but doesn't do what the requestor wants, i.e.
Does anyone else want the output split into gvkn.yaml files? |
There is also #55 with two people wanting split files, though the initial request was also for writing out following the input names. I guess I'm trying to solve neither OP, but the comments, with predictable file names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approved |
I presume this will be in the next release? If so, when will that be? |
I am wondering when this will be released. Edit: It has been released, however kubectl still ships version 2 of Kustomize which mislead me to think that this feature hasn't been shipped yet. |
I created this to solve #897 before noticing #929 and am posting this to maybe offer a simpler alternative.
Current behaviour for
-o
is to complain if the path is a directory, so I simply changed that to write the individual files (based on the final resource) there instead.I did not include namespace in the file name because neither
ResId.GvknString()
norGvk.String()
include it and I didn't want to write that function a third time and didn't feel the need for it because namespace is usually also set once per build. If it's deemed necessary I'll add it.