diff --git a/controllers/apps/componentversion_controller.go b/controllers/apps/componentversion_controller.go index 2ff2f3f3bc7..17ac91257dd 100644 --- a/controllers/apps/componentversion_controller.go +++ b/controllers/apps/componentversion_controller.go @@ -122,7 +122,7 @@ func (r *ComponentVersionReconciler) compatibleCompVersion(ctx context.Context, func (r *ComponentVersionReconciler) isCompatibleWith(compDef appsv1alpha1.ComponentDefinition, compVer appsv1alpha1.ComponentVersion) bool { for _, rule := range compVer.Spec.CompatibilityRules { for _, name := range rule.CompDefs { - if strings.HasPrefix(compDef.Name, name) { + if component.CompDefMatched(compDef.Name, name) { return true } }