2165 Commits

Author SHA1 Message Date
Lucas Roesler
06ade37420 feat: refactor api spec to use OpenAPI and add missing spec
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>
2023-06-28 08:33:03 +01:00
Alex Ellis (OpenFaaS Ltd)
910b8dae1b Update go.mod to 1.19 spec
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>
2023-06-07 16:07:11 +01:00
Alex Ellis (OpenFaaS Ltd)
00613347f8 Implement scaling ranges
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>
2023-06-07 16:05:37 +01:00
Valentin Nourdin
e0144b0573 Add Valentin Nourdin as an adopter
Closes: #1793 by @vnourdin

Signed-off-by: Valentin Nourdin <valentin.nourdin@lilo.org>
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2023-05-31 15:14:17 +01:00
Alex Ellis (OpenFaaS Ltd)
4315101191 Add Corva
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2023-05-21 10:21:08 +01:00
Alex Ellis (OpenFaaS Ltd)
b4b7e2d450 Update OSS ADOPTERS
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2023-05-03 15:42:19 +01:00
Nitishkumar Singh
0972fa6093 update community guide
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
2023-04-16 22:43:49 +02:00
Nitishkumar Singh
e44448c5dc update community guide for latest blogs and post
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
2023-03-17 10:01:58 +00:00
Nitishkumar Singh
bf63bbf88f Added Blog Post and Videos
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
2023-03-07 18:47:05 +00:00
Alex Ellis (OpenFaaS Ltd)
a128df471f Function-based metrics for CE
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>
2023-01-28 09:10:48 +00:00
Alex Ellis (OpenFaaS Ltd)
c26ec5221e Updates for NATS Streaming support
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>
2023-01-17 21:55:48 +00:00
Alex Ellis (OpenFaaS Ltd)
8e1c34e222 Set default max scale to 5 replicas and a 10% increment
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>
2023-01-17 21:16:32 +00:00
Alex Ellis (OpenFaaS Ltd)
21a8f0cec1 Update GHA for deprecations
The actions from Docker needed to be updated due to
deprecations.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2023-01-12 10:19:39 +00:00
Alex Ellis (OpenFaaS Ltd)
8d38b4befe Update to EULA Jan 2023
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2023-01-12 10:18:55 +00:00
Alex Ellis (OpenFaaS Ltd)
1fc7bbce4e Remove auth plugins
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2023-01-11 13:13:28 +00:00
Alex Ellis (OpenFaaS Ltd)
231e3ed426 Remove builds for auth plugins
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2023-01-11 13:13:12 +00:00
Alex Ellis (OpenFaaS Ltd)
fbc0ebdf4a Add comment to middleware
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2023-01-11 13:10:46 +00:00
Alex Ellis (OpenFaaS Ltd)
4f9c61b5d2 Deprecate external auth plugins
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>
2023-01-11 12:22:12 +00:00
Alex Ellis (OpenFaaS Ltd)
a7d486eee6 Make OpenFaaS CE use the provider for load-balancing
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>
2023-01-11 12:12:26 +00:00
流雨声
b1ef4b49b7 fix: use io.ReadAll replace ioutil.ReadAll
ioutil.ReadAll will delete in future

Signed-off-by: 流雨声 <212724256@qq.com>
2022-12-14 17:18:08 +00:00
Alex Ellis (OpenFaaS Ltd)
f9245ebbb3 Add write permissions to GHCR
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-12-14 12:12:31 +00:00
Alex Ellis (OpenFaaS Ltd)
f3599f4699 Apply gofmt
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
0.25.4
2022-12-14 11:40:43 +00:00
Alex Ellis (OpenFaaS Ltd)
3bafff7e09 Fix issue with empty CI tag
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-12-14 11:33:42 +00:00
Alex Ellis (OpenFaaS Ltd)
e3171b49b0 Remove old ROADMAP
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-12-14 11:32:20 +00:00
Alex Ellis (OpenFaaS Ltd)
e1c62f4875 Update Go and alpine versions
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-12-14 11:30:41 +00:00
Alex Ellis (OpenFaaS Ltd)
b31419c8de Fix CI for deprecated set_output
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-12-14 11:29:08 +00:00
Alex Ellis (OpenFaaS Ltd)
004bbddadb Update queue code for legacy NATS Streaming
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>
2022-12-14 11:24:45 +00:00
Alex Ellis (OpenFaaS Ltd)
88bedf78bd Update ADOPTER
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-12-14 11:24:45 +00:00
Alex Ellis (OpenFaaS Ltd)
9d0436e511 Update README intro
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-12-06 21:12:58 +00:00
Lucas Roesler
c07bebbbc9 fix: return provider response during fnc listing errors
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>
2022-10-24 18:23:49 +01:00
Alex Ellis
208b1b2235
Update ISSUE_TEMPLATE.md
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2022-10-24 11:47:46 +01:00
Arne Diekmann
0255a9480b Add ADOPTER
Signed-off-by: Arne Diekmann <diekmann@neoskop.de>
2022-10-24 11:35:03 +01:00
Alex Ellis (OpenFaaS Ltd)
f7f71f1497 Add Klar to ADOPTERS
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-10-24 10:54:44 +01:00
Alex Ellis (OpenFaaS Ltd)
03b6d6c01b Add another user to ADOPTERS
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-10-20 13:27:28 +01:00
Alex Ellis (OpenFaaS Ltd)
efffd83990 Add ADOPTER
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-10-20 09:30:46 +01:00
Alex Ellis (OpenFaaS Ltd)
06433e11c0 Add ADOPTER
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-10-20 09:29:24 +01:00
Alex Ellis (OpenFaaS Ltd)
806585b434 Update some missing ADOPTERS
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-10-20 09:27:26 +01:00
Alex Ellis
32b828b25e
Update ADOPTERS.md
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2022-10-13 08:54:23 +01:00
Simon Renault
bb163760ff HelloSafe
Signed-off-by: Simon Renault <94172348+SimonRenault86@users.noreply.github.com>
2022-10-11 20:42:14 +01:00
Alex Ellis (OpenFaaS Ltd)
1a00a55c77 Use write interceptor from faas-provider
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>
2022-09-29 20:36:40 +01:00
Alex Ellis (OpenFaaS Ltd)
bc2eeff467 Improve errors when backend doesn't return JSON
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-09-21 09:09:48 +01:00
Alex Ellis (OpenFaaS Ltd)
887c804254 Improve error message when unable to list functions
Related to: #1022

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-09-21 08:53:04 +01:00
Alex Ellis
9da2ec244f
Update ISSUE_TEMPLATE.md
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2022-09-13 09:02:04 +01:00
Alex Ellis (OpenFaaS Ltd)
8e711b3a0c Use Desired Replicas when scaling from zero
During some exploratory testing, I ran into an issue where
the gateway would attempt to scale a deployment from zero
replicas to min, despite there already being min replicas.

Why?

The scaling logic was looking for Available replicas when
it should have looked for Desired replicas. So when a
deployment had zero ready replicas due to readiness checks
failing, the gateway was attempting to scale from zero
to min.

This logic has been corrected and separated from the
a holding pattern where the gateway waits for a ready
replica.

Tested with KinD and an edited function which had a
readiness probe, which was failing and no ready
replicas. As desired, the gateway did not scale to min.

However, when setting desired replicas to zero, the
gateway did scale up as expected.

This change also modifies all print statements for
"seconds" and makes them use 4 decimal places instead of
the default which was a longer, more verbose string for
the logs.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-09-08 11:21:29 +01:00
Alex Ellis (OpenFaaS Ltd)
4604271076 Introduce welcome message and change default timeout
The welcome message shows the difference between
Pro and CE.

The timeout of 8 seconds was never going to be useful as
a default, so changing to 60 seconds.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-08-30 14:02:44 +01:00
Alex Ellis (OpenFaaS Ltd)
9fccc67b9c Remove OpenFaaS Pro metrics from OpenFaaS CE
* Removes service min and target metrics from the CE gateway

OpenFaaS Pro metrics are no longer required in OpenFaaS CE
since there is an OpenFaaS Pro gateway available.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-08-30 11:30:58 +01:00
Alex Ellis (OpenFaaS Ltd)
dc2a7a0c6e Update alpine version for basic-auth-plugin
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-08-24 18:31:14 +01:00
Alex Ellis (OpenFaaS Ltd)
ce5ea178ec Upgrade x/sync, Prometheus client and faas-provider
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-08-24 18:12:23 +01:00
Alex Ellis (OpenFaaS Ltd)
20b62e3cc9 Remove deprecated files
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-08-24 18:09:02 +01:00
Alex Ellis
2e8ec683eb
Update README.md
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2022-08-24 11:46:39 +01:00