Host HTTP header was not propagated to the function because it is not
a part of http.Request.Header map.
Signed-off-by: Dmitri Rubinstein <dmitri.rubinstein@googlemail.com>
This test takes inspiration from the PR from @telackey with changes
to make it more maintainable. Since the test does not require
changes to the code, I wanted to add it before merging changes.
Ref: https://github.com/openfaas/faas/pull/789
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
Idea from Matthew Holt, using the haveibeenpwned API to query
whether a password has been found in a data-breach.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This updates faas-swarm version including a fix for annotations.
In version 0.4.0 the prefix was not removed from the annotation
key, which was causing errors trying to get the value
Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
Changes:
Increased version to reflect latest
Every path now is in ''
Added all receivable Status Codes
Made use of Schemas
Added required annotation to models
Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
- Removes Eric from list of core contributors after he asked me
today. Eric will retain access to Derek and is welcome to
contribute if/when he is able.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
The update to the gateway and faas-swarm add read-only containers
and the ability to use annotations in the function schema.
faas-cli 0.6.17 is required.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
The sample YAML is for deploying only and not for building, for
building enter the sample-functions folder.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
- exposes scale-function endpoint for use with faas-idler, this
is protected by auth when enabled.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This commit bumps gateway version to 0.8.7 in docker-compose.yml and
also adds `scale_from_zero` environment variable to the gateway.
Fixes: #780
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
1. Add new annotation attributes which may be used
by the back-end for making scheduling or routing decisions.
2. Updated tests/README.md to give clearer instructions on creating and
tearing down the stack required to run the integration tests
3. Update ci.sh
* Fail as soon as an error is encountered
* Allow script to run locally in development environment, test if repos
are already cloned etc..
* Deploy ./stack.yml used by existing integration tests
Signed-off-by: Edward Wilde <ewilde@gmail.com>
Existing code has been used for scaling up and querying replicas.
This meant the new code was deleted and there is less duplication
now.
The cache store a whole query response rather than just the
available replica count and the tests were updated. This has been
tested with Docker swarm and the image:
openfaas/gateway:scale-17-07-2018
This feature now needs the env-var of scale_from_zero to be enabled
in order to turn on the scaling behaviour.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This disables the scaling proxy by default since it is not the
default user-experience and is still under refinement.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This change allows functions to be "idled" or scaled to zero
replicas and then be invoked later on. There is a penalty to
scaling up - the API gateway proxy will block until the function
is ready.
A cache is included to off-set the calls to upstream API to check
on readiness along with unit tests.
Testing via scaling to zero replicas and then invoking function.
On Swarm I observed 3 seconds on an Intel Nuc i5 for scaling back
from zero replicas.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This should make CI tests pass without having to parse and run in
the login command via the faas-cli.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
The deployment script will enable basic-auth by default to help
avoid people deploying to a public IP with no protection from
malicious actors.
- In deploy_stash.sh /dev/random can hang on some systems, so using
urandom will give a better experience, if less "random" data.
For the purposes of creating an initial basic auth password this
is sufficient.
- Alpine Linux does not have the shasum command, but sha256sum.
- Tested on MacOS with and without --no-auth flag.
- Does not apply for armhf or powershell.
BASIC_AUTH env-var added by Vivek Syngh @viveksyngh
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
Adds flag to denote root-filesystem should be made read-only.
Needed for downstream work and re-vendoring in faas-swarm/faas-
netes and openfaas-operator.
Closes#723
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
Updated gateway to accept 202 as valid response code for
/system/scale-function/<function> along with 200.
Fixes: #faas-netes/245
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
This change adds a function URL field to the UI and a 'copy to
clipboard' button next to it. If the browser does not support the copy
command, the copy icon will be hidden.
Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
After editing queue-worker to push do openfaas/ ns instead of
functions/ this chage is required to match the image name.
Set to latest version 0.4.8
Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
This moves watchdog to a better name for images and also gives free
image-scanning and gives more confidence to users that components
ship regularly and makes any vulnerabilities in components clear
Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>