Describe the bug
If you have a ConfigMap and Secret that has the same name, you can't mount both as a volume due to a volume name collision. This is because the template will name both volumes as NAME-volume.
The proposed fix is to support specifying a custom volume name to avoid the collision. E.g.,
configMaps:
myconfig:
as: volume
mountPath: /etc/myconfig/config
volumeName: myconfig-configmap-volume
To Reproduce
- Create a
ConfigMap and Secret that has the same name (e.g., myconfig).
- Try to mount both as volumes:
configMaps:
myconfig:
as: volume
mountPath: /etc/myconfig/config
secrets:
myconfig:
as: volume
mountPath: /etc/myconfig/secrets
Expected behavior
Mount both the ConfigMap and Secret as a volume.
Actual behavior
Error:
Helm install failed: Deployment.apps "myapp" is invalid: spec.template.spec.volumes[1].name: Duplicate value: "myconfig-volume"
Describe the bug
If you have a
ConfigMapandSecretthat has the same name, you can't mount both as a volume due to a volume name collision. This is because the template will name both volumes asNAME-volume.The proposed fix is to support specifying a custom volume name to avoid the collision. E.g.,
To Reproduce
ConfigMapandSecretthat has the same name (e.g.,myconfig).Expected behavior
Mount both the
ConfigMapandSecretas a volume.Actual behavior
Error: