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
Mount ConfigMap as JSON file #80106
Comments
I guessed at the SIG, feel free to re-assign |
/remove-sig apps |
/sig node |
/sig api-machinery |
/remove-sig api-machinery |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What would you like to be added:
In our environment, we use JSON files as the interchange for config rather than a dozen ENV variables. So we fetch and build the config map inside terraform, and then when we go to create a ConfigMap to be given to the pod, we have to first serialize to JSON within terraform so we end up with a ConfigMap that looks like this:
It would be great if k8s saw a non-scalar value at
data
in the manifest, it would first serialize it. How exactly to serialize is not super obvious to me, do you select serialization format based on the key ending in.json
? Do you add an attribute to specify how to serialize? Do you always use JSON? Maybe you specify this during the volumeMounts bit? I'm not sure what best fits the overall project.Why is this needed:
Storing a map as a string in a ConfigMap is icky, it would be nicer if the ConfigMap could just directly house the data as an object and then when it goes to mount in, that's when the conversion happens
The text was updated successfully, but these errors were encountered: