The ScaleFunction request supports specifying the function namespace.
This is now included in the API spec.
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
Adds CRUD for namespaces and moves namespace for delete/
scale to the body from the query string.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
Convert the existing swagger2.0 file to a moden OpenAPI file.
Add missing endpoitns and model definitions.
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
This is not related to the Go version being used, but the min
version a developer can use to contribute.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
Scaling ranges keep the OpenFaaS CE gateway's requests to
within the intended bounds already implemented in other
components.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
OpenFaaS CE exposes metrics about function invocations and
about the gateway itself. OpenFaaS Pro has a richer set of
metrics including HTTP RED.
See also: https://docs.openfaas.com/architecture/metrics/
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
NATS Streaming is deprecated and will be removed from OpenFaaS
CE in a future release for security reasons.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Sets a new default maximum scale limit of 5 replicas out of
the box for CE users, CE meaning "Community" rather than
"Commercial".
The increment factor of 10 vs 25 should not make a difference
to genuine community and hobbyist users.
Tested and verified with unit tests and hey with a CE cluster
where the maximum limit was reached over several minutes,
finally going back to 1 replica.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
There is no need for OpenFaaS CE to have external auth plugins
since this added extra overhead and was never used.
OpenFaaS Pro retains the option so it can use the OIDC
auth plugin.
It's still possible, as it ever was to put a proxy in front
of any HTTP server like the gateway.
Tested with a local KinD cluster, auth still worked for the
API and UI.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
This change removes the direct functions option which was
used originally for Docker Swarm. The Community Edition will
rely on the faas provider - faas-netes / faasd for load-balancing
of requests.
Direct Functions is required in order to delegate load-balancing
to Istio, Linkerd or some other kind of service mesh.
Tested by deploying a modified gateway image to a KinD cluster,
deploying the env function, and scaling to two replicas. This
balanced the load between the two pods by printing out the names
and then I ran a test with hey which returned 200s for all the
requests.
The prober which was part of the Istio support is no longer
required in the CE gateway so is removed for simplicity.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
NATS Streaming is deprecated and will have no support from
early 2023 by Synadia. Upgrade to OpenFaaS Pro as soon as
possible.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
Return the original upstream response body when the the list request
returns an error. In general, the provider is returning useful and
actionable error messages for the user, the previous code hid this in
the logs and this is easy for user to overlook.
Additionally, remove an early return from error case after fetching
metrics. This looked like a bug and could result in empty api responses
if there was a prometheus error.
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
We now have two write interceptors, with one moved into
faas-provider. This commit makes the gateway use the new
external package and deletes its own.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>