1288 Commits

Author SHA1 Message Date
Alex Ellis (VMware)
f5939c9a60 Update for scaling edge-case
- as reported on Slack and in issue #931 the gateway scaling code
was scaling to zero replicas as a result of the "proportional
scaling" added by @Templum's PR. This commit added a failing test
which was fixed by adding boundary checking - now if the scaling
amount is "0" we keep the current amount of replicas.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-10-25 11:47:47 +01:00
Alex Ellis (VMware)
4a6c6afe94 Bump gw version to 0.9.7
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-10-21 12:49:43 +01:00
Alex Ellis
17a9b736fb
Update CONTRIBUTING.md 2018-10-20 18:07:58 +01:00
Richard Gee
7df548668f Add logging to scale from zero requests
Trivial change to add logging around scale from zero events in scaling.go.
Previously scale from zero events were not logged in the same way that normal
scaling events are.  This change adds log writes to show when a scale from zero
was requested and when a function successfully moved to > 0 replicas.

Signed-off-by: Richard Gee <richard@technologee.co.uk>
2018-10-20 08:56:14 +01:00
qinpengfei
70a5e343c5 code formatter
Signed-off-by: qinpengfei <qinpengfei@jd.com>
2018-10-19 21:24:15 +01:00
Alex Ellis (VMware)
476b652c26 Update integration test
We now send Accepted not OK for creating functions.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-10-19 21:19:21 +01:00
Alex Ellis (VMware)
62525f6570 Don't follow redirects from functions
- Covers part of 919 by making the HTTP client used for proxying
stop following redirects. Tested with a stateless microservice,
but additional code changes may be requierd in the queue-worker,
the watchdogs and other areas.

Tested on Swarm with stateless microservice (Node.js) issuing
a redirect via Location header.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-10-19 21:19:21 +01:00
Radoslav Dimitrov
31e5439550 Bump queue-worker version to 0.5.4
Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2018-10-19 12:05:50 +01:00
Radoslav Dimitrov
2d52206c79 Bump faas-swarm version to 0.4.4
Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2018-10-19 12:05:50 +01:00
Radoslav Dimitrov
204c0d7f9a Bump the watchdog version to 0.9.6
Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2018-10-19 08:45:05 +01:00
Radoslav Dimitrov
456e4f5c2f Bump the gateway version to 0.9.6
Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2018-10-19 08:45:05 +01:00
John McCabe
76af9298dc Add VMUG Ireland event to community
Signed-off-by: John McCabe <john@johnmccabe.net>
2018-10-15 21:30:58 +01:00
John McCabe
4579cefd5e Add ScotlandPHP Keynote to community
Signed-off-by: John McCabe <john@johnmccabe.net>
2018-10-15 21:30:58 +01:00
Patricio Diaz
1d560f589f Added KubeCon+CloudNativeCon 2018 Event
Signed-off-by: Patricio Diaz <padiazg@gmail.com>
2018-10-15 15:59:04 +01:00
Lucas Roesler
9170ea6bd7 Fix typo in community providers table
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2018-10-13 11:44:12 +01:00
Lucas Roesler
e475436cca Split providers table into two
**What**
- Split the table into official providers and community providers
- Move the site links to the site column

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2018-10-13 11:44:12 +01:00
Lucas Roesler
9f53edd37e Add openfaas-operator to the provider table
**What**
- Add openfaas-operator as a provider with status Incubation

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2018-10-13 11:44:12 +01:00
Radoslav Dimitrov
d1a22df522 ARMHF publishing script - remove jq dependency
Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2018-10-13 11:05:12 +01:00
Ken Fukuyama
7aa37c6c1e Add Japanese events and blog posts
Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-10-13 10:28:01 +01:00
Alex Ellis
d0c770ddff
Add event locations to my talks 2018-10-13 09:45:01 +01:00
Alex Ellis
89ac0addd6
Add Lambda blog post and update key
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2018-10-12 12:23:06 +01:00
Alex Ellis
8a78710409
Add 2x packtpub.com books
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2018-10-12 12:18:04 +01:00
Alex Ellis
f720e7a0dc
Add 2018 Bossie 🏆🏆!
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2018-10-12 12:14:04 +01:00
Edward Wilde
d78df06606 Add terraform provider to community.md
Signed-off-by: Edward Wilde <ewilde@gmail.com>
2018-10-12 12:11:51 +01:00
Alex Ellis (VMware)
1dcc887554 Bump figlet version
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-10-09 16:55:36 +01:00
Vivek Singh
41876cc932 Update queue worker version to 0.5.3
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-10-04 15:28:35 +03:00
Alex Ellis
7db8ad1bda Update README files
- Removes use of "our" from CONTRIBUTING guide
- Updates/adds README.md files
- Commnents and typo fix in watchdog
- Adds good/bad examples of commit messages

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-10-03 14:07:41 +01:00
Alex Ellis
bd39b9267a Update comments
- updates comments and adds where missing
- updates locks so that unlock is done via defer instead of
at the end of the statement
- extracts timeout variable in two places
- remove makeClient() unused method from metrics package

No-harm changes tested via go build.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-10-03 13:16:28 +01:00
Alex Ellis
609ef28cad
Add long-hand sign-off
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-10-02 09:30:00 +01:00
Alex Ellis (VMware)
6df48fbac3 Update Alpine base to 3.8
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-30 21:20:00 +00:00
Burton Rheutan
397fbffb19 Add blog post from Keyu on serverless R
Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2018-09-30 15:48:41 +01:00
Alex Ellis
49bb180412
Add Ken's stats function 2018-09-28 21:58:22 +01:00
Burton Rheutan
76e476dea0 Add blog posts from Stacks to community file
Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2018-09-28 08:25:33 +01:00
Burton Rheutan
e0803ff0a7 Add faas version to issue template
This commit adds a line to the issue template
to request the faas-cli version and provider
information to the issue template to help diagnose
issues faster

Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2018-09-28 08:25:05 +01:00
Frank Pommerening
1cb1ebf99b Add event DevOpenSpace to community
Signed-off-by: Frank Pommerening <frank@pommerening-online.de>
2018-09-26 18:46:07 +01:00
Radoslav Dimitrov
662a61a413 Check if the Docker image is already present.
Proceed with building the image only if it's not already available.

Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2018-09-25 09:33:21 +01:00
Richard Gee
e33061702a Change the http status code on unfound function error to 404
Signed-off-by: Richard Gee <richard@technologee.co.uk>
2018-09-23 12:39:13 +01:00
Richard Gee
df6f4c49f2 Add checking for existent function in GetReplicas
Within MakeScalingHandler() there is a call to GetReplicas() which was not returning an error when a non-200 http response was received from /system/function/.  The call would also return a populated struct, so the perception was that a function existed an had been scaled to zero.  This meant that the function would be added to the function cache and the code would continue into SetReplicas() where an attempt would be made to scale up a non-existent function.

This change amends GetReplicas() so that it will return an error if the gateway returns anything other than a 200 reponse code from the /system/function/ endpoint.  This causes MakeScalingHandler() to return earlier with an error indicating that the function could not be found.  The cache.Set call is also moved to after the error check so that the cache is only updated to include existent functions.

During investigations as to the cause of #876 tests were added to function_cache to check that Get() is behaving as intended when function exists and when not.  Tests are also added to plugin/external to test that GetReplicas() and SetReplicas() are following their intended modes of operation when 200 and non-200 responses are received from the gateway.

Signed-off-by: Richard Gee <richard@technologee.co.uk>
2018-09-23 12:39:13 +01:00
Alex Ellis
5ac05f7959
Create publish-armhf.sh 2018-09-20 13:50:08 +01:00
Alex Ellis
3b83c9e682
Update ci.sh 2018-09-20 11:53:12 +01:00
Marko Mudrinić
9707e3d616 community: add link to digitalocean tutorial
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2018-09-20 11:48:08 +01:00
Alex Ellis
3ff6015a0d
Update ci.sh 2018-09-20 11:47:34 +01:00
Alex Ellis (VMware)
f6230e9e83 Update sample functions
- the path was converted to lowercase which meant the samples
would not build, this fixes that error.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-19 21:20:15 +01:00
Martin Dekov (VMware)
4d73e21906 Bump watchdog to 0.9.4
Bumping the watchdog to 0.9.4 in
mentioned places

Signed-off-by: Martin Dekov (VMware) <mdekov@vmware.com>
2018-09-19 21:04:53 +01:00
Alex Ellis (VMware)
4476a65dac Bump g/w 0.9.5 and faas-swarm to 0.4.3
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-19 21:01:55 +01:00
Alex Ellis (VMware)
3598da2e51 Enable basic auth for service query / scaling on provider
- this is a blocking issue for auth with Docker Swarm
fixes #879

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-19 20:52:14 +01:00
Alex Ellis
e7cfaa1b9b
Update stack.yml 2018-09-18 19:24:29 +01:00
Alex Ellis
8fe222fda3
Update stack_arm.yml 2018-09-18 19:24:25 +01:00
Alex Ellis (VMware)
e67811c91c Alter graceful shutdown sequence
- the shutdown sequence meant that the kubelet was still passing
work to the watchdog after the HTTP socket was closed. This change
means that the kubelet has a chance to run its check before we
finally stop accepting new connections. It will require some
basic co-ordination between the kubelet's checking period and the
"write_timeout" value in the container.

Tested with Kubernetes on GKE - before the change some Pods were
giving a connection refused error due to them being not detected
as unhealthy. Now I receive 0% error rate even with 20 qps.

Issue was shown by scaling to 20 replicas, starting a test with
hey and then scaling to 1 replica while tailing the logs from the
gateway. Before I saw some 502, now I see just 200s.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-17 11:48:16 +01:00
Burton Rheutan
d9f33435f0 Add links to community.md
This change adds link to the table of contents on the
community.md file as well as adding links to return to top
from the headers.

Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2018-09-16 18:43:47 +01:00