Define workloads specs by YAML
This commit is contained in:
@@ -36,6 +36,7 @@ type IntegrationTestNodePreparer struct {
|
||||
client clientset.Interface
|
||||
countToStrategy []testutils.CountToStrategy
|
||||
nodeNamePrefix string
|
||||
nodeSpec *v1.Node
|
||||
}
|
||||
|
||||
// NewIntegrationTestNodePreparer creates an IntegrationTestNodePreparer configured with defaults.
|
||||
@@ -47,6 +48,15 @@ func NewIntegrationTestNodePreparer(client clientset.Interface, countToStrategy
|
||||
}
|
||||
}
|
||||
|
||||
// NewIntegrationTestNodePreparerWithNodeSpec creates an IntegrationTestNodePreparer configured with nodespec.
|
||||
func NewIntegrationTestNodePreparerWithNodeSpec(client clientset.Interface, countToStrategy []testutils.CountToStrategy, nodeSpec *v1.Node) testutils.TestNodePreparer {
|
||||
return &IntegrationTestNodePreparer{
|
||||
client: client,
|
||||
countToStrategy: countToStrategy,
|
||||
nodeSpec: nodeSpec,
|
||||
}
|
||||
}
|
||||
|
||||
// PrepareNodes prepares countToStrategy test nodes.
|
||||
func (p *IntegrationTestNodePreparer) PrepareNodes() error {
|
||||
numNodes := 0
|
||||
@@ -71,6 +81,11 @@ func (p *IntegrationTestNodePreparer) PrepareNodes() error {
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if p.nodeSpec != nil {
|
||||
baseNode = p.nodeSpec
|
||||
}
|
||||
|
||||
for i := 0; i < numNodes; i++ {
|
||||
var err error
|
||||
for retry := 0; retry < retries; retry++ {
|
||||
|
Reference in New Issue
Block a user