Skip to content

Commit

Permalink
Update load-config.yaml and slo.py for deployment size adjustments an…
Browse files Browse the repository at this point in the history
…d fix string formatting
  • Loading branch information
agrawaliti committed Jan 14, 2025
1 parent 6ced26d commit 2e3e8ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/python/clusterloader2/slo/config/load-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion modules/python/clusterloader2/slo/slo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 2e3e8ee

Please sign in to comment.