Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
The volume name gets copied over into the pod name. If the volume name isn't lowercase the pod will fail to schedule.
What you expected to happen:
KubeVirt to automatically strings.ToLower on the volume name so that the pod gets scheduled even if I have uppercase characters in volume name.
How to reproduce it (as minimally and precisely as possible):
Create a vmi/vm with an uppercase letter in volume name.
Anything else we need to know?:
Environment:
virtctl version):kubectl version):uname -a):I think the issue was that the volume name for containerDisk is mapped to the container name of the container disk, right?
I think it is an error that we pass through the volume name here. Instead we should rely on the following:
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
/lifecycle stale
/remove-lifecycle stale
@rmohr Is this something that still needs to be implemented? I can pick up the implementation if needed.
@rmohr Is this something that still needs to be implemented? I can pick up the implementation if needed.
@gageorsburn sounds great!
It still applies that the container name has no meaning for kubevirt.
Can we just add a validating webhook to block this??
I think the volume name should have the same restriction as the pod name.
I think the volume name should have the same restriction as the pod name.
You are right. The issue is that the volume name check is not strict enough ...
Assuming the disk section of the vmi admission hook in virt-api would be the right place to add naming validation for volumes?
Hi @gageorsburn this is the right file but you should validate both volumes and disks. just like on pods you have volumes and mounts
Most helpful comment
Can we just add a validating webhook to block this??
I think the volume name should have the same restriction as the pod name.