Open sciabarracom opened 1 week ago
To add a bit more of context the idea it is to create a runtime with proxy capabilities which will assume that
--main main@<hostname>:<port>
Under this circumstances, the proxy will have to forward the request to a runtime running at the https://<hostname>:<port>
, but the request has to be rewritten in a way that the --main params is transformed into something like --main main. The format main@<hostname>:<port>
it not understood by any of the OpenWhisk action loop based runtimes, as they are only able to parse something like --main main or --main class#method (for Java).
The runtime proxy (repo: apache/openserverless-runtime) will support proxy with a main in this format:
so you provide for example
--main=main@vastai.nuvolaris.io
the runtime will behave as follow:vastai.nuvolaris.io
and execute the init posting the payloadSome notes on the sintax:
@<proxy>
allows for the default main, so if you provide--main=@<proxy>
it shold forward the request as no main was provide using the defailt for the runtimes<proxy>
is in the format of an internet domainxxx.yyy.zzz
the forwarding should happen with https: protocol, howerver if you usehttp://xxx.yyy.zzz
the forwarding should happen using the http protocolTo awoid security issues, enable the beaviour only if the the variable
OW_USE_PROXY_MAIN
is provided, so we will build a proxy image (that will be just the proxy without anything else)