Commit Graph

1053 Commits

Author SHA1 Message Date
cb2e3c3251 Add new source file to Dockerfile
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-04-14 17:48:28 -07:00
08a080dcb2 Print version flag on every run
Moves handler code into separate file but retains same
package.

Changes watchdog to print version on start-up so that we can
grab this from logs. Version flag is also present for getting
additional information if needed from a user's published
container without running their function.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-04-14 17:48:28 -07:00
c258637d6d Added -version flag to watchdog
This changes introduces a new flag -version to watchdog which will
display version and SHA of last git commit.

Version and SHA are injected at build time and passed as a
build-args for Dockerfile.

Fixes: #632

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-04-14 17:19:53 -07:00
f936dcd757 Update watchdog version to 0.7.9 in function templates and docs
This updates fwatchdog to latest version (0.7.9) in all templates
in sample-functions and faas version in the documentation

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2018-04-12 22:36:26 -07:00
77dc4ae06a Added new blog to community.md file
New blog from Marcus Smallman on writing OpenFaas serverless function in
go has been added to community.md file

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-04-12 06:44:38 -07:00
811bbe6031 Apply gofmt
Previous PR from Simon or Ken broke build due to missing gofmt
in the PR. This PR applies it to resolve the build issue.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-04-11 20:46:20 -07:00
cb15c11061 Fix CI push behaviour
CI was using a test of ! -s which appeared to give a false positive
and try to push when it shouldn't. I changed it to -z which checks
for an empty string instead.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-04-11 20:33:46 -07:00
0b28e96a58 Adjusted code accordingly to feedback
Based on the received feedback I updated the documentation of the function. Also replaced variable temp by an more declaritive variable.
Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
2018-04-11 19:30:43 -07:00
6cd6975fe5 Moved label extraction to dedicated function.
Further I created some unit test which should cover all relevant scenarios for the created function.

Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
2018-04-11 19:30:43 -07:00
7fe67d7af6 Implemented the autoscaling steps to be proportions of the max replicas.
Introduced an new label to set the scaling factor that is used to calculate th proportions, setting it to 0 also allows to disable scaling.
Updated the tests to reflect the changes and added a new test which shows that setting the scaling factor to 0 indeed does disable scaling.
Ensured that the scaling factor is always between [0 and 100].

Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
2018-04-11 19:30:43 -07:00
a3cbe0b4a4 Add the Cube and TNS post 2018-04-11 17:09:00 -07:00
724dfcbcf7 Add workshop note to the TestDrive 2018-04-10 14:33:14 -07:00
2dc122aaa8 Update to latest gateway version 2018-04-10 14:27:37 -07:00
8f249792fe On funcstore error, change to manual tab
Fixed the UI so that when an error occurs, the tab automatically changes
to the manual tab in order to show the errors.

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-04-10 14:06:51 -07:00
5644d6ab20 Move gateway to gateway:0.7.9 2018-04-10 13:51:47 -07:00
e6a6aea422 Moved unit test files inside same directory as test target
The unit tests were inside the `gateway/tests` directory which had no
effect to the coverage for `go test`. Therefore, moved the tests inside
the same directory as the test target.

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-04-06 14:13:14 +01:00
5429df1e98 Update deployment_swarm.md 2018-04-05 18:39:59 +01:00
ec58db0d66 Update deployment_k8s.md 2018-04-05 18:39:38 +01:00
b048bdb3ec Update because samples.yml was renamed to stack.yml 2018-04-05 18:38:57 +01:00
ead7019a32 Rename samples.yml to stack.yml
Keeping documentation up to date
2018-04-05 18:36:51 +01:00
a0d84c893f Update to list active maintainers 2018-04-05 11:51:56 +01:00
e037e6816a Fix layout of table
Closes #627 - thanks @dkozlov

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-04-04 21:53:11 +01:00
164b3e2ba8 Update guidance on commit messages
Mentions not terminating lines with punctuation

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-04-03 22:22:36 +01:00
daa79aef75 Deprecate routeless proxy test
Routeless proxy allowed no HTTP path to be given when a Header
X-Function: name was given. This has been deprecated - I am
unaware of any usage of the feature.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-04-03 17:55:44 +01:00
5e0569f75a Update TestGet_Rejected
Get is a supported method so this test failed, I've now changed
this to an unsupported method - i.e. HEAD to trigger the error
and keep the test.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-04-03 17:55:44 +01:00
bbbb4b536a Bump watchdog to 1.9.4
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-04-03 17:55:44 +01:00
034f2c4d13 Update travis to use Go 1.9
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-04-03 17:55:44 +01:00
84271240d6 Point to docs site for links in README.md 2018-04-03 16:56:49 +01:00
42edd5f00a Update nodeinfo sample function
Update the NodeInfo sample function to use latest
watchdog version (0.7.7) to support both GET and POST method.

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-04-03 08:55:59 +01:00
38be3d543f Update BACKERS.md 2018-04-02 10:44:31 +01:00
3fe1e0b461 Broaden 50 chars to 72 for commit subject
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-04-02 09:20:38 +01:00
3b6280f44f Add Serverless Kubernetes RPi home-lab 2018-03-31 16:56:08 +01:00
775c08de86 Update README.md 2018-03-31 15:21:10 +01:00
7d31734734 Update README.md 2018-03-31 15:20:25 +01:00
54abee9a23 Update to link to next-gen watchdog 2018-03-31 14:01:30 +01:00
bdc4f02deb Update README.md
Adds link to the under-construction docs site and the new workshop.
2018-03-31 13:59:46 +01:00
b11d7aa42b added pycon talk
Signed-off-by: Michael Herman <hermanmu@gmail.com>
2018-03-31 08:31:38 +01:00
5b3099fb90 added openfaas code eval sample, re-ordered samples by date
Signed-off-by: Michael Herman <hermanmu@gmail.com>
2018-03-31 08:31:38 +01:00
6bd604f588 Add ARM builds of AlertManager/Prometheus
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-29 14:07:36 +00:00
eb2dc7aeab Update queue-worker version
Update queue-worker version to latest 0.4.3 in docker compose

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2018-03-29 14:41:58 +01:00
b20f527d76 Replace tabs with spaces
Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
2018-03-29 12:53:55 +01:00
e7001b2b49 Remove patching references from ARM deployment guide
Signed-off-by: rgee0 <richard@technologee.co.uk>
2018-03-28 19:08:54 +01:00
65ed8457af Fix issue in passing-through of proxy body
Proxy body was being passed correctly due to placement of defer
statement. This has been moved into outer scope to resolve issue.

Tested with new e2e tests in certifier component.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-27 21:12:38 +01:00
58bd87c811 Update proxy to pass query-string
HTTP proxy was not passing query-string upstream. This change
reinstates the behaviour through TDD - adding test coverage and
automated regression testing.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-27 19:33:43 +01:00
a20534fb41 Bump gateway version to 0.7.8
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-26 20:26:55 +01:00
9a1b119c9f Remove Prometheus tracking for forwarded requests
Forwarded requests were being logged in the function metrics and
I saw this when doing some testing on auto-scaling with K8s.

This change removes the call to the Prometheus notifier for any
calls which are forwarded to the provider and retains them for the
functions.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-26 13:12:29 +01:00
949810c403 Update troubleshooting guide about namespaces
Updated to show how to use namespaces with Kubernetes
Also updates the timeouts for gateways newer than 0.7.7
2018-03-26 09:21:59 +01:00
de2c74fcdb Add feature for graceful shutdown of HTTP server
If the watchdog is sent SIGTERM from an external process then it
should stop accepting new connections and attempt to finish the
work in progress. This change makes use of the new ability in Go
1.9 and onwards to cancel a HTTP server gracefully.

The write_timeout duration is used as a grace period to allow all
in-flight requests to complete. The pattern is taken directly from
the offical example in the Golang documentation. [1]

Further tuning and testing may be needed for Windows containers which
have a different set of signals for closing work. This change aims
to cover the majority use-case for Linux containers.

The HTTP health-check is also invalidated by creating an and
expression with the existing lock file.

Tested with Kubernetes by deploying a custom watchdog and the
fprocess of `env`. Log message was observed when scaling down and
connections stopped being accepted on terminating replica.

Also corrects some typos from previous PR.

[1] https://golang.org/pkg/net/http/#Server.Shutdown

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-24 16:38:46 +00:00
6921e4fc0f Bump gateway to 0.7.7 for direct function access
0.7.7 allows direct function access bypassing the provider - this makes
the throughput increase and skips a HTTP hop that is no longer required.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-24 16:33:34 +00:00
ca425b8183 Adding Azure AKS Part 2 to community.md
Signed-off-by: Eric Stoekl <ems5311@gmail.com>
2018-03-24 08:29:17 +00:00