0
votes

I am using gcp cloud endpoint with a cloud run backend Service. My Problem is that the backend is configured with a default timeout of 15 seconds. Thats why I would like to set openAPI "x-google-backend" deadline parameter to increase timeout for the endpoint: (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions)

Currently I am using the following grpc service configuration for my endpoint.

https://cloud.google.com/endpoints/docs/grpc/grpc-service-config

openAPI extension is not supported for this kind of configuration. Now I am looking for a way to combine the grpc configuration with openAPI. I have read that it is possible to publish several configuration files for one endpoint.

So, any kind of help would be greatly appreciated.

Thank's a lot, best wishes Joern

1
Do want to have an api GRPC and with Open API (mixed) in the same endpoints service?Jan Hernandez

1 Answers

1
votes

OK, this kind of configuration works well.

type: google.api.Service
config_version: 3
name: ${cloud_run_hostname_endpoint}
title: ${endpoint_title}
apis:
  - name: my_endpoint_name
usage:
  rules:
  # No APIs can be called without an API Key
  - selector: "*"
    allow_unregistered_calls: false
backend:
  rules:
    - selector: "*"
      address: grpcs://${cloud_run_hostname_backend}
      deadline: 300.0

deadline parameter is accepted.