Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: the tranlsation of route with plugin_config is pathological #836

Closed
tokers opened this issue Jan 13, 2022 · 3 comments · Fixed by #845
Closed

bug: the tranlsation of route with plugin_config is pathological #836

tokers opened this issue Jan 13, 2022 · 3 comments · Fixed by #845
Assignees
Labels
bug Something isn't working
Milestone

Comments

@tokers
Copy link
Contributor

tokers commented Jan 13, 2022

Issue description

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

The code snippet pasted above has two problems:

1). The plugin config id generation should not rely on the name of backend service name, which will cause all routes with the same backend generated with the same plugin config id.
2). add the plugin_config id reference even if users don't specify the plugin config on the ApisixRoute explicitly

Environment

  • your apisix-ingress-controller version (output of apisix-ingress-controller version --long):
  • your Kubernetes cluster version (output of kubectl version):
  • if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):

Minimal test code / Steps to reproduce

Nope.

Actual result

Nope.

Error log

Nope.

Expected result

No response

@tao12345666333 tao12345666333 added the bug Something isn't working label Jan 13, 2022
@tao12345666333 tao12345666333 added this to the 1.5.0 milestone Jan 13, 2022
@tao12345666333 tao12345666333 self-assigned this Jan 13, 2022
@tao12345666333
Copy link
Member

cc @neverCase

@neverCase
Copy link
Contributor

ok, got it.

neverCase added a commit to neverCase/apisix-ingress-controller that referenced this issue Jan 25, 2022
@tao12345666333 tao12345666333 linked a pull request Mar 2, 2022 that will close this issue
8 tasks
@tao12345666333
Copy link
Member

#845 has been merged. I will close this issue. If you have any question, feel free to reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants