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
Container KRM Mounts are not mounting via function parameters #4290
Comments
If you change the |
Thanks @natasha41575 I'll check. However, I did find this in the roadmap today as well
Which looks like this functionality will be removed in the future or already has? I tried both
mounting dst via I did use kustomize/kyaml/fn/runtime/runtimeutil/runtimeutil_test.go Lines 1167 to 1223 in 71b978d
|
I will talk to the other maintainers when we refresh the roadmap for 2022. The functionality has not been removed yet, and I don't have the context for why there was a plan to remove network access and storage mounts. I can leave a comment with updates after discussion. |
Thanks @natasha41575 I updated my previous comments with testing your suggestion as well. |
@natasha41575 , here is some idea why it was dropped: UPD: PS: it's a separate story how to make it work with Windows. 3336 only makes sure that UT work for Windows, but perhaps it's necessary to state that relative path will always be using 'linux-style' separators and in case of different platform convert path to the current style. BTW I think different separators was something mentioned as 'lesser extend portability concerns'... |
/triage accepted |
I think #4489 will fix the issue of files not being correctly mounted into the container. And as far as support goes, https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/2953-kustomize-plugin-graduation has been updated to state the following: The network and storage mount options will be retained, as they are needed to support some common generator plugin use cases. Guidance on their appropriate use will be added to the plugin developer documentation.
I agree, IMO we should (a) deprecate the --mounts flag and (b) limit mounts to be relative paths. This idea isn't really fleshed out and probably deserves its own issue. I can file one when I have some more time to think about it. |
Describe the bug
When specifying mounts in the
config.kubernetes.io/function
container functions, the volumes are not being mounted.Files that can reproduce the issue
I have a sample repo that I have mount info to the example transformer yaml.
I expect when this runs, if I run a docker inspect on this running container, I will be able to see volume mounts, but I do not.
Running
kustomize build --enable-alpha-plugins .
and inspecting the containerExpected output
I expected to see mounted volumes similar to when i run this
kustomize build --enable-alpha-plugins --mount type=bind,src=${PWD},dst=/candiedcode/ .
Actual output
Kustomize version
{Version:kustomize/v4.4.1 GitCommit:b2d65ddc98e09187a8e38adc27c30bab078c1dbf BuildDate:2021-11-11T23:27:14Z GoOs:darwin GoArch:amd64}
Platform
Mac
Additional context
The text was updated successfully, but these errors were encountered: