apisix-ingress-controller icon indicating copy to clipboard operation
apisix-ingress-controller copied to clipboard

bug: Incomplete display of the ApisixRoute

Open nfrankel opened this issue 3 years ago • 1 comments

Issue description

Here's my definition of an ApisixRoute:

apiVersion: apisix.apache.org/v2beta3
kind: ApisixRoute
metadata:
  name: apisix-route
spec:
  http:
  - name: left
    match:
      paths:
      - "/left"
    backends:
    - serviceName: left
      servicePort: 80
  - name: right
    match:
      paths:
        - "/right"
    backends:
    - serviceName: right
      servicePort: 80

After it has been applied, I want to check the object:

k get apisixroute

Only left appears in the URL:

NAME           HOSTS   URIS        AGE
apisix-route           ["/left"]   26

It's misleading: both /left and /right should be listed.

Environment

  • your apisix-ingress-controller version (output of apisix-ingress-controller version --long):
Version: 1.4.1
Git SHA: no-git-module
Go Version: go1.16.15
Building OS/Arch: linux/amd64
Running OS/Arch: linux/amd64
  • your Kubernetes cluster version (output of kubectl version):
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-08-23T17:36:43Z", GoVersion:"go1.19", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-09-01T23:34:08Z", GoVersion:"go1.19", Compiler:"gc", Platform:"linux/arm64"}
  • if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):
Darwin Nico 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 arm64

Minimal test code / Steps to reproduce

  1. Install the Apache APISIX Ingress Controller
  2. Apply the above route
  3. Get the route

Actual result

See above

Error log

None

Expected result

No response

nfrankel avatar Sep 13 '22 07:09 nfrankel

Thanks for your report.

The problem does exist, you can see the corresponding configuration from here

https://github.com/apache/apisix-ingress-controller/blob/85bcfbc9f5e697f367c33382a7410b446dc39cbb/samples/deploy/crd/v1/ApisixRoute.yaml#L302-L305

But we can't deal with this problem at present, this is due to the internal implementation limitation of Kubernetes, currently only the first one in the list can be displayed. Once upstream has modified this logic, we can also correct it.

https://github.com/kubernetes/kubernetes/blob/0f37b3120643580f632ca12d3e174e7ec447948c/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor.go#L116-L135

tao12345666333 avatar Sep 13 '22 08:09 tao12345666333

This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Dec 28 '22 01:12 github-actions[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

github-actions[bot] avatar Jan 27 '23 01:01 github-actions[bot]