Skip to content

Commit

Permalink
conditional logic
Browse files Browse the repository at this point in the history
  • Loading branch information
agrawaliti committed Jan 15, 2025
1 parent 6f6950f commit 725c6c2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/python/clusterloader2/slo/config/load-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 725c6c2

Please sign in to comment.