-
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
feat(trait): leverage ConfigMap binary data for resources #1965
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I think the CRDs have to be regenerated to take the API update into account.
Do you mean this, right? what's the process to update them? |
Exactly. You can run Also running |
@squakez it seems like there is a conflict with |
I'll rebase |
* 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
* Added integration test for apache#1946
With apache#1946 we are no longer needing a special `compress-binary` flag
Include rawContent and contentType for resources Ref apache#1946
bb01230
to
2b4bd88
Compare
@astefanutti it should be clear now |
Thanks @squakez! |
With this PR we include the possibility to use
BinaryData
inConfigMap
s, leaving any encoding/decoding to the k8s platform. The decision of the usingBinaryData
vsData
is based on the sniffedmime-type
of the resource passed. In order to maintain the possibility to explicit encode we have the following situations:kamel run ... --resource file.text
--> will leverageData
ConfigMap
, mounting a volume with a plain text data file.kamel run ... --resource file.binary
-->will leverageBinaryData
ConfigMap
, mounting a volume with a binary data file.kamel run ... --resource file.text/file.binary --compression
--> will leverageData
ConfigMap
, we base64 encode the content, mounting a volume with a base64 encoded file. Decoding will be up to the application logic.Close #1946, fix #1881
Release Note