Unable to transcode

Hi guys,

I’m having issues transcoding a service using Istio/Envoy, when I call the gRPC service, it works well but when I send a GET HTTP1 request to the service, I get a 415, here are the manifests:

Version:

❯ istioctl version
client version: 1.14.1
control plane version: 1.14.3
data plane version: 1.14.3 (12 proxies)

EnvoyFilter:

apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
# https://cloudnative.to/envoy/api-v2/config/filter/http/transcoder/v2/transcoder.proto.html
metadata:
  name: simpli-echo-me-qa
spec:
  workloadSelector:
    labels:
      app: simpli-echo-me-qa
  configPatches:
  - applyTo: HTTP_FILTER
    match:
      context: SIDECAR_INBOUND
      listener:
        filterChain:
          filter:
            name: envoy.filters.network.http_connection_manager
            subFilter:
              name: envoy.filters.http.router
        portNumber: 9090
    patch:
      operation: INSERT_FIRST
      value:
        name: envoy.filters.http.grpc_json_transcoder
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder
          services:
          - simpli.simpli_echo_bruno.SimpliEchoMeService
          # print options - https://github.com/envoyproxy/envoy/blob/3e33879ac021161f8ad60182fa063320ee2d46d0/api/envoy/config/filter/http/transcoder/v2/transcoder.proto
          print_options:
            add_whitespace: true
            always_print_enums_as_ints: false
            always_print_primitive_fields: true
            preserve_proto_field_names: false
          convert_grpc_status: true
          proto_descriptor: /mnt/proto/proto.pb

Gateway:


apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: simpli-gateway-qa
spec:
  selector:
    istio: ingressgateway 
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP2  
    hosts:
    - simpli-api-qa.XXXXXX.com
    tls:
      httpsRedirect: true
  - port:
      number: 443
      name: https
      protocol: HTTPS
    hosts:
    - simpli-api-qa.XXXXXX.com
    tls:
      mode: SIMPLE
      credentialName: XXXXXX-https-secret 

VirtualService:

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: simpli-echo-me-qa
spec:
  hosts:
  - simpli-api-qa.xxxxxxx.com
  gateways:
  - simpli-gateway-qa
  http:
  - match:
    - uri: # HTTP
        prefix: /simpli.simpli_echo_bruno.SimpliEchoMeService/hi
    - uri: # GRPC
        prefix: /simpli.simpli_echo_bruno.SimpliEchoMeService/SayHi
    route:
    - destination:
        port:
          number: 9090
        host: simpli-echo-me-qa.default.svc.cluster.local
    corsPolicy:
      allowOrigin:
      - "*"

Service:

apiVersion: v1
kind: Service
metadata:
  name: simpli-echo-me-qa
spec:
  selector:
    app: simpli-echo-me-qa
  ports:
    - name: http2
      protocol: TCP
      port: 9090
      targetPort: 9090

Thank you!

Hello, I have encountered the same problem as you, do you have a solution now, looking forward to your reply。

1 Like