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

Write individual files to output path if it is a directory #960

Merged
merged 1 commit into from
Apr 18, 2019

Conversation

zeeZ
Copy link
Contributor

@zeeZ zeeZ commented Apr 9, 2019

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() nor Gvk.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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 9, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zeeZ
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: mengqiy

If they are not already assigned, you can assign the PR to them by writing /assign @mengqiy in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 9, 2019
@monopole
Copy link
Contributor

This follows the suggestion in #897, but doesn't do what the requestor wants, i.e.

I need to reproduce an exact file layout as it is needed for our purposes.

Does anyone else want the output split into gvkn.yaml files?

@zeeZ
Copy link
Contributor Author

zeeZ commented Apr 10, 2019

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.

Copy link
Contributor

@monopole monopole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 18, 2019
@monopole
Copy link
Contributor

/approved

@monopole monopole self-requested a review April 18, 2019 18:24
@monopole monopole merged commit c444f93 into kubernetes-sigs:master Apr 18, 2019
@sidps
Copy link

sidps commented May 30, 2019

I presume this will be in the next release? If so, when will that be?

@pdefreitas
Copy link

pdefreitas commented Dec 17, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants