From 2e3e8ee97740d6ef50085de503f7392f9c5c829f Mon Sep 17 00:00:00 2001 From: ItiAgrawal Date: Tue, 14 Jan 2025 14:32:47 +0000 Subject: [PATCH] Update load-config.yaml and slo.py for deployment size adjustments and fix string formatting --- modules/python/clusterloader2/slo/config/load-config.yaml | 4 ++-- modules/python/clusterloader2/slo/slo.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 4aea0a00b..ffc2cfcce 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -30,12 +30,12 @@ name: load-config # Service test {{$BIG_GROUP_SIZE := DefaultParam .BIG_GROUP_SIZE 4000}} -{{$SMALL_GROUP_SIZE := DefaultParam .SMALL_GROUP_SIZE 20}} +{{$SMALL_GROUP_SIZE := DefaultParam .CL2_DEPLOYMENT_SIZE 20}} {{$bigDeploymentsPerNamespace := DefaultParam .bigDeploymentsPerNamespace 1}} # TODO: maintaining old logic when namespace value is 1, use smallDeploymentPods as calculatedPods count {{$calculatedPods := SubtractInt $podsPerNamespace (MultiplyInt $bigDeploymentsPerNamespace $BIG_GROUP_SIZE)}} -{{$smallDeploymentPods := if eq $namespaces 1 $calculatedPods $podsPerNamespace}} +{{$smallDeploymentPods := DivideInt $totalPods $namespaces}} {{$smallDeploymentsPerNamespace := DivideInt $smallDeploymentPods $SMALL_GROUP_SIZE}} namespace: diff --git a/modules/python/clusterloader2/slo/slo.py b/modules/python/clusterloader2/slo/slo.py index a0d5eedaa..d0d60f6f5 100644 --- a/modules/python/clusterloader2/slo/slo.py +++ b/modules/python/clusterloader2/slo/slo.py @@ -101,7 +101,7 @@ def configure_clusterloader2( file.write("CL2_NET_POLICY_ENFORCEMENT_LATENCY_NODE_LABEL_KEY: test\n") file.write("CL2_NET_POLICY_ENFORCEMENT_LATENCY_NODE_LABEL_VALUE: net-policy-client\n") file.write("CL2_NET_POLICY_ENFORCEMENT_LATENCY_MAX_TARGET_PODS_PER_NS: 10\n") - file.write(f"CL2_NET_POLICY_ENFORCEMENT_LOAD_COUNT: {total_network_policies}\n") + file.write("CL2_NET_POLICY_ENFORCEMENT_LOAD_COUNT: {total_network_policies}\n") file.write("CL2_NET_POLICY_ENFORCEMENT_LOAD_QPS: 10\n") file.write("CL2_POLICY_ENFORCEMENT_LOAD_TARGET_NAME: small-deployment\n")