- Sep 29, 2022
-
-
Alex Ellis (OpenFaaS Ltd) authored
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>
-
- Sep 08, 2022
-
-
Alex Ellis (OpenFaaS Ltd) authored
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>
-
- Jul 07, 2022
-
-
Alex Ellis (OpenFaaS Ltd) authored
Introduces a single-flight call to a function's health endpoint to verify that it is registered with an Istio sidecar (Envoy) before letting the invocation through. Results are cached for 5 seconds, before a probe is required again. Tested without Istio, with probe_functions environment variable set to true, I saw a probe execute in the logs. Fixes: #1721 for Istio users. Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
-
- Jun 01, 2022
-
-
Alex Ellis (OpenFaaS Ltd) authored
The histogram for gateway_functions_seconds excluded the status code that gives important information for setting up SLOs. Fixes: #1725 Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
-
- Jul 26, 2021
-
-
Alex Ellis (OpenFaaS Ltd) authored
The queue type now resides in the provider, so that there is no risk of a circular reference. Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
- Feb 27, 2021
-
-
Lucas Roesler authored
**What** - Add unit test that verifies the behavior of the logging middleware in various reponse cases Signed-off-by:
Lucas Roesler <roesler.lucas@gmail.com>
-
- Jan 30, 2021
-
-
Vivek Singh authored
This commits updates version endpoint to use ProviderInfo and VersionInfo structs from faas-provider.GatewayInfo now uses ProviderInfo and VersionInfo structs. GatewayInfo is left within gateway. Consumer of this endpoint should use typed struct GatewayInfo to parse response. Signed-off-by:
Vivek Singh <vivekkmr45@yahoo.in>
-
- Jan 21, 2021
-
-
Alex Ellis (OpenFaaS Ltd) authored
Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
- Nov 02, 2020
-
-
Vivek Singh authored
Signed-off-by:
Vivek Singh <vivekkmr45@yahoo.in>
-
Vivek Singh authored
This commit adds namespace in function names while logging metrics to prometheus, irrespective of the function is invoked with namespace suffix or not. This is also required to add multiple namespace support to faas-idler https://github.com/openfaas-incubator/faas-idler/issues/37 which is part of https://github.com/openfaas/faas-netes/issues/511 Signed-off-by:
Vivek Singh <vivekkmr45@yahoo.in>
-
- May 06, 2020
-
-
Alex Ellis (OpenFaaS Ltd) authored
Removes an unused value in the alerthandler.go file, shown via lgtm.com. Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
Alex Ellis (OpenFaaS Ltd) authored
Found on lgtm.com Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
- Apr 22, 2020
-
-
Alex Ellis (OpenFaaS Ltd) authored
This type abstracts the function_query type and introduces an interface for testing and substitution. Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
Alex Ellis (OpenFaaS Ltd) authored
Enables publishing to various topics according to annotations on the functions. The function cache is moved up one level so that it can be shared between the scale from zero code and the queue proxy. Unit tests added for new internal methods. Tested e2e with arkade and the newest queue-worker and RC gateway image with two queues and an annotation on one of the functions of com.openfaas.queue. It worked as expected including with multiple namespace support. Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
- Apr 05, 2020
-
-
Alex Ellis (OpenFaaS Ltd) authored
Propagates the context to upstream requests so that cancellation can cascade. Closes: #1501 by @SpaWn2KiLl which was not signed-off. Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
- Mar 12, 2020
-
-
Alex Ellis (OpenFaaS Ltd) authored
Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
Alex Ellis (OpenFaaS Ltd) authored
* This experimental patch records metrics as invocations start so that the metrics can be used to make better scale to zero decisions in faas-idler. Tested with Kubernetes on a single-node cluster, metrics reported as expected. Existing metrics still report. Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
- Feb 22, 2020
-
-
Lars Lehtonen authored
Signed-off-by:
Lars Lehtonen <lars.lehtonen@gmail.com>
-
- Jan 24, 2020
-
-
Vivek Singh authored
Signed-off-by:
Vivek Singh <vivekkmr45@yahoo.in>
-
- Sep 20, 2019
-
-
Alex Ellis (OpenFaaS Ltd) authored
Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
Alex Ellis (OpenFaaS Ltd) authored
Allows alerts to trigger functions to scale when they also have an optional namespace set. Tested e2e with Kubernetes 1.15 and a non-default namespace. Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
Alex Ellis (OpenFaaS Ltd) authored
When coupled with the latest version of faas-netes, the gateway can now invoke, query and deploy functions into alternative namespaces. Tested e2e by creating a namespace "fn" and deploying, then invoking a function deployed there and in the default namespace. Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
Alex Ellis (OpenFaaS Ltd) authored
This patch enables the use-case for multiple namepsaces by allowing a dot to be used in the function name. dep has been run to update OpenFaaS projects and also to prune unused files. Tested by doing a build. Signed-off-by:
Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
-
- Jul 17, 2019
-
-
Ivana Yovcheva (VMware) authored
With this change /system/info endpoint is going to give information about the platform architecture it is running on (arm64, armhf, x86_64) Signed-off-by:
Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
-
- Jul 06, 2019
-
-
Lucas Roesler authored
**What** - Use NotImplemented when we get a 404 from the log provider. When we get a 200, process the log request, as normal. For all other status codes, return a sever error with a message stating that the response was unexpected. The message will contain the original status code to assist with debugging Signed-off-by:
Lucas Roesler <roesler.lucas@gmail.com>
-
Lucas Roesler authored
Signed-off-by:
Lucas Roesler <roesler.lucas@gmail.com>
-
Lucas Roesler authored
**What** - Fix missing imports since my ide forgot to add the "time" package - Update the tests to accept the handler timeout duration Signed-off-by:
Lucas Roesler <roesler.lucas@gmail.com>
-
Lucas Roesler authored
**What** - Pass the writetimeout to the logs handler to set the context timeout of the log stream. Signed-off-by:
Lucas Roesler <roesler.lucas@gmail.com>
-
Lucas Roesler authored
**What** - Remove the hyjacker based logs handler implementation because it is not needed Signed-off-by:
Lucas Roesler <roesler.lucas@gmail.com>
-
Lucas Roesler authored
**What** - Create an alternative proxy implementation using CloseNotifier and Flusher Signed-off-by:
Lucas Roesler <roesler.lucas@gmail.com>
-
Lucas Roesler authored
**What** - Add test to verify that the log proxy shutsdown correctly when the client cancels - Add test to verify that the log proxy shutsdown correctly when the logs provider closes the connection Signed-off-by:
Lucas Roesler <roesler.lucas@gmail.com>
-
Lucas Roesler authored
**What** - Implement log handler method that will hijack the connection and clear timeouts to allow long lived streams - Proxies requests to the logs provider and returns the response unmodified Signed-off-by:
Lucas Roesler <roesler.lucas@gmail.com>
-
- Jun 14, 2019
-
-
Alex Ellis authored
This corrects an issue where the error body was being hidden for the external auth handler. It also adds the ca-certs into the runtime Docker image for when the gateway is calling an external plugin exposed over HTTPS. Tested with OAuth2 plugin. Signed-off-by:
Alex Ellis <alexellis2@gmail.com>
-
- Jun 09, 2019
-
-
Alex Ellis authored
Fixes a problem where basic auth was disabled and a nill pointer was hit, causing a panic. Signed-off-by:
Alex Ellis <alexellis2@gmail.com>
-
Alex Ellis authored
Signed-off-by:
Alex Ellis <alexellis2@gmail.com>
-
- Jun 07, 2019
-
-
Alex Ellis authored
Fixes issue by adding unit test to make sure the body from the plugin is written correctly and proxied to the client. Signed-off-by:
Alex Ellis <alexellis2@gmail.com>
-
Alex Ellis authored
Fix for external auth wrapper handler. Written by introducing a broken unit test. Whenever the auth plugin returns a request as not authorized, we must pass back any headers set by the plugin. Signed-off-by:
Alex Ellis <alexellis2@gmail.com>
-
Alex Ellis authored
Fixes issue found in e2e testing where the headers were not being passed to the basic-auth-plugin. This change makes sure the upstream check gets all headers copied in before making the call. Tested with negative unit tests before writing fix. Signed-off-by:
Alex Ellis <alexellis2@gmail.com>
-
- Jun 05, 2019
-
-
Alex Ellis authored
Signed-off-by:
Alex Ellis <alexellis2@gmail.com>
-
Alex Ellis authored
These two functions are effectively the same, with the former being a wrapper for the later. Signed-off-by:
Alex Ellis <alexellis2@gmail.com>
-