mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 08:46:48 +00:00
- extracting this package means it can be used in other components such as the asynchronous nats-queue-worker which may need to invoke functions which are scaled down to zero replicas. Ref: https://github.com/openfaas/nats-queue-worker/issues/32 Tested on Docker Swarm for scaling up, already scaled and not found error. Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
22 lines
669 B
Go
22 lines
669 B
Go
package scaling
|
|
|
|
const (
|
|
// DefaultMinReplicas is the minimal amount of replicas for a service.
|
|
DefaultMinReplicas = 1
|
|
|
|
// DefaultMaxReplicas is the amount of replicas a service will auto-scale up to.
|
|
DefaultMaxReplicas = 20
|
|
|
|
// DefaultScalingFactor is the defining proportion for the scaling increments.
|
|
DefaultScalingFactor = 20
|
|
|
|
// MinScaleLabel label indicating min scale for a function
|
|
MinScaleLabel = "com.openfaas.scale.min"
|
|
|
|
// MaxScaleLabel label indicating max scale for a function
|
|
MaxScaleLabel = "com.openfaas.scale.max"
|
|
|
|
// ScalingFactorLabel label indicates the scaling factor for a function
|
|
ScalingFactorLabel = "com.openfaas.scale.factor"
|
|
)
|