-
Notifications
You must be signed in to change notification settings - Fork 350
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
Corrupted binaries attached as resource #1881
Comments
Thanks for reporting, this behavior is strange. Sure, there's a way to work this issue around and use data from manually created secrets/configmaps. You need to link the integration to the secret using:
If the secret has a property named
Full documentation: https://camel.apache.org/camel-k/latest/configuration/configmap-secret.html#_reference_a_secret_in_properties |
I am having a look at this. |
So, the problem seems that the |
eventually the information about the content should be added to the resource struct so it gets decoded only if it is needed (i.e. the application logic is already aware of the base64 encoding thus, decoding it could be an issue) |
The problem I see is that we mount a volume with file contents from A possible workaround I found is to use directly binary |
* Any binary data will be using BinaryData ConfiMap instead of Data. We let the cluster to encode/decode the resource * Any text resource will be still using the Data (plain) ConfigMap * The `compression` feature can be run both on binary and text resources, providing a base64 encoded file. * Added unit test to check all the possible scenarios Close apache#1946, close apache#1881
* Any binary data will be using BinaryData ConfiMap instead of Data. We let the cluster to encode/decode the resource * Any text resource will be still using the Data (plain) ConfigMap * The `compression` feature can be run both on binary and text resources, providing a base64 encoded file. * Added unit test to check all the possible scenarios Close apache#1946, close apache#1881
* Any binary data will be using BinaryData ConfiMap instead of Data. We let the cluster to encode/decode the resource * Any text resource will be still using the Data (plain) ConfigMap * The `compression` feature can be run both on binary and text resources, providing a base64 encoded file. * Added unit test to check all the possible scenarios Close #1946, close #1881
Using #1750 as a reference.
Problem
I am attaching binary resource (with
--resource
) to the integration and expecting it to appear in the container as a resource.Original file size: 6733 bytes (binary, zip archive in its essence).
Executing command:
kamel run --dev --resource account.adm Integration.java
.Result: reviewing pod, I see that the attached resource file size is 12255, thus corrupted, integration is unusable.
Attempts adding
--compression=true
flag (ar per #1750 suggestion) yields raw base64 text file in attached pod resource, that is unusable as a) it is base64, not binary, b) there is an extra compression applied on top of the file.Using
kamel version
-> 1.3.Also wondering, whether there is currently a way to attach resource to camel, directly from self-created configMap?
The text was updated successfully, but these errors were encountered: