Skip to content
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

Usage of binary data in ConfigMaps #1946

Closed
squakez opened this issue Jan 25, 2021 · 2 comments · Fixed by #1965
Closed

Usage of binary data in ConfigMaps #1946

squakez opened this issue Jan 25, 2021 · 2 comments · Fixed by #1965

Comments

@squakez
Copy link
Contributor

squakez commented Jan 25, 2021

As a follow up of #1881 I am wondering if there is any reason why we are not using binary ConfigMaps. I was thinking to find some way and generate a binary ConfigMaps when we detect any resource that is binary (and default to text if not). That would simplify the usage of a binary resource directly from Integrations as we delegate kube cluster to mount a volume with the binary content.

@lburgazzoli
Copy link
Contributor

lburgazzoli commented Jan 25, 2021

I think the main reason was that configmap were supposed to hold configurations whereas to add arbitrary binary data there is a --resource optio.

Maybe we should improve --resource to be able to support arbitrary configmap and secrets

@squakez
Copy link
Contributor Author

squakez commented Jan 27, 2021

I've made some test in order to enhance --resource. It would leverage ConfigMap BinaryData when we detect the resource as binary and the user is not asking for base64 --compression. I'm thinking to add also the content-type to the resource, so we always know what type is expected.

squakez added a commit to squakez/camel-k that referenced this issue Jan 29, 2021
* 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
squakez added a commit to squakez/camel-k that referenced this issue Jan 29, 2021
squakez added a commit to squakez/camel-k that referenced this issue Jan 29, 2021
With apache#1946 we are no longer needing a special `compress-binary` flag
squakez added a commit to squakez/camel-k that referenced this issue Feb 1, 2021
Include rawContent and contentType for resources

Ref apache#1946
squakez added a commit to squakez/camel-k that referenced this issue Feb 3, 2021
* 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
squakez added a commit to squakez/camel-k that referenced this issue Feb 3, 2021
squakez added a commit to squakez/camel-k that referenced this issue Feb 3, 2021
With apache#1946 we are no longer needing a special `compress-binary` flag
squakez added a commit to squakez/camel-k that referenced this issue Feb 3, 2021
Include rawContent and contentType for resources

Ref apache#1946
astefanutti pushed a commit that referenced this issue Feb 3, 2021
* 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
astefanutti pushed a commit that referenced this issue Feb 3, 2021
astefanutti pushed a commit that referenced this issue Feb 3, 2021
With #1946 we are no longer needing a special `compress-binary` flag
astefanutti pushed a commit that referenced this issue Feb 3, 2021
Include rawContent and contentType for resources

Ref #1946
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants