From 6025119460b58240d65274434ecd48bddf67a575 Mon Sep 17 00:00:00 2001 From: wangyelei Date: Fri, 27 Sep 2024 10:43:35 +0800 Subject: [PATCH] fix comp bug --- controllers/apps/componentversion_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } }