You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/07/17 10:29:08 UTC
[GitHub] [apisix-ingress-controller] Liulimingxx edited a comment on issue #597: Improve practices document,apisix.apache.org/v2beta1 is deprecated
Liulimingxx edited 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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org