Expose scale-function endpoint

- exposes scale-function endpoint for use with faas-idler, this
is protected by auth when enabled.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (VMware)
2018-07-23 15:23:02 +01:00
parent 4cbb7d968d
commit 8f0d2d1fd6
3 changed files with 36 additions and 0 deletions

View File

@ -197,6 +197,33 @@ paths:
description: Function not found
'500':
description: Error connecting to function
'/system/scale-function/{functionName}':
get:
summary: Scale a function
parameters:
- in: path
name: functionName
description: Function name
type: string
required: true
- in: body
name: input
description: Function to scale plus replica count
schema:
type: string
format: binary
example:
'{"service": "hello-world", "replicas": 10}'
required: false
responses:
'200':
description: Scaling OK
'202':
description: Scaling OK
'404':
description: Function not found
'500':
description: Error scaling function
'/system/function/{functionName}':
get:
summary: Get a summary of an OpenFaaS function