Skip to content

Commit

Permalink
pass url as an environment value
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayachand committed Sep 30, 2023
1 parent e8f2a80 commit d1cf38e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/util/openfaas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,14 @@ const deployFaasFunction = async (functionName, code, versionId, libraryVersionI
envProcess = `${envProcess} --code "${code}" --config-backend-url ${CONFIG_BACKEND_URL} --lvids "${lvidsString}"`;
}

if (GEOLOCATION_URL) {
envProcess = `${envProcess} --geolocation-url ${GEOLOCATION_URL}`;
}

const envVars = {};
if (FAAS_ENABLE_WATCHDOG_ENV_VARS.trim().toLowerCase() === 'true') {
envVars.max_inflight = FAAS_MAX_INFLIGHT;
envVars.exec_timeout = FAAS_EXEC_TIMEOUT;
}
if (GEOLOCATION_URL) {
envVars.geolocation_url = GEOLOCATION_URL;

Check warning on line 133 in src/util/openfaas/index.js

View check run for this annotation

Codecov / codecov/patch

src/util/openfaas/index.js#L133

Added line #L133 was not covered by tests
}
// TODO: investigate and add more required labels and annotations
const payload = {
service: functionName,
Expand Down

0 comments on commit d1cf38e

Please sign in to comment.