This project provides APIs to interact with the workloads deployed by the operator. It also replaces the legacy proxy
component.
- /apis/functions/ The functions API
- /apis/system/ The system API
- /apis/workspaces/ The workspaces API
- /healthz/ Returns the gateway's health status.
- /metrics/ Returns metrics for Prometheus scraping
- /proxy/ Proxies requests to functions
- /proxy-async/ Proxies asynchronous requests to functions
The gateway itself is a function, even though it can't be proxied (for obvious reasons). However, this means that the metrics generated by the gateway are also used to automatically scale itself.
Because the gateway is used to proxy requests to the functions, it can't be scaled to zero. The maximum number of replicas can be adjusted when deploying; default is 20, same as other functions.
Workspaces are a way of isolating functions. In some situations, a user won't have access to all namespaces, including faas
namespace. That would incapacitate users from executing functions through the gateway and from creating an ingress for their functions, since the ingress needs to exist in the same namespace as the gateway. Workspaces resolve that.
When a new workspace is created (custom CRD), a separate namespace is created and in it, a gateway function. This separate gateway is what will allow isolated users to invoke functions or create ingresses in the same namespace.
For the metrics to be available, the gateway in the faas
namespace collects metrics from all other gateways installed in workspace namespaces and make them available to Prometheus.