Skip to content

Commit

Permalink
chore: add cost tracking labels to openfaas fn pods (#3261)
Browse files Browse the repository at this point in the history
  • Loading branch information
lokey authored Apr 8, 2024
2 parents e18b1c4 + 218f08c commit f161a75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/util/openfaas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const FAAS_AST_VID = 'ast';
const FAAS_AST_FN_NAME = 'fn-ast';
const CUSTOM_NETWORK_POLICY_WORKSPACE_IDS = process.env.CUSTOM_NETWORK_POLICY_WORKSPACE_IDS || '';
const customNetworkPolicyWorkspaceIds = CUSTOM_NETWORK_POLICY_WORKSPACE_IDS.split(',');
const CUSTOMER_TIER = process.env.CUSTOMER_TIER || 'shared';

// Initialise node cache
const functionListCache = new NodeCache();
Expand Down Expand Up @@ -151,6 +152,10 @@ const deployFaasFunction = async (
'com.openfaas.scale.min': FAAS_MIN_PODS_IN_TEXT,
transformationId: trMetadata.transformationId,
workspaceId: trMetadata.workspaceId,
team: 'data-management',
service: 'openfaas-fn',
customer: 'shared',
'customer-tier': CUSTOMER_TIER,
};
if (
trMetadata.workspaceId &&
Expand Down

0 comments on commit f161a75

Please sign in to comment.