mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 08:46:48 +00:00
Sets a new default maximum scale limit of 5 replicas out of the box for CE users, CE meaning "Community" rather than "Commercial". The increment factor of 10 vs 25 should not make a difference to genuine community and hobbyist users. Tested and verified with unit tests and hey with a CE cluster where the maximum limit was reached over several minutes, finally going back to 1 replica. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
21 lines
688 B
Go
21 lines
688 B
Go
// Copyright (c) OpenFaaS Author(s). All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
package scaling
|
|
|
|
// ServiceQuery provides interface for replica querying/setting
|
|
type ServiceQuery interface {
|
|
GetReplicas(service, namespace string) (response ServiceQueryResponse, err error)
|
|
SetReplicas(service, namespace string, count uint64) error
|
|
}
|
|
|
|
// ServiceQueryResponse response from querying a function status
|
|
type ServiceQueryResponse struct {
|
|
Replicas uint64
|
|
MaxReplicas uint64
|
|
MinReplicas uint64
|
|
ScalingFactor uint64
|
|
AvailableReplicas uint64
|
|
Annotations *map[string]string
|
|
}
|