diff --git a/src/util/openfaas/index.js b/src/util/openfaas/index.js index f27fb81186..2a8c9564ef 100644 --- a/src/util/openfaas/index.js +++ b/src/util/openfaas/index.js @@ -11,6 +11,7 @@ const { RetryRequestError, RespStatusError } = require('../utils'); const FAAS_BASE_IMG = process.env.FAAS_BASE_IMG || 'rudderlabs/openfaas-flask:main'; const FAAS_MAX_PODS_IN_TEXT = process.env.FAAS_MAX_PODS_IN_TEXT || '40'; +const FAAS_MIN_PODS_IN_TEXT = process.env.FAAS_MIN_PODS_IN_TEXT || '1'; const FAAS_REQUESTS_CPU = process.env.FAAS_REQUESTS_CPU || '0.5'; const FAAS_REQUESTS_MEMORY = process.env.FAAS_REQUESTS_MEMORY || '140Mi'; const FAAS_LIMITS_CPU = process.env.FAAS_LIMITS_CPU || FAAS_REQUESTS_CPU; @@ -128,6 +129,7 @@ const deployFaasFunction = async (functionName, code, versionId, libraryVersionI 'openfaas-fn': 'true', 'parent-component': 'openfaas', 'com.openfaas.scale.max': FAAS_MAX_PODS_IN_TEXT, + 'com.openfaas.scale.min': FAAS_MIN_PODS_IN_TEXT, }, annotations: { 'prometheus.io.scrape': 'true',