The second model read the same diff and reached five defects the
single-model pass did not, all in code this branch added.
A sibling pool answered for a pool that had never cloned. The
already-cloned gate matched worker disks by the name prefix
disk-system-<cluster>-<pool>-, and a pool named md0-gpu produces disks
carrying md0's prefix. With the golden absent or Failed, md0's guards
were suppressed by md0-gpu's disk and md0's new workers pointed at a
source that was gone -- silently, which is the outcome the guards exist
to prevent. Each cloned disk now names its own pool in an annotation and
the match is exact. This only touches the clone path, so no existing
worker's template changes.
A golden that declares no StorageClass sits on whatever default was in
force when CDI bound its PVC, not on today's. Substituting the current
default for it could wave through a cross-class copy or refuse a pool
that does match. The class now comes from the PVC, which is where the
concrete value lives.
More than one StorageClass may carry the default annotation at once --
the normal state midway through swapping a cluster's default -- and
Kubernetes resolves it by creation time. The helper emitted every match
concatenated, producing a class name that does not exist and refusing a
pool whose class matched the default actually in force. It now picks the
most recently created, as Kubernetes does.
A Talos version was accepted without its patch segment. Both regexes
took vMAJOR.MINOR, which names an artifact the Image Factory does not
publish and an installer tag that does not exist, so the failure landed
in the guest instead of at render.
And the remedy printed by the cross-class guard could not be followed.
The previous commit pointed it at the catalog entry's storageClass; the
immutability guard added by this same branch rejects that edit once the
golden exists, which is the only state in which this branch runs. The
message now names the two moves that work: a new (schematicID, version)
entry on the right class with the pool repointed at it, or deleting the
golden once nothing clones it.
Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>