From d1a8e2f1a5bbddc11ccfab3261590f5642aff4b5 Mon Sep 17 00:00:00 2001 From: Lokesh Date: Mon, 8 Apr 2024 13:31:51 +0530 Subject: [PATCH 1/3] Add cost tracking labels to openfaas fn pods --- src/util/openfaas/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util/openfaas/index.js b/src/util/openfaas/index.js index 878fa706d9..8a9623d9c8 100644 --- a/src/util/openfaas/index.js +++ b/src/util/openfaas/index.js @@ -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(); @@ -151,6 +152,10 @@ const deployFaasFunction = async ( 'com.openfaas.scale.min': FAAS_MIN_PODS_IN_TEXT, transformationId: trMetadata.transformationId, workspaceId: trMetadata.workspaceId, + team: 'data-managment', + service: 'openfaas', + customer: 'shared', + 'customer-tier': CUSTOMER_TIER }; if ( trMetadata.workspaceId && From 58aec0a036f10d2020fecf9f8f1f83ee96ff315c Mon Sep 17 00:00:00 2001 From: lokey Date: Mon, 8 Apr 2024 13:43:52 +0530 Subject: [PATCH 2/3] Update src/util/openfaas/index.js Co-authored-by: Jayachand --- src/util/openfaas/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/openfaas/index.js b/src/util/openfaas/index.js index 8a9623d9c8..ff95a93903 100644 --- a/src/util/openfaas/index.js +++ b/src/util/openfaas/index.js @@ -152,8 +152,8 @@ const deployFaasFunction = async ( 'com.openfaas.scale.min': FAAS_MIN_PODS_IN_TEXT, transformationId: trMetadata.transformationId, workspaceId: trMetadata.workspaceId, - team: 'data-managment', - service: 'openfaas', + team: 'data-management', + service: 'openfaas-fn', customer: 'shared', 'customer-tier': CUSTOMER_TIER }; From 218f08c61662950df05946ea0cf59b9e1e0f6b62 Mon Sep 17 00:00:00 2001 From: Jayc Date: Mon, 8 Apr 2024 14:28:28 +0530 Subject: [PATCH 3/3] chore: adding cost labels to openfaas fn pods --- src/util/openfaas/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/openfaas/index.js b/src/util/openfaas/index.js index ff95a93903..00b3720e13 100644 --- a/src/util/openfaas/index.js +++ b/src/util/openfaas/index.js @@ -155,7 +155,7 @@ const deployFaasFunction = async ( team: 'data-management', service: 'openfaas-fn', customer: 'shared', - 'customer-tier': CUSTOMER_TIER + 'customer-tier': CUSTOMER_TIER, }; if ( trMetadata.workspaceId &&