From 725c6c2e914eb0af9602156ce9c246f71e1232d5 Mon Sep 17 00:00:00 2001 From: ItiAgrawal Date: Wed, 15 Jan 2025 13:52:21 +0000 Subject: [PATCH] conditional logic --- .../python/clusterloader2/slo/config/load-config.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 1d4637968..5d9d862fc 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -35,7 +35,15 @@ name: load-config # TODO: maintaining old logic when namespace value is 1, use smallDeploymentPods as calculatedPods count {{$calculatedPods := SubtractInt $podsPerNamespace (MultiplyInt $bigDeploymentsPerNamespace $BIG_GROUP_SIZE)}} -{{$smallDeploymentPods := (if $NETWORK_TEST (DivideInt $totalPods $namespaces) $calculatedPods)}} + +# Use explicit conditional block to assign smallDeploymentPods +{{$smallDeploymentPods := 0}} +{{if $NETWORK_TEST}} + {{$smallDeploymentPods = DivideInt $totalPods $namespaces}} +{{else}} + {{$smallDeploymentPods = $calculatedPods}} +{{end}} + {{$smallDeploymentsPerNamespace := DivideInt $smallDeploymentPods $SMALL_GROUP_SIZE}} namespace: