neverCase commented on a change in pull request #845:
URL:
https://github.com/apache/apisix-ingress-controller/pull/845#discussion_r808851238
##########
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:
ok, I will refactor it right now
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]