apisix
apisix copied to clipboard
fix: fix `namespaces` in informer factory
Description
This PR fix url path splicing bug.
endpoints api url: /api/v1/namespaces/{namespace}/endpoints/{name}
ref: https://docs.openshift.com/container-platform/4.8/rest_api/network_apis/endpoints-core-v1.html#apiv1namespacesnamespaceendpointsname
Checklist
- [x] I have explained the need for this PR and the problem it solves
- [x] I have explained the changes or the new features added to this PR
- [x] I have added tests corresponding to this change
- [x] I have updated the documentation to reflect this change
- [ ] I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)
@dongjiang1989 please explain your bugfix, why is it required and also add test cases. Thanks.
@dongjiang1989 please explain your bugfix, why is it required and also add test cases. Thanks.
This is url path splicing bug.
endpoints api url: /api/v1/namespaces/{namespace}/endpoints/{name}
ref: https://docs.openshift.com/container-platform/4.8/rest_api/network_apis/endpoints-core-v1.html#apiv1namespacesnamespaceendpointsname
Could you add test cases to cover this?
@dongjiang1989 you could follow these test cases: https://github.com/apache/apisix/blob/master/t/kubernetes/discovery/kubernetes2.t
@dongjiang1989 you could follow these test cases: https://github.com/apache/apisix/blob/master/t/kubernetes/discovery/kubernetes2.t
Thanks. I got it!
If possible, please also provide some reproduction steps to show how the current state leads to a bug/failure. Thanks.
@zhixiongdu027 Could you help to review this pr?
ignore e2e test case
It's a very little typo, @AlinsRan and i have checked twice, so i think missing test cases is ok
A little weird I want to say, does this mean that before this pr being merged, the apisix k8s discovery function is always broken?