tokers commented on a change in pull request #845: URL: https://github.com/apache/apisix-ingress-controller/pull/845#discussion_r812694516
########## File path: pkg/kube/translation/apisix_route.go ########## @@ -977,13 +964,6 @@ func (t *translator) translateHTTPRouteV2beta3NotStrictly(ctx *TranslateContext, route := apisixv1.NewDefaultRoute() route.Name = apisixv1.ComposeRouteName(ar.Namespace, ar.Name, part.Name) route.ID = id.GenID(route.Name) - pluginConfig := apisixv1.NewDefaultPluginConfig() Review comment: Well, I mean `translateHTTPRouteV2beta3NotStrictly` is basically same to `translateHTTPRouteV2beta3`, so here you should also set the plugin config id. ########## File path: pkg/ingress/apisix_route.go ########## @@ -237,27 +234,20 @@ func (c *apisixRouteController) sync(ctx context.Context, ev *types.Event) error return c.controller.syncManifests(ctx, added, updated, deleted) } -func (c *apisixRouteController) replacePluginNameWithIdIfNotEmptyV2beta3(ctx context.Context, in *v2beta3.ApisixRoute) (*v2beta3.ApisixRoute, error) { - clusterName := c.controller.cfg.APISIX.DefaultClusterName - news := make([]v2beta3.ApisixRouteHTTP, 0) +func (c *apisixRouteController) checkPluginNameIfNotEmptyV2beta3(ctx context.Context, in *v2beta3.ApisixRoute) error { for _, v := range in.Spec.HTTP { - pluginConfigId := "" if v.PluginConfigName != "" { - pc, err := c.controller.apisix.Cluster(clusterName).PluginConfig().Get(ctx, apisixv1.ComposePluginConfigName(in.Namespace, v.PluginConfigName)) + _, err := c.controller.apisix.Cluster(c.controller.cfg.APISIX.DefaultClusterName).PluginConfig().Get(ctx, apisixv1.ComposePluginConfigName(in.Namespace, v.PluginConfigName)) if err != nil { - log.Errorw("replacePluginNameWithIdIfNotEmptyV2beta3 error: plugin_config not found", Review comment: Should distinguish the error type, not all errors are "not found". -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org