mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 00:36:46 +00:00
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>
Exploring or editing the Swagger API documentation
The swagger.yml
file can be viewed and edited in the Swagger UI.
-
Head over to the Swagger editor
-
Now click File -> Import URL
-
Type in
https://raw.githubusercontent.com/alexellis/faas/master/api-docs/swagger.yml
and click OK
You can now view and edit the Swagger, copy back to your fork before pushing changes.