gRPC Transcoding with Istio

#1

I’m trying to deploy one service using Istio, this application will receive HTTP2 and HTTP1 calls, for the HTTP1 calls we need to do a GRPC Transcode, with envoy locally we used the following configuration and worked:

admin:
access_log_path: /tmp/admin_access.log
address:
socket_address: { address: 0.0.0.0, port_value: 9901 }

static_resources:
listeners:
- name: listener1
address:
socket_address: { address: 0.0.0.0, port_value: 51051 }
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
stat_prefix: grpc_json
codec_type: AUTO
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match: { prefix: “/” }
route: { cluster: grpc, timeout: { seconds: 60 } }
http_filters:
- name: envoy.filters.http.jwt_authn
config:
providers:
provider1:
issuer: FQDN
local_jwks:
inline_string: ’
{
“keys”: [
{
“…”
}
]
}

rules:
- match:
prefix: /
requires:
provider_name: provider1
- name: envoy.grpc_json_transcoder
config:
proto_descriptor: “/data/address_definition.pb”
services: [“wally.AddressService”]
print_options:
add_whitespace: true
always_print_primitive_fields: true
always_print_enums_as_ints: false
preserve_proto_field_names: false
- name: envoy.router
clusters:
- name: grpc
connect_timeout: 1.25s
type: logical_dns
lb_policy: round_robin
dns_lookup_family: V4_ONLY
http2_protocol_options: {}
hosts:
- socket_address:
address: 127.0.0.1
port_value: 50051
- name: ext-authz
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
hosts:
- socket_address:
address: 127.0.0.1
port_value: 8080

But I was not able to convert and use this to Istio, the service is UP but the HTTP1 call doesn’t work as intended:

curl -I -X GET ‘http://foo.com/v1/reverse-geocode?placeId=foobar’  16:57:23 
HTTP/1.1 415 Unsupported Media Type
content-type: text/plain; encoding=utf-8
grpc-status: 13
grpc-message: Content-Type is missing from the request
x-envoy-upstream-service-time: 3
date: Fri, 22 Mar 2019 19:57:20 GMT
server: envoy
transfer-encoding: chunked

Someone could help me, please ?

ps.: I’ve used this https://www.tetrate.io/blog/grpc-transcoding-with-istio/ as a guide

0 Likes