Files
Aleksei Sviridkin 3d5f9f2f69 fix(vm-disk): refuse to clone a golden image that does not exist
A new disk on source.image turns the name into a clone of
cozy-public/vm-default-images-<name> without looking it up. When that
golden does not exist, because of a typo or because the opt-in
vm-default-images package is not enabled, CDI records
CloneWithoutSource on the DataVolume and waits forever, while the
VMDisk stays Ready and the user never sees why.

Fail the render instead, naming the image and cozy-public, the same way
a golden whose import Failed is already refused. The golden counts as
missing only when neither its DataVolume nor its PVC exists: CDI
clones the PVC, so a PVC with no DataVolume is a usable source, and a
DataVolume whose PVC CDI has not created yet is an import about to
start. An empty lookup only means "missing" when the release namespace
itself is visible; under helm template every lookup is empty and the
chart must still render. Existing disks stay exempt, as their
DataVolume spec is immutable.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-29 22:15:59 +03:00
..