Skip to content

Commit

Permalink
chore(transformation): configure min pods for faas functions (#2356)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayachand authored Jul 11, 2023
1 parent 6708c6c commit c968881
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/util/openfaas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit c968881

Please sign in to comment.