1246 Commits

Author SHA1 Message Date
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
Alex Ellis (VMware)
c67c9f2b30 Fix issue with direct_functions and path behaviour
- The path clipping / transforming behaviour must be turned-off
when we are not using direct_functions as is used in
faas-nomad and faas-ecs. This will need a change in each provider
to strip paths, but fixes a 404 error these users will see if they
upgrade to 0.9.2 or newer. 0.9.3 will have a this fix meaning
the whole un-edited path is passed to the provider when
direct_functions is set to false.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-15 14:40:22 +01:00
Alex Ellis (VMware)
b786104f3a Rename nodeinfo image to match store
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-15 14:25:31 +01:00
Paulo Lopes
c61ba7fd2b Add vertx/graalvm post to community.md
Signed-off-by: Paulo Lopes <paulo@mlopes.net>
2018-09-14 13:19:20 +01:00
Stefan Prodan
2f163e556d Bump queue-worker to v0.5.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2018-09-12 11:59:09 +01:00
Alex Ellis (VMware)
326236763d Lock down faas-swarm
- This commit moves us to faas-swarm 0.4.2 which uses basic auth
(when enabled) to prevent functions or other services from
accessing the administrative API endpoints.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-10 13:07:01 +01:00
Martin Dekov (VMware)
0cc0201185 Bump gateway to 0.9.2 for docker-compose and docker-compose-armhf
Bumping gateway to latest 0.9.2 release for docker-compose.yml
and docker-compose-armhf.yml files

Signed-off-by: Martin Dekov (VMware) <mdekov@vmware.com>
2018-09-10 12:56:42 +01:00
Alex Ellis
ae35707c15
Add contributing_url
This means any repos which redirect here will pick up the standard
openfaas/faas guide instead of pointing to their local variant.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-10 10:25:56 +01:00
Stefan Prodan
3e0ed5edd7 Add X-Forwarded-Host test when already present
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2018-09-10 09:57:03 +01:00
Stefan Prodan
3d44fa813a Set upstream X-Forwarded Host and For headers if not present
- remove http client host override fix #847
- X-Forwarded-For and X-Forwarded-Host are usually handled by the ingress
controller, if those headers are not set then the gateway will create them

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2018-09-10 09:57:03 +01:00
Burton Rheutan
96504b0a74 Add Chinese blog post to community
Also, adjusted the previously added Chinese video to
retain the Chinese title and placed it in order

Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2018-09-08 14:37:08 +01:00
Alex Ellis (VMware)
4d59dd5858 Add events / blog-posts
Also removes legacy MAINTAINERS file - this data is in .DEREK.yml

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-08 10:28:14 +01:00
Alex Ellis (VMware)
eb8aaa760f Add OpenFaaS Author(s)
Adds distributed-copyright

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-08 10:11:22 +01:00
Vivek Singh
d926b2d886 Add basic auth support for /system/async-report
This commit adds basic authentication for `/system/async-report`
endpoint.

It also adds basic-auth secrets to `queue-worker` service which will be
used for gateway calls to `/system/async-report`.

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-09-08 09:58:19 +01:00
Alex Ellis (VMware)
3576e40f02 Updates to README
Added video link
Removed sample-functions link

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-08 09:25:02 +01:00
Alex Ellis (VMware)
eef37c56c2 Update README
Move Python example to use "return" and to use string formatting.
Tested example on Docker Swarm.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-08 08:36:33 +01:00
Radoslav Dimitrov
c221a525bf Bump gateway to 0.9.1
Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2018-09-06 17:20:06 +01:00
Alex Ellis (VMware)
6937bc4d7f Move to auth package in faas-provider
The basic-auth middleware and credentials-loading code has been
moved into the faas-provider project. This has now been brought
back into the faas project via vendoring.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-06 16:14:53 +01:00
Radoslav Dimitrov
c821585b39 Sample-functions: Get watchdog using curl instead of ADD - Docs
Convert all sample-functions to use curl to get the watchdog as
it can be cached by Docker. Issue #841

Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2018-09-06 15:03:10 +01:00
Radoslav Dimitrov
c062e4dbde Sample-functions: Get watchdog using curl instead of ADD - arm64
Convert all sample-functions to use curl to get the watchdog as
it can be cached by Docker. Issue #841

Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2018-09-06 15:03:10 +01:00
Radoslav Dimitrov
c28747890c Sample-functions: Get watchdog using curl instead of ADD - armhf
Convert all sample-functions to use curl to get the watchdog as
it can be cached by Docker. Issue #841

Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2018-09-06 15:03:10 +01:00
Radoslav Dimitrov
cdbd25c0fb Sample-functions: Get watchdog using curl instead of ADD - amd64
Convert all sample-functions to use curl to get the watchdog as
it can be cached by Docker. Issue #841

Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2018-09-06 15:03:10 +01:00
Burton Rheutan
817aae34a2 Added Cerner ShipIt blog post to community
Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2018-09-06 08:34:14 +01:00
Alex Ellis (VMware)
ffd81afd02 Refactor #843
Code-review/refactoring for #843. Closes #843.

FaaSHandlers has had info and query handlers added to its list
of types for consistency.

Secrets added to queue-worker component ready for next PR.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-05 09:47:49 +01:00
Burton Rheutan
fa076fb2c4 Pass basic auth to all system calls
This changeset enables passing the basic auth credentials
to all /system/ calls to allow upstream providers to
perform authorization checks independent of the gateway.

This is essential for some providers, like Swarm, where
the system is accessible on the same network, and not
protected via the gateway

Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2018-09-05 09:47:49 +01:00
Alex Ellis (VMware)
af0ccc9a45 Add Copyright headers where missing in handlers
- Added Copyright in handlers where missing
- Renamed Project to Author(s) where needed

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-03 13:26:58 +01:00
Edward Wilde
8fb423f6c1 Adds missing annotation field from swagger.yml
Signed-off-by: Edward Wilde <ewilde@gmail.com>
2018-09-02 23:39:36 +01:00
James
7a2a3542da update to add event to community listings for 2018
This updates the 2018 meetup event section to add an event for September 12th, 2018 in Sydney Australia.

Signed-off-by: James McAfee <mcafeej@vmware.com>
2018-08-31 07:34:28 +01:00
Ivana Yovcheva (VMware)
d2087cc701 Update Swagger scaling edpoint docs to POST
The scaling endpoint supports POST method, but in Swagger it was
documented with GET instead. Also bumped up the gateway version
to 0.8.12

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2018-08-30 11:23:51 +01:00
Alex Ellis (VMware)
a99ad5708b Move watchdog to latest version in samples
Moves to 0.9.0

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-08-30 11:20:52 +01:00
Edward Wilde
b564243f32 Update alpine function to enable patch support
Relates to: #815"

Signed-off-by: Edward Wilde <ewilde@gmail.com>
2018-08-30 11:09:26 +01:00
Patricio Diaz
3b4c1d90eb Bump Prometheus & AlertManager
Updated Swarm image versions for Prometheus &
Alertmanager to match Kubernetes stack

- Prometheus: v2.2.0 => v2.3.1
- Alertmanager: v0.15.0-rc.0 => v0.15.0

Signed-off-by: Patricio Diaz <padiazg@gmail.com>
2018-08-29 19:42:29 +01:00
Alex Ellis (VMware)
810e11c1f6 Bump GW to 0.9.0
Adds PATH support over HTTP for functions.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-08-29 12:47:23 +01:00
Alex Ellis (VMware)
9c2f6dd2a4 Fix bug introduced by URL transformer
This prevented Prometheus metrics from being gathered from the
URL.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-08-29 12:41:04 +01:00
Alex Ellis (VMware)
6055cafd4a Set Docker image NS to openfaas
This was altered to "alexellis" for building a testing image,
but shouldn't have been pushed. Reverting.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-08-29 12:41:04 +01:00
Alex Ellis (VMware)
e551d12b65 Add test coverage for FunctionPrefixTrimmingURLPathTransformer
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-08-29 12:41:04 +01:00
Alex Ellis (VMware)
4367fc4e35 Add test coverage for buildUpstreamRequest
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-08-29 12:41:04 +01:00
Alex Ellis (VMware)
2f98ca8802 Review changes for HTTP paths
This reviews the code and fixes up suggestions made by team for
the HTTP paths PR #789.

- Removed feature-flag (this is backwards-compatible, so I see
no value in adding the flag)
- There was a URL transform happening for calls proxied to the
back end, I changed this for the nil-transform - i.e. it does not
change anything in the URL
- Introduced variables to describe the regex indicies used in
the URL trimming.

Tested with Docker Swarm with a ruby-microservice, with
system calls and with function calls using the UI.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-08-29 12:41:04 +01:00
Thomas E Lackey
b1846b842c Add a non-capturing subgroup so that the function regex will match async functions as well.
Signed-off-by: Thomas E Lackey <telackey@bozemanpass.com>
2018-08-29 12:41:04 +01:00
Thomas E Lackey
8749e0d891 Only truncate '/function/...' paths.
Signed-off-by: Thomas E Lackey <telackey@bozemanpass.com>
2018-08-29 12:41:04 +01:00
Thomas E Lackey
decf9addb3 Make 'URLPathTransformer' interface and implementation to do the function prefix trimming instead of baking it in. Also add a configuration option, 'pass_url_path_to_functions' to control whether the full path is passed to the functions or not.
Signed-off-by: Thomas E Lackey <telackey@bozemanpass.com>
2018-08-29 12:41:04 +01:00
Thomas E Lackey
7870b87c38 Implement proposal 716, passing full paths through the Gateway and fwatchdog.
Previously, only the query string of the URL was passed through the Gateway.
With this change, the entire path requested by the client is passed through as well as the query string.

While fwatchdog already supported passing the path through, in practice this would not happen
since the Gateway would have swallowed it before forwarding the request to the watchdog.

With this change, the path portion after the function name is added to the Http_Path environment
variable, provided that cgiHeaders are enabled.  This is similar to the of-watchdog equivalent.

Signed-off-by: Thomas E Lackey <telackey@bozemanpass.com>
2018-08-29 12:41:04 +01:00
Ivana Yovcheva (VMware)
05cf688270 Update blog post/write-ups section with Cisco DevNet Sandbox
This updates the blog post section with OpenFaaS being mentioned
on Cisco DevNet Sandbox Cloud section and blog post for OpenFaaS
on Kubernetes from 2 Jan 2018 again in DevNet Sandbox

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2018-08-29 10:30:28 +01:00