nithinkxx removed a comment on issue #597:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/597#issuecomment-881873339


   ```apiVersion: apisix.apache.org/v2beta1
   kind: ApisixRoute
   metadata:
     name: method-route
     namespace: test
   spec:
     http:
       - name: method
         match:
           paths:
             - /xx/ingress*
           methods:
             - GET
         backends:
           - serviceName: nginx-service
             servicePort: 80
   ```
   
   this apisix.apache.org/v2beta1 version route yaml got apisixroute group 
version  apisix.apache.org/v2alpha1
   maybe have problem with the MustNewApisixRoute function
   ```
   // MustNewApisixRoute creates a kube.ApisixRoute object according to the
   // type of obj.
   func MustNewApisixRoute(obj interface{}) ApisixRoute {
        switch ar := obj.(type) {
        case *configv1.ApisixRoute:
                return &apisixRoute{
                        groupVersion: ApisixRouteV1,
                        v1:           ar,
                }
        case *configv2alpha1.ApisixRoute:
                return &apisixRoute{
                        groupVersion: ApisixRouteV2alpha1,
                        v2alpha1:     ar,
                }
        case *configv2beta1.ApisixRoute:
                return &apisixRoute{
                        groupVersion: ApisixRouteV2beta1,
                        v2beta1:      ar,
                }
        default:
                panic("invalid ApisixRoute type")
        }
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to