Skip to content

Commit

Permalink
Dont set -num-nodes on karpenter-managed clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
rifelpet committed Feb 5, 2024
1 parent 4092202 commit 2271b60
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/e2e/pkg/tester/tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,11 @@ func (t *Tester) addNodeIG() error {
ig = v
}
}
numNodes := int(*ig.Spec.MaxSize) // we assume that MinSize = Maxsize, this is true for e2e testing
klog.Infof("Setting -num-nodes=%v", numNodes)
t.TestArgs += " -num-nodes=" + strconv.Itoa(numNodes)
if ig.Spec.MaxSize != nil {
numNodes := int(*ig.Spec.MaxSize) // we assume that MinSize = Maxsize, this is true for e2e testing
klog.Infof("Setting -num-nodes=%v", numNodes)
t.TestArgs += " -num-nodes=" + strconv.Itoa(numNodes)
}

// Skip the rest of this function for non gce clusters
if cluster.Spec.LegacyCloudProvider != "gce" {
Expand Down

0 comments on commit 2271b60

Please sign in to comment.