From 7498f481de276c3660319eba3fe70384ef16747e Mon Sep 17 00:00:00 2001 From: qmhu Date: Fri, 26 Aug 2022 12:11:23 +0800 Subject: [PATCH] fix rr selector error --- .../recommendation/recommendation_rule_controller.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/controller/recommendation/recommendation_rule_controller.go b/pkg/controller/recommendation/recommendation_rule_controller.go index 8aa143279..731f620df 100644 --- a/pkg/controller/recommendation/recommendation_rule_controller.go +++ b/pkg/controller/recommendation/recommendation_rule_controller.go @@ -337,15 +337,15 @@ func (c *RecommendationRuleController) getIdentities(ctx context.Context, recomm } for i := range filterdUnstructureds { - k := objRefKey(rs.Kind, rs.APIVersion, unstructureds[i].GetNamespace(), unstructureds[i].GetName()) + k := objRefKey(rs.Kind, rs.APIVersion, filterdUnstructureds[i].GetNamespace(), filterdUnstructureds[i].GetName()) if _, exists := identities[k]; !exists { identities[k] = ObjectIdentity{ - Namespace: unstructureds[i].GetNamespace(), - Name: unstructureds[i].GetName(), + Namespace: filterdUnstructureds[i].GetNamespace(), + Name: filterdUnstructureds[i].GetName(), Kind: rs.Kind, APIVersion: rs.APIVersion, - Labels: unstructureds[i].GetLabels(), - Object: unstructureds[i], + Labels: filterdUnstructureds[i].GetLabels(), + Object: filterdUnstructureds[i], } } }