apache / apache/apisix-ingress-controller
feat: As a sysadmin, I want better feedback on invalid routes, so that i can troubleshoot easier
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 390
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Description
### Description
Currently when an ApisixRoute is not accepted, ** all ** ApisixRoutes are shown as not accepted, and it is not easy to determine which ApisixRoute is at fault. The index of the problem route is indicated, but not the name & namespace.
It would be beneficial to only reject the invalid routes, allowing those that are valid to continue to update the config.
If that is not possible, it would make troubleshooting easier if the message included the namespace & name of the problem route.
## Steps to reproduce:
### Install apisix
```bash
helm install apisix \
--namespace ingress-apisix \
--create-namespace \
--set apisix.deployment.role=traditional \
--set apisix.deployment.role_traditional.config_provider=yaml \
--set etcd.enabled=false \
--set ingress-controller.enabled=true \
--set ingress-controller.config.provider.type=apisix-standalone \
--set ingress-controller.apisix.adminService.namespace=ingress-apisix \
--set ingress-controller.gatewayProxy.createDefault=true \
apisix/apisix
```
### Install a hello-world service
```bash
helm install hello-world \
--namespace hello-world \
--create-namespace \
--version 21.0.8 \
--set image.repository=bitnamilegacy/nginx \
--set global.security.allowInsecureImages=true \
--set-literal serverBlock='server {listen 0.0.0.0:8080;location /hello-world {default_type text/plain;return 200 "Hello, World!";}}' \
oci://registry-1.docker.io/bitnamicharts/nginx
```
### Add a valid route
```bash
kubectl apply -f - << __EOF__
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: hello-world-1
namespace: hello-world
spec:
ingressClassName: apisix
http:
- name: hello-world-1
match:
paths:
- /hello-world-1
backends:
- serviceName: hello-world-nginx
servicePort: 80
__EOF__
```
### Check the route's status
```bash
kubectl get apisixroute -n hello-world hello-world-1 -o yaml | yq .status
```
```yaml
conditions:
- lastTransitionTime: "2026-02-03T18:33:40Z"
message: ""
observedGeneration: 2
reason: Accepted
status: "True"
type: Accepted
```
### Add an invalid route (reference a plugin that does not exist)
```bash
kubectl apply -f - << __EOF__
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: hello-world-2
namespace: hello-world
spec:
ingressClassName: apisix
http:
- name: hello-world-2
match:
paths:
- /hello-world-2
backends:
- serviceName: hello-world-nginx
servicePort: 80
plugins:
- name: non-existent-plugin
enable: true
__EOF__
```
### Verify the new plugin
```bash
kubectl get apisixroute -n hello-world hello-world-2 -o yaml | yq .status
```
```yaml
conditions:
- lastTransitionTime: "2026-02-03T18:36:37Z"
message: 'ServerAddr: http://10.244.0.6:9180, Err: invalid routes at index 1, err: unknown plugin [non-existent-plugin]'
observedGeneration: 1
reason: SyncFailed
status: "False"
type: Accepted
```
### Observe that the original apisixroute is also no longer accepted
```bash
kubectl get apisixroute -n hello-world hello-world-1 -o yaml | yq .status
```
```yaml
conditions:
- lastTransitionTime: "2026-02-03T18:36:37Z"
message: 'ServerAddr: http://10.244.0.6:9180, Err: invalid routes at index 1, err: unknown plugin [non-existent-plugin]'
observedGeneration: 2
reason: SyncFailed
status: "False"
type: Accepted
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the behavior with the two ApisixRoute manifests and inspect their Accepted status using the kubectl commands shown. Determine whether invalid routes can be rejected independently; otherwise, make the failure identify the offending route by namespace and name, then verify that the valid route remains accepted or that the diagnostic is specific.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- api, backend, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100