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

[Feature] add binaryData field to Configmaps #106

Open
EugenFo opened this issue Oct 4, 2021 · 4 comments
Open

[Feature] add binaryData field to Configmaps #106

EugenFo opened this issue Oct 4, 2021 · 4 comments

Comments

@EugenFo
Copy link
Contributor

EugenFo commented Oct 4, 2021

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!

@ramaro
Copy link
Member

ramaro commented Oct 24, 2021

@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

@ramaro ramaro closed this as completed Oct 24, 2021
@ademariag ademariag transferred this issue from kapicorp/kapitan Oct 24, 2021
@ademariag ademariag reopened this Oct 24, 2021
@ademariag
Copy link
Contributor

Transferred the issue to the appropriate project

@ademariag
Copy link
Contributor

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?

@EugenFo
Copy link
Contributor Author

EugenFo commented Oct 29, 2021

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.

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

No branches or pull requests

3 participants