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

request help: user ingressClass, modify the ingressClassof the route, and the old route does not become invalid. #2231

Open
VanLiuZhi opened this issue May 8, 2024 · 0 comments

Comments

@VanLiuZhi
Copy link

VanLiuZhi commented May 8, 2024

Issue description

I have deployed two Ingresses, and I am now using the ingressClass to publish routes to two controllers, now everything is fine.

If I change the ingressClass of route A to the same as route B, both Ingresses will have this record, which means that route A will not delete it.

route A

apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
  name: apisix-dashboard-rd
  namespace: ingress-apisix
spec:
  ingressClassName: apisix-rd
  http:
    - backends:
        - serviceName: apisix-dashboard
          servicePort: 80
      match:
        hosts:
          - apisix-admin-rd.test.com
        paths:
          - /*
      name: route

route B

apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
  name: apisix-dashboard
  namespace: ingress-apisix
spec:
  ingressClassName: apisix
  http:
    - backends:
        - serviceName: apisix-dashboard
          servicePort: 80
      match:
        hosts:
          - apisix-admin.test.com
        paths:
          - /*
      name: route

The general workflow;

routeA  => ingressClassName: apisix-rd
routeB  => ingressClassName: apisix
ingressA route list => [ apisix-dashboard-rd ]
ingressB route list => [ apisix-dashboard ]

change routeA:

routeA  => ingressClassName: apisix
routeB  => ingressClassName: apisix
ingressA route list => [ apisix-dashboard-rd]
ingressB route list => [ apisix-dashboard, apisix-dashboard-rd]

I suspect that there is a data synchronization issue. After adjusting the synchronization parameters:

kubernetes:
  kubeconfig: ""
  resync_interval: "60s"

I found that the route information remains unchanged after the data is updated.

Is it designed this way, or is it a bug?

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):

apisix-ingress-controller version: 1.7.1
Kubernetes: 1.26.10
apisix: 3.8.0
linux: 4.18.0 x86_64

@VanLiuZhi VanLiuZhi changed the title request help: user ingressClass,modify the ingressClassof the route, and the old route does not become invalid. request help: user ingressClass, modify the ingressClassof the route, and the old route does not become invalid. May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant