16 Commits

Author SHA1 Message Date
Lucas Roesler
35f0e9e657 Clean up docs and refactor createhandler
**What**
- Add a description for the secret key to the api swagger spec.
- Remove optional examples from the secret management guide.
- Update the ApiKeyProtected README to point at the new guide.
- Refactor the `makeSpec` function to accept the already assembled secrets
array because this should be easier to unit test.

Signed-off-by: Lucas Roesler <lucas.roesler@gmail.com>
2017-12-16 16:08:52 +00:00
Lucas Roesler
0fef825fb4 Add support to specify secrets in services
**What**
- During function creation, accept an array of strings defining swarm secrets
that are required for the service
- Update docs
- Add new guide on using the secrets capability
- Add new sample function to highlight using environment variables
- Update `ApiKeyProtected` sample function to utilize the new secrets
capabilities

**Why**
- This allows secrets to remain encrypted at rest instead of being unencrypted
in environment variables and yaml files.

Fixes #285

Signed-off-by: Lucas Roesler <lucas.roesler@gmail.com>
2017-12-16 16:08:52 +00:00
Elliott Beach
24306dd902 reword
Signed-off-by: Elliott Beach <elliott2.71828@gmail.com>
2017-11-09 11:51:38 +00:00
Elliott Beach
7b0128147c Add docs on async.
Signed-off-by: Elliott Beach <elliott2.71828@gmail.com>
2017-11-09 11:51:38 +00:00
Lewis Cowles
b308388bc2 Added optional body to function calls
The optional body parameter to be passed to STDIN wasn't part of the previous swagger spec.

Signed-off-by: Lewis Cowles <lewiscowles@me.com>
2017-10-23 15:03:30 +01:00
Elliott Beach
1b2f6648d5 update docs
Signed-off-by: Elliott Beach <elliott2.71828@gmail.com>
2017-10-15 23:11:53 +01:00
John McCabe
89878f0c8a Migrate from alexellis org to openfaas
Note, not all `alexellis/github` references should be changed, there are
a number of repos which are not part of the openfaas org, this commit
excludes those.

Signed-off-by: John McCabe <john@johnmccabe.net>
2017-10-04 09:18:06 +01:00
John McCabe
40e1fac1c2 Implement Swarm update handler using PUT
This commit implements an update handler for Docker Swarm, it queries the
current spec, updates values in-situ before calling ServiceUpdate.

The UpdateConfig FailureAction is set to rollback, so in the event of
supplying values to the update that would result in the service failing
then the update will be rolled back.

The UpdateConfig Parallelism param is set to an explicit value of 1 which
will result in functions being updated 1 by 1 rather than all at once.

It also moves the restartDelay declaration out of the create and update
handlers and into the main server function alongside maxRestarts.

And finally this commit uses the PUT HTTP verb for updates rather than
the non-HTTP UPDATE verb which was being used initially (also adding it
to the Swagger definition).

Signed-off-by: John McCabe <john@johnmccabe.net>
2017-09-27 09:58:03 +01:00
Alex Ellis
e2d7cb9a38 Bump to 0.6.1 2017-08-25 10:26:14 +01:00
Alex Ellis
1286e34a11 Update with invoke URLs and new website. 2017-08-25 10:25:41 +01:00
Alex Ellis
9639bc732b Create README.md 2017-08-25 10:15:00 +01:00
Sebastien Guilloux
9e711b3b5d Handle private docker registry auth
This adds support for private docker registries, by adding
an optional `registryAuth` field in the CreateFunctionRequest.
Auth must be passed as base64-encoded basic auth, similar to
how done in Docker file store credentials (~/.docker/config.json).
Credentials are then passed to swarm at service creation.
2017-05-30 17:10:34 +01:00
Alex Ellis
aa2e5d525b Document envVars to create method 2017-05-18 09:16:54 +01:00
Alex Ellis
0bada07f78 Include Alert endpoint in docs 2017-05-01 20:03:30 +01:00
Alex Ellis
cbcd0603d6 Add get/delete to Swagger 2017-05-01 19:33:53 +01:00
Alex Ellis
cafc5f0e0d Add Swagger definition for Deploy a new function 2017-05-01 16:44:31 +01:00