Join GitHub today
subPath in volumemount creates a directory instead of a file specified in configmap #62156
Is this a BUG REPORT or FEATURE REQUEST?:
If configmap is deleted and then created again, it works intermittently by creating the properties file but it always fails with the helm chart installation.
deployment.yaml snippet (I can provide the full copy if you need)
I am not sure if I should attribute this bug completely to the helm and ask them to look over since it has been reported before and closed without a concrete solution:
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
I wouldn't have expected the configmap/deployment order to matter... doesn't the configmap get resolved as part of the kubelet setting up the volumes for the pod?
This issue occurs every time I try to run the helm chart that has deployments,service and configmap objects in templates. My guess is that helm applies all the resources at once and hence the issue. Right now this component is being installed by following the order strictly(apply configmap, pause and then apply deployment).
I am getting the same issue on my aws setup while on my local mac it works fine. I use the same scripts and images on both these setups.
AWS kubernetes version:
Local kubernetes version:
Is there at least a workaround for this problem?
referenced this issue
Jun 19, 2018
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.
I hit the same issue while mounting a binary file today.
volumes: - name: config-image configMap: name: random-image
volumeMounts: - name: config-image mountPath: /etc/random/hello-world.png subPath: hello-world.png
I can cd into
Maybe this should go in a separate issue, I am not sure.
This isn't a Kubernetes issue this is an issue with your code.
If you want it to make a file, your configmap or secret statement needs to have an items: -key, path block, where you explicitly specify every key.