diff --git a/src/util/openfaas/index.js b/src/util/openfaas/index.js index 1b3e531ceb..60ad316e1b 100644 --- a/src/util/openfaas/index.js +++ b/src/util/openfaas/index.js @@ -20,6 +20,7 @@ const FAAS_MAX_INFLIGHT = process.env.FAAS_MAX_INFLIGHT || '4'; const FAAS_EXEC_TIMEOUT = process.env.FAAS_EXEC_TIMEOUT || '4s'; const FAAS_ENABLE_WATCHDOG_ENV_VARS = process.env.FAAS_ENABLE_WATCHDOG_ENV_VARS || 'true'; const CONFIG_BACKEND_URL = process.env.CONFIG_BACKEND_URL || 'https://api.rudderlabs.com'; +const GEOLOCATION_URL = process.env.GEOLOCATION_URL || ''; const FAAS_AST_VID = 'ast'; const FAAS_AST_FN_NAME = 'fn-ast'; @@ -128,6 +129,9 @@ const deployFaasFunction = async (functionName, code, versionId, libraryVersionI envVars.max_inflight = FAAS_MAX_INFLIGHT; envVars.exec_timeout = FAAS_EXEC_TIMEOUT; } + if (GEOLOCATION_URL) { + envVars.geolocation_url = GEOLOCATION_URL; + } // TODO: investigate and add more required labels and annotations const payload = { service: functionName,