You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/02/15 15:37:58 UTC

[GitHub] [apisix-ingress-controller] gxthrj commented on a change in pull request #845: fix: aviod create pluginconfig in the tranlsation of route (#836)

gxthrj commented on a change in pull request #845:
URL: https://github.com/apache/apisix-ingress-controller/pull/845#discussion_r806974844



##########
File path: pkg/kube/translation/apisix_route.go
##########
@@ -530,17 +530,8 @@ func (t *translator) translateHTTPRouteV2beta3(ctx *TranslateContext, ar *config
 		route.EnableWebsocket = part.Websocket
 		route.Plugins = pluginMap
 		route.Timeout = timeout
-		pluginConfig := apisixv1.NewDefaultPluginConfig()
-		if len(pluginMap) > 0 {
-			pluginConfigName := apisixv1.ComposePluginConfigName(ar.Namespace, backend.ServiceName)
-			route.PluginConfigId = id.GenID(pluginConfigName)
-			pluginConfig.ID = route.PluginConfigId
-			pluginConfig.Name = pluginConfigName
-			pluginConfig.Plugins = pluginMap
-		} else {
-			if part.PluginConfigName != "" {
-				route.PluginConfigId = part.PluginConfigName
-			}
+		if part.PluginConfigName != "" {
+			route.PluginConfigId = part.PluginConfigName

Review comment:
       Yes, This is what needs to be refactored.




-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org