Export new metrics for OpenFaaS Pro scaling

* Add service target metric
* Add service min replicas metric
* Add scale type metric

These combined allow new auto-scaling modes and parameters
for OpenFaaS Pro customers.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2022-01-24 12:11:54 +00:00
committed by Alex Ellis
parent 34735d61d0
commit d85d5e7239
23 changed files with 235 additions and 472 deletions

View File

@ -83,7 +83,7 @@ func Test_FunctionsHandler_ReturnsJSONAndOneFunction(t *testing.T) {
func makeFunctionsHandler() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
functions := []types.FunctionStatus{
types.FunctionStatus{
{
Name: "func_echoit",
Replicas: 0,
Namespace: "openfaas-fn",