Allow output path relative to function config file
Is your feature request related to a problem? Please describe.
Users expect output paths declared within a function to be relative to the function's config file. This came up in https://github.com/mgoltzsche/khelm/issues/12
Describe the solution you'd like
kpt should handle function output paths relative to the function config's path when writing the output to disk.
Describe alternatives you've considered
Manage all functions within a root directory and always call kpt fn run . within that directory.
Additional context
See https://github.com/mgoltzsche/khelm/issues/12
cc @howardjohn
@droot @mengqiy could be an interesting use case for you to adopt and analyze as you are working on hydration/functions v1. khelm is a solution that is delivered in several ways including a kpt function.
@mgoltzsche we are introducing new primitive called pipeline (part of Kptfile) to run kpt-functions declaratively where each pkg (and subpackage) can have their own pipeline. In the new workflow, output generated by a function will be saved in the pkg that includes the pipeline that invoked that function. I think that should address this requirement.
This is in active development on next branch and will be in shape to be tried out in 2 weeks.
Sounds good! Looking forward to playing with that!
@droot any chance we can link this issue to the Epic or Feature ticket? That way when it closes we can let @mgoltzsche know?
@droot Do we have an issue to track how does pipeline handle the resources generated by function or we have implemented it?
@mgoltzsche We have introduced new concept called pipeline of functions in Kptfile to run functions declaratively that should address this issue I believe. You can read more details here. If you want to take it for a spin, here is a link to the installation instructions.
That looks awesome! I'll try to prepare a khelm example with it during the weekend.
This may be FUD as I only read the docs and didn't actually get a chance to try it out, but it seems like not being to use Network or volume mounts is going to be a pretty critical issue for khelm?
That is true! For this to work with e.g. khelm requires to be able to declare also non-yaml files input. I had another issue in mind that could solve this but apparently it hasn't been implemented yet: #1151