echogen
is a util for generating Kubernetes manifests from echo configurations.
go install istio.io/pkg/test/framework/components/echo/echogen
echogen [opts] config.yaml
The config file is YAML containing a list of echo.Config objects:
- Service: a Namespace: echo - Service: headless Namespace: echo Headless: true
echogen
supports all options from the test framework that would affect Echo deployments such as: istio.test
, .imagePullSecret
, istio.test.hub
and several others.
In addition to the framework level options:
-out <file>: Write output to the specified file -dir: If specified, each deployment will be written to a separate file, in a directory named by -out.
Make sure to install gRPC UI if you haven't already
Create an echogen
config:
echo ' - Service: a Namespace: echo - Service: b Namespace: echo ' > config.yaml
echogen
:echogen -out echo.yaml config.yaml
kubectl apply -f echo.yaml
kubectl -n echo port-forward a-v1-fc649d9fc-59rkj 17070
grpcui -plaintext localhost:17070
Because our echo gRPC service enables reflection, you should be able to open your browser and get a user interface that shows all of the possible methods and request options.
Change the “Method name” to ForwardEcho
, then in “Request Data” set url
to grpc://b:7070
then click Invoke
(Bonus) If you open the “Raw Request (JSON)” tab, you can re-use that for requests via grpcurl without constructing JSON by hand:
grpcurl -plaintext localhost:17070 EchoTestService/ForwardEcho -d '{"url": "grpc://b:7070"}'