Current behavior
compDef references (ClusterDefinition topology components, ComponentVersion compatibilityRules, and other prefix/regex reference sites) resolve multi-matches by sorting candidate ComponentDefinition names and picking the last entry (controllers/apps/cluster/transformer_cluster_normalization.go:662-698, selection at :694, main @ aa7f8c8). Zero matches produce a hard error, but multiple matches produce no warning, condition, or event — the selection is invisible unless the user diffs the generated Component's resolved compDef against expectation.
Why it matters
Name-sort selection means an addon chart that ships a new ComponentDefinition (e.g. acmedb-storage-1.10.0 sorting after acmedb-storage-1.9.0) can silently change which definition existing patterns resolve to. Combined with prefix/regex patterns recommended for version management, drift is easy to introduce and hard to notice — today's mitigation is chart unit tests asserting name closure, which not every addon has.
Suggested fix
When a pattern matches more than one ComponentDefinition, surface the resolved choice and the candidate count as an event or condition on the Cluster/Component (e.g. "pattern ^acmedb-storage-.* matched 3 ComponentDefinitions, selected acmedb-storage-1.10.0"). This keeps current semantics but makes the tie-break observable and auditable.
Current behavior
compDefreferences (ClusterDefinition topology components, ComponentVersion compatibilityRules, and other prefix/regex reference sites) resolve multi-matches by sorting candidate ComponentDefinition names and picking the last entry (controllers/apps/cluster/transformer_cluster_normalization.go:662-698, selection at :694, main @ aa7f8c8). Zero matches produce a hard error, but multiple matches produce no warning, condition, or event — the selection is invisible unless the user diffs the generated Component's resolved compDef against expectation.Why it matters
Name-sort selection means an addon chart that ships a new ComponentDefinition (e.g.
acmedb-storage-1.10.0sorting afteracmedb-storage-1.9.0) can silently change which definition existing patterns resolve to. Combined with prefix/regex patterns recommended for version management, drift is easy to introduce and hard to notice — today's mitigation is chart unit tests asserting name closure, which not every addon has.Suggested fix
When a pattern matches more than one ComponentDefinition, surface the resolved choice and the candidate count as an event or condition on the Cluster/Component (e.g. "pattern ^acmedb-storage-.* matched 3 ComponentDefinitions, selected acmedb-storage-1.10.0"). This keeps current semantics but makes the tie-break observable and auditable.