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>
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>
Optimizes Docker builds by copying from license-check Docker image
instead of using curl to download the tool.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
**What**
- Always apply the `FunctionPrefixTrimmingURLPathTransformer` when
enqueueing async function requests. This ensures that the context
information sent to the function is correct
Resolves#85
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
We now hide the new namespace dropdown selector when
there is only 1 namespace, or when we are on swarm
This is also hidden in the function create page and
the function detail page
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This allows a uswer to select a non-standard (not openfaas-fn)
namespace from the UI to deploy a function into.
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This PR adds a namespace dropdown for the openfaas
namespaces. If a user has non-default namespaces
installed then a user can select that namespace,
view functions in that namespace, invoke them from
the UI and delete them from that namespace.
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This is being added because multiple namespaces can now be used
on Kubernetes. By listing namespaces, a client such as the UI
or CLI can then enumerate the namespaces to find functions
which may span across more than one namespace.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
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>
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>
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>
The function deployment and status structs have been moved away
into the faas-provider package.
Tested with a build, running tests, and CI.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This change which has been tested on armhf and x86_64 removes
the need for a separate Dockerfile for armhf.
CGO_ENABLED and GOARM etc are now passed as ARGs via build.sh.
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
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>
**What**
- Ensure that we are loading the log provider url correctly, including
fallback to the function provider, when the value is set
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
**What**
- Document the new logs handler url env variable in the gateway readme
- Document the logs handler in the swagger docs
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
**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>
**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>
**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>