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>
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>
The queue's name will be consumed by the queue worker to
publish to other topics / slow queues.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
NATS moved its primary library to: github.com/nats-io/stan.go
This commit synchronises the library in the gateway to match the
queue worker.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
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>
This should be a "no-harm" change to use the namespace/sub-
system definition for CounterOpts.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
* 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>
Updates community.md with Crossplane + OpenFaaS talk link
for Serverless Practitioners Summit - Kubecon EU 2020
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
There was a case where a deployment with a single namespace on
faas-netes would show the namespace suffix for all functions. we didn't
need to show this because the gateway will proxy to the default
namespace for fns without the namespace siffix.
This was tested on Swarm (no suffix), faas-netes (single namespace, no
suffix) and faas-netes, multi-ns, suffix shown.
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
The padding was off on the Gateway UI for the function
Store popup.
I have removed the 0padding css class from this element and left
it on the elements that require it
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>