kapitan-reference
kapitan-reference copied to clipboard
[Feature] add binaryData field to Configmaps
Describe the feature A configmap can take a data or binaryData field. Kapitan only allows the data field.
Expected behavior When defining an "config_maps" dict, I would love to see that I can choose between "data" and "binaryData". So something like:
config_maps:
data-config:
mount: /path/data
readOnly: true
data:
application.yml:
template: some_template.j2
values: ${config}
binardata-config:
mount: /path/binarydata
readOnly: true
binaryData:
keystore.jks:
template: another_template.j2
values: ${another_config}
And maybe add another option to let kapitan encode the template to base64 before writing it into the configmap.
Thank you!
@EugenFo Kapitan is not tied to kubernetes per se. I feel like you meant to request this feature in the kapitan-reference repo - if that's correct, please reopen in that repo. Thanks
Transferred the issue to the appropriate project
I might just have found some time to work on this.
Question: Being it binary data, does it make sense to have support for a template (which is text?)
I cannot see reasons to have anything other than value
:
config_maps:
data-config:
mount: /path/data
readOnly: true
data:
application.yml:
template: some_template.j2
values: ${config}
binardata-config:
mount: /path/binarydata
readOnly: true
binary_data:
an_actual_binary_file:
value: ?{a_reference_already_in_base64}
something_else.txt:
value: "does this even make sense?"
b64_encode: true
@ramaro @Moep90 @EugenFo what do you think?
Thank you @ademariag for working on this.
I also can't reasons to have any support for templates. It might be that there will be some super edge cases for this. The example from the issue opening was just some arbitrary random example stuff, you know.
So I'm super fine if there is only support for value
in binary_data
.