ASMGrpcJsonTranscoder CRD description
ASMGrpcJsonTranscoder is used for JSON/HTTP-gRPC protocol transcoding. Configure the following fields to transcode HTTP/JSON requests to gRPC.
Fields
|
Field |
Type |
Required |
Description |
|
workloadSelector |
map<string, string> |
Yes |
Uses one or more labels to specify a particular set of Pods to which the configuration applies. The scope of the label search is limited to the configuration namespace where the resource resides. For more information, see WorkloadSelector. |
|
isGateway |
bool |
No |
A value of true indicates that the configuration applies to a gateway. Default value: false. |
|
portNumber |
int |
Yes |
The service port that corresponds to the configuration. If the configuration is associated with a gateway, this is the port defined on that gateway where protocol transcoding is required (for example, 8080). |
|
services |
string[] |
Yes |
Specifies the services that the configuration declares in the proto file. The format is
|
|
protoDescriptorBin |
string |
Yes |
The result of Base64-encoding the content of the generated proto descriptor file. Make sure that the value contains Base64-encoded content. |
|
transcodeFirst |
bool |
No |
Default value: false. If you set this field to true, the HTTP request is transcoded first and then processed by other operations. This may affect some traffic processing capabilities that depend on the request. For example, for a custom external authorization service, if the request is transcoded first, the external authorization service receives a gRPC request; otherwise, it receives an HTTP request. |
|
convertGrpcStatus |
bool |
No |
Default value: false. Specifies whether to convert gRPC status headers to JSON. If this field is set to true and the upstream service returns a gRPC error with no HTTP body response, the For example, if the upstream service responds with the following headers:
The gRPC status details binary header contains a Base64-encoded protobuf message
|
|
ignoredQueryParameters |
[]string |
No |
The list of query parameters to ignore when the transcoding filter maps methods. By default, if any unknown or invalid query parameters exist, the transcoding filter does not transcode the request. After you declare the HTTP request query parameters to ignore in ignoredQueryParameters, these parameters are ignored when they appear in the request, and the request is still transcoded. |
|
ignoreUnknownQueryParameters |
bool |
No |
Specifies whether to ignore HTTP request query parameters that cannot be mapped to the corresponding protobuf fields. Use this option if you cannot predict the query parameters. Otherwise, use ignoredQueryParameters. Important
When both |
References
Transcode HTTP/JSON requests to gRPC with ASMGrpcJsonTranscoder