caibirdme commented on issue #1091:
URL:
https://github.com/apache/apisix-ingress-controller/issues/1091#issuecomment-1160602371
After changing to v2beta3, I succed to create uptream, but it didn't work.
I want to proxy grpc and use plaintext(no tls):
This is my svc:
```
kubectl get svc -n vector
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
AGE
vector ClusterIP a.b.c.d <none>
9598/TCP,6788/TCP 6d8h
vector-headless ClusterIP None <none>
9598/TCP,6788/TCP 6d8h
```
This is my route.yaml
```yaml
apiVersion: "apisix.apache.org/v2beta1"
kind: ApisixRoute
metadata:
namespace: vector
name: otel-log-route
spec:
http:
- name: otel-log-ingester
match:
paths:
- "/opentelemetry.proto.collector.logs.v1.LogsService/Export"
hosts:
- camp.apisix.woa.com
backend:
serviceName: vector
servicePort: 6788
```
and this is upstream.yaml
```yaml
apiVersion: apisix.apache.org/v2beta3
kind: ApisixUpstream
metadata:
namespace: vector
name: vector
spec:
scheme: grpc
```
When I curl domain/opentelemetry.proto.collector.logs.v1.LogsService/Export,
ingress-controller panic
```
panic: runtime error: index out of range [0] with length 0
goroutine 137 [running]:
github.com/apache/apisix-ingress-controller/pkg/kube/translation.(*translator).translateHTTPRouteV2beta3NotStrictly(0xc00031a2c0,
0xc000d97280, 0xc0007a22c0, 0x160, 0x1bf6b80)
/build/controller/pkg/kube/translation/apisix_route.go:648 +0xad5
github.com/apache/apisix-ingress-controller/pkg/kube/translation.(*translator).TranslateRouteV2beta3NotStrictly(0xc00031a2c0,
0xc0007a22c0, 0xc00061a1c0, 0x0, 0x0)
/build/controller/pkg/kube/translation/apisix_route.go:209 +0x85
github.com/apache/apisix-ingress-controller/pkg/ingress.(*Controller).CompareResources.func1.1(0xc0006169d0,
0xc000250000, 0x1fdcb10, 0xc00061a1c0, 0xc000908390, 0xc0009083c0,
0xc0009083f0, 0xc000908420, 0xc000908480, 0xc000908450, ...)
/build/controller/pkg/ingress/compare.go:78 +0x67a
created by
github.com/apache/apisix-ingress-controller/pkg/ingress.(*Controller).CompareResources.func1
/build/controller/pkg/ingress/compare.go:68 +0x178
```
and the log from apisix deployment:
```
[20/Jun/2022:23:42:20 +0800] camp.apisix.woa.com:8081 "POST
/opentelemetry.proto.collector.logs.v1.LogsService/Export HTTP/2.0" 404 36
0.000 "-" "grpc-go/1.47.0" - - - "http://camp.apisix.woa.com:8081"
```
--
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]