-
Notifications
You must be signed in to change notification settings - Fork 39.4k
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
tool to update a file in a configmap or generic secret #25832
Comments
I was given this trick on the slack channel: |
Oh, while I'm back here to look this up again, I should note using that command doesn't prevent you from accidentally replacing a configmap that's been modified while you weren't looking. Not sure how to make that happen from the command line without a bunch of |
@jmhodges As an aside, can a container read a binary file from a volume to which is mapped a Kubernetes ConfigMap that contains that binary file? Please see http://stackoverflow.com/questions/39420102/does-kubernetes-support-a-binary-file-in-a-configmap. |
config maps are text-only, I believe. @pmorie can confirm/deny |
Support for binary in configmaps was requested in #32432. |
/sig node |
I have some configmap and secrets that contain binary data. Downloading the configmap, and editing it by hand to update the data in them is perilous.
One current alternative is deleting and recreating the configmap but it's easy to forget you deleted it or screw up the replace and wander off for lunch while a deploy occurs which then breaks.
Another alternative is making a new configmap with a new path and then updating the deployments that need to use it. This seems a little too onerous and involves making the kubernetes user encode some version information into their configmap names which seems fragile.
It would be nice to get a
replace
like command but that was for updating a key in the config-map with a similar--from-file
interface ascreate config-map
so that the user doesn't screw up the encoding in the file.(I've used "configmap" above, but all of the same issues occur for secrets, as well).
The text was updated successfully, but these errors were encountered: