-
John McCabe authored
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>
John McCabe authoredThis 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>