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
If I run kpt fn run --network . from . or my-pkg, I get different results. It would be great to be able to output to the same folder as khelm-function.yaml - whether by default or some option/special file format/whatever. This way, as I accumulate many functions, I can just run them at the top level.
Alternatively, I can set outputPath: my-pkg/rendered.yaml, but then I cannot run the fn in my-pkg folder and it leaks folder structure details a bit.
The text was updated successfully, but these errors were encountered:
@howardjohn I am afraid that this is a kpt issue: khelm runs within a container and just prints the templated manifests to stdout with paths annotated on resources (see here). kpt uses these paths to derive the full file name on the host and write it to disk. I don't think I can access the function file path within the function.
While the function resource itself is within the function input that is provided via stdin and has the path annotated I wouldn't know how to reliably identify the function resource/declaration from the input that lead to the execution of the currently running function.
Do you know kpt functions that print resource paths relative to their function.yaml location?
Please let me know if you have an idea how it could be done or create a kpt issue.
(While it is about the input I was also thinking about making kpt more project and working directory agnostic in another issue.)
For now you can manage your kpt function declarations within a (repo's) root directory and refer to sources within and write manifests into sub directories.
Say I have a folder setup like
I want to emit run the function to end up like
If I run
kpt fn run --network .
from.
ormy-pkg
, I get different results. It would be great to be able to output to the same folder askhelm-function.yaml
- whether by default or some option/special file format/whatever. This way, as I accumulate many functions, I can just run them at the top level.Alternatively, I can set outputPath: my-pkg/rendered.yaml, but then I cannot run the fn in my-pkg folder and it leaks folder structure details a bit.
The text was updated successfully, but these errors were encountered: