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>
- Core contributors are added by name.
- Copyright notice now encourages OpenFaaS Author(s) in place of
OpenFaaS Project to reflect the nature od distributed copyright.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
From Project to Author(s) for the catch-all. This file has my
copyright which is retained through the catch-all statement.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
1. Use httptest.ResponseRecorder instead of custom implementation
StringResponseWriter.
2. Remove verbose log line in infohandler
Signed-off-by: Edward Wilde <ewilde@gmail.com>
Add Open Source Sharing is Caring Meetup, held in Sofia on 25th June, to the community.md
Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
This commit reverts the changes done in #738 to update the default
secret mount path to `/run/secrets/`
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
Secret path submitted in ced39bcda7e42c481f59689fa3cd95ba4a57bb34
was incorrect and is being reverted. Docker Swarm by default
stores its sercrets in /run/secrets.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This changes updates the secret mount path default value to
/var/openfaas/secrets at serveral places. It has been changed
from /run/secrets/ to /var/openfaas/secrets after version 0.8.2
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
This package version supports running OpenFaas on hosts the contain `.`
in their hostname i.e. computer-a.acme.com
Signed-off-by: Edward Wilde <ewilde@gmail.com>
**What**
- Update the documentation about secret management to note the changed
file location
- Remove the documentation on secret rotation, because this will not
currently work
- Update apikey-secret and ApiKeyProtected-Secrets to read secret values
from both the old and the new locations
**Why**
- Recent updates to faas-swarm and faas-netes changed the mount location
of secrets. These changes update the docs to reflect this change.
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
Includes fixes for secrets path, tested on Swarm.
Secrets now mounted at /var/openfaas/secrets/
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
**What**
- When determining the service name of the function, remove any trailing
slashes, the slashes are not allowed in service names for either Swarm
or K8S, so this can only be a left over from the url path
**Why**
- This was preventing service resolution, and hence failed functions,
when the function was called with a trailing slash
Fixes#714
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>