-
Notifications
You must be signed in to change notification settings - Fork 52
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
Malformed exception when using binary config map file into an integration #593
Comments
I think the main issue is that we don't have a way to distinguish between configmaps and secrets used to store properties vs resources. |
I'm running into this issue as well. For my use case I created a Secret with an Update: since I couldn't downgrade my camel-k to 1.2, I tried my scenario again with the RedHat camel-k operator which is 1.2, and I can confirm it work with that but fails with camel-k 1.3 |
Within the possibility to use binary resources directly into an integration, I think this issue can be closed. |
@squakez Do resources retain the file name in the mount path? Because for sources they are mounted like |
File name will be the same, not the path, the behavior is the same as for |
@squakez I remember configmaps were mounted on a child folder of $CAMEL_K_MOUNT_PATH_CONFIGMAPS, isn't it ? |
@lburgazzoli that's correct, the default is that path. I was thinking that if one has a specific need, he can edit the integration definition by setting a concrete
The same should apply to any binary file. Also here, that path will be included in your application classpath, but it can be useful if a file is expected to be in any particular place. @makandre, hope that helps. |
I don't remember if that options to set the mnount path is still available for config maps and secrets in general, |
I like to avoid having to manually editing the integration yaml. So if I don't change the mount path, it defaults to Because I need to pass the truststore location to the kafka component like so:
So if the |
My bad, |
As far as I remember if you use a config map, the path should be:
@squakez maybe we can add an option to the
where
|
@lburgazzoli yes I'm basically using the method you described to pass my mounted secret's path to Kafka component (in camel-k 1.2) But since binary file in configmap/secret is broken now in camel-k 1.3, and @squakez was suggesting I can mount my binary file using It sounds to me that the mount path of resource does not retain the original file name, however it will be in sequential order (i.e. the first |
That's correct. You can rely on that if your |
I wonder if we could explore mounting resources ConfigMap using The only side-effect of using |
@astefanutti I remember sub path was not supported by knative thus I had to switch to this "pattern". We should investigate if it is still true and if it is, check with the knative dev if they can enable it |
@lburgazzoli thanks a lot. It seems it's been fixed in Knative: knative/serving#3926. Let me create an issue in Camel K to try it out. |
* Catching the exception to skip all non UTF-8 resources (configmaps, secrets). * Adding a check to skip symbolic links which were processed twice Fix apache#593
* Catching the exception to skip all non UTF-8 resources (configmaps, secrets). * Adding a check to skip symbolic links which were processed twice Fix apache#593
* Catching the exception to skip all non UTF-8 resources (configmaps, secrets). * Adding a check to skip symbolic links which were processed twice Fix #593
* Catching the exception to skip all non UTF-8 resources (configmaps, secrets). * Adding a check to skip symbolic links which were processed twice Fix #593
If I try to use a binary file coming from a config map, the runtime fails with following stacktrace:
I think this is because we are expecting the config map to be always a text file.
Steps to reproduce
configmap
from the zipped fileintegration.groovy
The text was updated successfully, but these errors were encountered: