Dont set -num-nodes on karpenter-managed clusters

This commit is contained in:
Peter Rifel 2024-02-04 21:52:33 -06:00
parent 40922025a2
commit 2271b603fd
No known key found for this signature in database
1 changed files with 5 additions and 3 deletions

View File

@ -199,9 +199,11 @@ func (t *Tester) addNodeIG() error {
ig = v ig = v
} }
} }
numNodes := int(*ig.Spec.MaxSize) // we assume that MinSize = Maxsize, this is true for e2e testing if ig.Spec.MaxSize != nil {
klog.Infof("Setting -num-nodes=%v", numNodes) numNodes := int(*ig.Spec.MaxSize) // we assume that MinSize = Maxsize, this is true for e2e testing
t.TestArgs += " -num-nodes=" + strconv.Itoa(numNodes) klog.Infof("Setting -num-nodes=%v", numNodes)
t.TestArgs += " -num-nodes=" + strconv.Itoa(numNodes)
}
// Skip the rest of this function for non gce clusters // Skip the rest of this function for non gce clusters
if cluster.Spec.LegacyCloudProvider != "gce" { if cluster.Spec.LegacyCloudProvider != "gce" {